branch: externals/colorful-mode commit 1de25856ee140d702a4fb3fa6e102b34e08c3c56 Author: Elías Gabriel Pérez <eg642...@gmail.com> Commit: Elías Gabriel Pérez <eg642...@gmail.com>
* README.org: Update * colorful-mode.el (colorful-convert-and-change-color) (colorful-convert-and-copy-color, colorful-change-or-copy-color): Clarify docstring. --- README.org | 47 ++++++++++++++++++++++++++--------------------- colorful-mode.el | 9 ++++----- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/README.org b/README.org index 36b5cf763a..47a8ae6048 100644 --- a/README.org +++ b/README.org @@ -104,33 +104,38 @@ THIS MAY INTERFERE WITH COLORFUL PREFIX, YOU CAN DISABLE THIS SETTING colorful-add-rgb-colors) Available functions are: - + colorful-add-hex-colors. - + colorful-add-color-names. - + colorful-add-css-variables-colors. - + colorful-add-rgb-colors. - + colorful-add-hsl-colors. - + colorful-add-latex-colors - -- =colorful-exclude-colors (default: '("#define"))= List of keyword to don't highlight. -- =colorful-short-hex-conversions (default: t)= If non-nil, hex values converted by colorful should be as short as possible. - Setting this to 2 will make hex values follow a 24-bit specification (#RRGGBB[AA]) - and can make them inaccurate. -- =colorful-only-strings (default: nil)= If non-nil colorful will only highlight colors inside strings. - If set to only-prog, only highlight colors in strings if current major mode is derived from prog-mode. -- =global-colorful-modes (default: '(mhtml-mode html-ts-mode scss-mode css-mode css-ts-mode prog-mode))= Which major modes global-colorful-mode is switched on in (globally). + + colorful-add-hex-colors. + + colorful-add-color-names. + + colorful-add-css-variables-colors. + + colorful-add-rgb-colors. + + colorful-add-hsl-colors. + + colorful-add-latex-colors + +- =colorful-exclude-colors (default: '("#define"))= List of keywords not to highlight. +- =colorful-short-hex-conversions (default: t)= If non-nil, colorful + will converted long hex colors to \"#RRGGBB\" format. Setting this + to non-nil can make converted hex inaccurate. +- =colorful-only-strings (default: nil)= If non-nil, colorful will only highlight colors inside strings. + If set to `only-prog', the colors in `prog-mode' will be highlighted + only if they are inside a string, this doesn't include `css-mode' and + derived. +- =colorful-highlight-in-comments= If non-nil, colorful will highlight colors inside comments. + NOTE: If this is set, this will highlight any keyword within the + comments, including color names, which can be annoying. +- =colorful-html-colors-alist= Alist of HTML colors. Each entry should have the form (COLOR-NAME . HEXADECIMAL-COLOR). +- =global-colorful-modes (default: '(prog-mode help-mode html-mode css-mode latex-mode))= Which major modes global-colorful-mode is switched on in (globally). ** Faces - =colorful-base= Face used as base for highlight color names. Changing background or foreground color will have no effect. ** Interactive User Functions. -- =colorful-change-or-copy-color= Change or copy color to a converted - format at current cursor position. -- =colorful-convert-and-change-color= Convert color to other format - and replace color at point or active mark. - If mark is active, convert colors in mark. -- =colorful-convert-and-copy-color= Convert color to an other and - copy it at point. +- =colorful-change-or-copy-color= Change or copy color at point to + another format. +- =colorful-convert-and-change-color= Convert color at point or colors + in region to another format. +- =colorfu-convert-and-copy-color= Convert color at point to another + format and copy it to the kill ring. - =colorful-mode= Buffer-local minor mode. - =global-colorful-mode= Global minor mode. diff --git a/colorful-mode.el b/colorful-mode.el index b0e1ef3737..96708c7439 100644 --- a/colorful-mode.el +++ b/colorful-mode.el @@ -297,7 +297,7 @@ In case colorful breaks a buffer, such as a buffer derived from `help-mode', this option can be useful for you." :type '(repeat string)) -;; (make-obsolete-variable colorful-excluded-buffers nil "1.2.4") +(make-obsolete-variable 'colorful-excluded-buffers nil "1.2.4") (defcustom colorful-short-hex-conversions t "If non-nil, colorful will converted long hex colors to \"#RRGGBB\" format. @@ -407,8 +407,7 @@ BEG is the position to check for the overlay." ;;;; User Interactive Functions (defun colorful-convert-and-change-color (&optional beg end) - "Convert color to other format and replace color at point or active region. -If region is active, convert colors in mark." + "Convert color at point or colors in region to another format." (interactive (progn (barf-if-buffer-read-only) (if (use-region-p) @@ -459,7 +458,7 @@ If region is active, convert colors in mark." (user-error "No color found")))) (defun colorful-convert-and-copy-color () - "Convert color and copy it at point." + "Convert color at point to another format and copy it to the kill ring." (interactive) (if-let* ((colorful-ov (colorful--find-overlay)) ; Find colorful overlay tag at point/cursor. ;; Start prompt for color change and get new color. @@ -475,7 +474,7 @@ If region is active, convert colors in mark." (user-error "No color found"))) (defun colorful-change-or-copy-color () - "Change or copy color to a converted format at point." + "Change or copy color at point to another format." (interactive) (let* ((prompt "Please type an option: ") (choices '(("Convert and change color." . convert)