comparison lisp/hippie-exp.el @ 17634:247c2a11843d

Use defgroup and defcustom.
author Richard M. Stallman <rms@gnu.org>
date Sat, 03 May 1997 19:53:57 +0000
parents a0cfcb9f8033
children d3cc9cf799f8
comparison
equal deleted inserted replaced
17633:3b746ca2bca9 17634:247c2a11843d
155 ;; how to improve it, and all those who helped to find and remove bugs. 155 ;; how to improve it, and all those who helped to find and remove bugs.
156 ;; 156 ;;
157 157
158 ;;; Code: 158 ;;; Code:
159 159
160 (defgroup hippie-expand nil
161 "Expand text trying various ways to find its expansion."
162 :group 'abbrev)
163
160 (defvar he-num -1) 164 (defvar he-num -1)
161 165
162 (defvar he-string-beg (make-marker)) 166 (defvar he-string-beg (make-marker))
163 167
164 (defvar he-string-end (make-marker)) 168 (defvar he-string-end (make-marker))
195 "The list of expansion functions tried in order by `hippie-expand'. 199 "The list of expansion functions tried in order by `hippie-expand'.
196 To change the behavior of `hippie-expand', remove, change the order of, 200 To change the behavior of `hippie-expand', remove, change the order of,
197 or insert functions in this list.") 201 or insert functions in this list.")
198 202
199 ;;;###autoload 203 ;;;###autoload
200 (defvar hippie-expand-verbose t 204 (defcustom hippie-expand-verbose t
201 "*Non-nil makes `hippie-expand' output which function it is trying.") 205 "*Non-nil makes `hippie-expand' output which function it is trying."
206 :type 'boolean
207 :group 'hippie-expand)
202 208
203 ;;;###autoload 209 ;;;###autoload
204 (defvar hippie-expand-max-buffers () 210 (defcustom hippie-expand-max-buffers ()
205 "*The maximum number of buffers (apart from the current) searched. 211 "*The maximum number of buffers (apart from the current) searched.
206 If nil, all buffers are searched.") 212 If nil, all buffers are searched."
213 :type '(choice (const :tag "All" nil)
214 integer)
215 :group 'hippie-expand)
207 216
208 ;;;###autoload 217 ;;;###autoload
209 (defvar hippie-expand-ignore-buffers '("^ \\*.*\\*$" dired-mode) 218 (defcustom hippie-expand-ignore-buffers '("^ \\*.*\\*$" dired-mode)
210 "*A list specifying which buffers not to search (if not current). 219 "*A list specifying which buffers not to search (if not current).
211 Can contain both regexps matching buffer names (as strings) and major modes 220 Can contain both regexps matching buffer names (as strings) and major modes
212 \(as atoms)") 221 \(as atoms)"
222 :type '(repeat (choice regexp (symbol :tag "Major Mode")))
223 :group 'hippie-expand)
213 224
214 ;;;###autoload 225 ;;;###autoload
215 (defun hippie-expand (arg) 226 (defun hippie-expand (arg)
216 "Try to expand text before point, using multiple methods. 227 "Try to expand text before point, using multiple methods.
217 The expansion functions in `hippie-expand-try-functions-list' are 228 The expansion functions in `hippie-expand-try-functions-list' are