aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2014-02-06 23:18:02 -0800
committerGlenn Morris2014-02-06 23:18:02 -0800
commit99cf38598cd4ac71407b542ba0054fa0df018eb1 (patch)
tree20a2135ebc933ece0c87cef64a66b99fa51c3005 /lisp
parente4eaacacc664e5469558350521add4f0b4163818 (diff)
downloademacs-99cf38598cd4ac71407b542ba0054fa0df018eb1.tar.gz
emacs-99cf38598cd4ac71407b542ba0054fa0df018eb1.zip
Some hi-lock doc
* doc/emacs/display.texi (Highlight Interactively): Mention hi-lock-auto-select-face. * lisp/hi-lock.el (hi-lock-auto-select-face, hi-lock-line-face-buffer) (hi-lock-face-buffer, hi-lock-face-phrase-buffer) (hi-lock-face-symbol-at-point, hi-lock-read-face-name): Doc tweaks. * etc/NEWS: Related edits.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/hi-lock.el46
2 files changed, 26 insertions, 24 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 18587c06e31..97fc72e90ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12014-02-07 Glenn Morris <rgm@gnu.org> 12014-02-07 Glenn Morris <rgm@gnu.org>
2 2
3 * hi-lock.el (hi-lock-auto-select-face, hi-lock-line-face-buffer)
4 (hi-lock-face-buffer, hi-lock-face-phrase-buffer)
5 (hi-lock-face-symbol-at-point, hi-lock-read-face-name): Doc tweaks.
6
3 * obsolete/iswitchb.el: Move to obsolete/. 7 * obsolete/iswitchb.el: Move to obsolete/.
4 * simple.el (iswitchb-mode): Add manual autoloads to ease transition, 8 * simple.el (iswitchb-mode): Add manual autoloads to ease transition,
5 since obsolete/ is not scanned for autoloads. 9 since obsolete/ is not scanned for autoloads.
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index fb0136f034b..78efd8671c4 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -136,9 +136,9 @@ patterns."
136(put 'hi-lock-file-patterns-policy 'risky-local-variable t) 136(put 'hi-lock-file-patterns-policy 'risky-local-variable t)
137 137
138(defcustom hi-lock-auto-select-face nil 138(defcustom hi-lock-auto-select-face nil
139 "Non-nil if highlighting commands should not prompt for face names. 139 "Non-nil means highlighting commands do not prompt for the face to use.
140When non-nil, each hi-lock command will cycle through faces in 140Instead, each hi-lock command will cycle through the faces in
141`hi-lock-face-defaults' without prompting." 141`hi-lock-face-defaults'."
142 :type 'boolean 142 :type 'boolean
143 :version "24.4") 143 :version "24.4")
144 144
@@ -410,9 +410,8 @@ versions before 22 use the following in your init file:
410;;;###autoload 410;;;###autoload
411(defun hi-lock-line-face-buffer (regexp &optional face) 411(defun hi-lock-line-face-buffer (regexp &optional face)
412 "Set face of all lines containing a match of REGEXP to FACE. 412 "Set face of all lines containing a match of REGEXP to FACE.
413Interactively, prompt for REGEXP then FACE. Use 413Interactively, prompt for REGEXP using `read-regexp', then FACE.
414`read-regexp-defaults-function' to customize default 414Use the global history list for FACE.
415value(s) of REGEXP. Use the global history list for FACE.
416 415
417Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, 416Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
418use overlays for highlighting. If overlays are used, the 417use overlays for highlighting. If overlays are used, the
@@ -435,9 +434,8 @@ highlighting will not update as you type."
435;;;###autoload 434;;;###autoload
436(defun hi-lock-face-buffer (regexp &optional face) 435(defun hi-lock-face-buffer (regexp &optional face)
437 "Set face of each match of REGEXP to FACE. 436 "Set face of each match of REGEXP to FACE.
438Interactively, prompt for REGEXP then FACE. Use 437Interactively, prompt for REGEXP using `read-regexp', then FACE.
439`read-regexp-defaults-function' to customize default 438Use the global history list for FACE.
440value(s) of REGEXP. Use the global history list for FACE.
441 439
442Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, 440Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
443use overlays for highlighting. If overlays are used, the 441use overlays for highlighting. If overlays are used, the
@@ -456,12 +454,12 @@ highlighting will not update as you type."
456;;;###autoload 454;;;###autoload
457(defun hi-lock-face-phrase-buffer (regexp &optional face) 455(defun hi-lock-face-phrase-buffer (regexp &optional face)
458 "Set face of each match of phrase REGEXP to FACE. 456 "Set face of each match of phrase REGEXP to FACE.
459Interactively, prompt for REGEXP then FACE. Use 457Interactively, prompt for REGEXP using `read-regexp', then FACE.
460`read-regexp-defaults-function' to customize default 458Use the global history list for FACE.
461value(s) of REGEXP. Use the global history list for FACE. When 459
462called interactively, replace whitespace in user provided regexp 460When called interactively, replace whitespace in user-provided
463with arbitrary whitespace and make initial lower-case letters 461regexp with arbitrary whitespace, and make initial lower-case
464case-insensitive before highlighting with `hi-lock-set-pattern'. 462letters case-insensitive, before highlighting with `hi-lock-set-pattern'.
465 463
466Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, 464Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
467use overlays for highlighting. If overlays are used, the 465use overlays for highlighting. If overlays are used, the
@@ -480,14 +478,13 @@ highlighting will not update as you type."
480(defalias 'highlight-symbol-at-point 'hi-lock-face-symbol-at-point) 478(defalias 'highlight-symbol-at-point 'hi-lock-face-symbol-at-point)
481;;;###autoload 479;;;###autoload
482(defun hi-lock-face-symbol-at-point () 480(defun hi-lock-face-symbol-at-point ()
483 "Set face of each match of the symbol at point. 481 "Highlight each instance of the symbol at point.
484Use `find-tag-default-as-symbol-regexp' to retrieve the symbol at point. 482Uses the next face from `hi-lock-face-defaults' without prompting,
485Use non-nil `hi-lock-auto-select-face' to retrieve the next face 483unless you use a prefix argument.
486from `hi-lock-face-defaults' automatically. 484Uses `find-tag-default-as-symbol-regexp' to retrieve the symbol at point.
487 485
488Use Font lock mode, if enabled, to highlight symbol at point. 486This uses Font lock mode if it is enabled; otherwise it uses overlays,
489Otherwise, use overlays for highlighting. If overlays are used, 487in which case the highlighting will not update as you type."
490the highlighting will not update as you type."
491 (interactive) 488 (interactive)
492 (let* ((regexp (hi-lock-regexp-okay 489 (let* ((regexp (hi-lock-regexp-okay
493 (find-tag-default-as-symbol-regexp))) 490 (find-tag-default-as-symbol-regexp)))
@@ -663,7 +660,8 @@ not suitable."
663(defun hi-lock-read-face-name () 660(defun hi-lock-read-face-name ()
664 "Return face for interactive highlighting. 661 "Return face for interactive highlighting.
665When `hi-lock-auto-select-face' is non-nil, just return the next face. 662When `hi-lock-auto-select-face' is non-nil, just return the next face.
666Otherwise, read face name from minibuffer with completion and history." 663Otherwise, or with a prefix argument, read a face from the minibuffer
664with completion and history."
667 (unless hi-lock-interactive-patterns 665 (unless hi-lock-interactive-patterns
668 (setq hi-lock--unused-faces hi-lock-face-defaults)) 666 (setq hi-lock--unused-faces hi-lock-face-defaults))
669 (let* ((last-used-face 667 (let* ((last-used-face