emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: void-variable lazy-highlight-cleanup


From: Juri Linkov
Subject: Re: void-variable lazy-highlight-cleanup
Date: Thu, 06 Jan 2005 09:45:15 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:
> I unknowingly installed some changes I was not quite ready to install.
> I have fixed them up.

Since you decided to rename isearch-lazy-highlight options, then maybe
for backward compatibility we should make all old variable and face
names aliases and mark them as obsolete?  Is the following patch OK?  
It also groups different highlighting options together, removes
isearch-lazy-highlight from lazy-highlight groups (because it too
specific for this group), eliminates isearch-faces group (because
it has only two items).  And maybe this change should be mentioned
in NEWS (and in the Emacs Manual).

Index: lisp/isearch.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.253
diff -u -r1.253 isearch.el
--- lisp/isearch.el     6 Jan 2005 06:54:28 -0000       1.253
+++ lisp/isearch.el     6 Jan 2005 07:38:20 -0000
@@ -120,11 +120,6 @@
   :type 'regexp
   :group 'isearch)
 
-(defcustom search-highlight t
-  "*Non-nil means incremental search highlights the current match."
-  :type 'boolean
-  :group 'isearch)
-
 (defcustom search-invisible 'open
   "If t incremental search can match hidden text.
 nil means don't match invisible text.
@@ -155,15 +150,6 @@
   :type 'boolean
   :group 'isearch)
 
-(defcustom isearch-lazy-highlight t
-  "*Controls the lazy-highlighting during incremental search.
-When non-nil, all text in the buffer matching the current search
-string is highlighted lazily (see `lazy-highlight-initial-delay'
-and `lazy-highlight-interval')."
-  :type 'boolean
-  :group 'lazy-highlight
-  :group 'isearch)
-
 (defvar isearch-mode-hook nil
   "Function(s) to call after starting up an incremental search.")
 
@@ -208,13 +194,45 @@
   :type 'boolean
   :group 'isearch)
 
+;;; isearch highlight customization.
+
+(defcustom search-highlight t
+  "*Non-nil means incremental search highlights the current match."
+  :type 'boolean
+  :group 'isearch)
+
+(defface isearch
+  '((((class color) (min-colors 88) (background light))
+     ;; The background must not be too dark, for that means
+     ;; the character is hard to see when the cursor is there.
+     (:background "magenta2" :foreground "lightskyblue1"))
+    (((class color) (min-colors 88) (background dark))
+     (:background "palevioletred2" :foreground "brown4"))
+    (((class color) (min-colors 16))
+     (:background "magenta4" :foreground "cyan1"))
+    (((class color) (min-colors 8))
+     (:background "magenta4" :foreground "cyan1"))
+    (t (:inverse-video t)))
+  "Face for highlighting Isearch matches."
+  :group 'isearch)
+(defvar isearch 'isearch)
+
+(defcustom isearch-lazy-highlight t
+  "*Controls the lazy-highlighting during incremental search.
+When non-nil, all text in the buffer matching the current search
+string is highlighted lazily (see `lazy-highlight-initial-delay'
+and `lazy-highlight-interval')."
+  :type 'boolean
+  :group 'isearch)
+
 ;;; Lazy highlight customization.
+
 (defgroup lazy-highlight nil
   "Lazy highlighting feature for matching strings."
   :prefix "lazy-highlight-"
   :version "21.1"
   :group 'isearch
-  :group 'replace)
+  :group 'matching)
 
 (defcustom lazy-highlight-cleanup t
   "*Controls whether to remove extra highlighting after a search.
@@ -222,16 +240,22 @@
 \\[isearch-lazy-highlight-cleanup]."
   :type 'boolean
   :group 'lazy-highlight)
+(defvaralias 'isearch-lazy-highlight-cleanup 'lazy-highlight-cleanup)
+(make-obsolete-variable 'isearch-lazy-highlight-cleanup 
'lazy-highlight-cleanup)
 
 (defcustom lazy-highlight-initial-delay 0.25
   "*Seconds to wait before beginning to lazily highlight all matches."
   :type 'number
   :group 'lazy-highlight)
+(defvaralias 'isearch-lazy-highlight-initial-delay 
'lazy-highlight-initial-delay)
+(make-obsolete-variable 'isearch-lazy-highlight-initial-delay 
'lazy-highlight-initial-delay)
 
 (defcustom lazy-highlight-interval 0 ; 0.0625
   "*Seconds between lazily highlighting successive matches."
   :type 'number
   :group 'lazy-highlight)
+(defvaralias 'isearch-lazy-highlight-interval 'lazy-highlight-interval)
+(make-obsolete-variable 'isearch-lazy-highlight-interval 
'lazy-highlight-interval)
 
 (defcustom lazy-highlight-max-at-a-time 20
   "*Maximum matches to highlight at a time (for `lazy-highlight').
@@ -241,6 +265,8 @@
   :type '(choice (const :tag "All" nil)
                 (integer :tag "Some"))
   :group 'lazy-highlight)
+(defvaralias 'isearch-lazy-highlight-max-at-a-time 
'lazy-highlight-max-at-a-time)
+(make-obsolete-variable 'isearch-lazy-highlight-max-at-a-time 
'lazy-highlight-max-at-a-time)
 
 (defface lazy-highlight
   '((((class color) (min-colors 88) (background light))
@@ -253,8 +279,11 @@
      (:background "turquoise3"))
     (t (:underline t)))
   "Face for lazy highlighting of matches other than the current one."
-  :group 'isearch-faces
   :group 'lazy-highlight)
+(put 'isearch-lazy-highlight-face 'face-alias 'lazy-highlight)
+(defvar lazy-highlight-face 'lazy-highlight)
+(defvaralias 'isearch-lazy-highlight-face 'lazy-highlight-face)
+(make-obsolete-variable 'isearch-lazy-highlight-face 'lazy-highlight-face)
 
 ;; Define isearch-mode keymap.
 
@@ -2284,29 +2311,6 @@
 ;;  - the variable `isearch-invalid-regexp' is expected to be true
 ;;    iff `isearch-string' is an invalid regexp.
 
-(defgroup isearch-faces nil
-  "Lazy highlighting feature for incremental search."
-  :version "21.1"
-  :group 'isearch)
-
-(defface isearch
-  '((((class color) (min-colors 88) (background light))
-     ;; The background must not be too dark, for that means
-     ;; the character is hard to see when the cursor is there.
-     (:background "magenta2" :foreground "lightskyblue1"))
-    (((class color) (min-colors 88) (background dark))
-     (:background "palevioletred2" :foreground "brown4"))
-    (((class color) (min-colors 16))
-     (:background "magenta4" :foreground "cyan1"))
-    (((class color) (min-colors 8))
-     (:background "magenta4" :foreground "cyan1"))
-    (t (:inverse-video t)))
-  "Face for highlighting Isearch matches."
-  :group 'isearch-faces)
-(defvar isearch 'isearch)
-
-(defvar isearch-lazy-highlight-face 'lazy-highlight)
-
 (defvar isearch-lazy-highlight-overlays nil)
 (defvar isearch-lazy-highlight-wrapped nil)
 (defvar isearch-lazy-highlight-start nil)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]