comparison lisp/replace.el @ 17664:d8cb277f0ce8

Use defgroup and defcustom.
author Richard M. Stallman <rms@gnu.org>
date Mon, 05 May 1997 15:00:53 +0000
parents 8e35bb3ec2e2
children a7579056d62e
comparison
equal deleted inserted replaced
17663:d2c64a1563f7 17664:d8cb277f0ce8
24 ;; This package supplies the string and regular-expression replace functions 24 ;; This package supplies the string and regular-expression replace functions
25 ;; documented in the Emacs user's manual. 25 ;; documented in the Emacs user's manual.
26 26
27 ;;; Code: 27 ;;; Code:
28 28
29 (defvar case-replace t "\ 29 (defcustom case-replace t
30 *Non-nil means query-replace should preserve case in replacements.") 30 "*Non-nil means query-replace should preserve case in replacements."
31 :type 'boolean
32 :group 'matching)
31 33
32 (defvar query-replace-history nil) 34 (defvar query-replace-history nil)
33 35
34 (defvar query-replace-interactive nil 36 (defvar query-replace-interactive nil
35 "Non-nil means `query-replace' uses the last search string. 37 "Non-nil means `query-replace' uses the last search string.
325 (interactive) 327 (interactive)
326 (let ((pos (occur-mode-find-occurrence))) 328 (let ((pos (occur-mode-find-occurrence)))
327 (pop-to-buffer occur-buffer) 329 (pop-to-buffer occur-buffer)
328 (goto-char (marker-position pos)))) 330 (goto-char (marker-position pos))))
329 331
330 (defvar list-matching-lines-default-context-lines 0 332 (defcustom list-matching-lines-default-context-lines 0
331 "*Default number of context lines to include around a `list-matching-lines' 333 "*Default number of context lines to include around a `list-matching-lines'
332 match. A negative number means to include that many lines before the match. 334 match. A negative number means to include that many lines before the match.
333 A positive number means to include that many lines both before and after.") 335 A positive number means to include that many lines both before and after."
336 :type 'integer
337 :group 'matching)
334 338
335 (defalias 'list-matching-lines 'occur) 339 (defalias 'list-matching-lines 'occur)
336 340
337 (defvar list-matching-lines-face 'bold 341 (defvar list-matching-lines-face 'bold
338 "*Face used by M-x list-matching-lines to show the text that matches. 342 "*Face used by M-x list-matching-lines to show the text that matches.
738 (message "Replaced %d occurrence%s" 742 (message "Replaced %d occurrence%s"
739 replace-count 743 replace-count
740 (if (= replace-count 1) "" "s"))) 744 (if (= replace-count 1) "" "s")))
741 (and keep-going stack))) 745 (and keep-going stack)))
742 746
743 (defvar query-replace-highlight nil 747 (defcustom query-replace-highlight nil
744 "*Non-nil means to highlight words during query replacement.") 748 "*Non-nil means to highlight words during query replacement."
749 :type 'boolean
750 :group 'matching)
745 751
746 (defvar replace-overlay nil) 752 (defvar replace-overlay nil)
747 753
748 (defun replace-dehighlight () 754 (defun replace-dehighlight ()
749 (and replace-overlay 755 (and replace-overlay