comparison lisp/prim/modeline.el @ 175:2d532a89d707 r20-3b14

Import from CVS: tag r20-3b14
author cvs
date Mon, 13 Aug 2007 09:50:14 +0200
parents 8eaf7971accc
children acd284d43ca1
comparison
equal deleted inserted replaced
174:bb3568571b84 175:2d532a89d707
263 263
264 (defun add-minor-mode (toggle name &optional keymap after toggle-fun) 264 (defun add-minor-mode (toggle name &optional keymap after toggle-fun)
265 "Add a minor mode to `minor-mode-alist' and `minor-mode-map-alist'. 265 "Add a minor mode to `minor-mode-alist' and `minor-mode-map-alist'.
266 TOGGLE is a symbol whose value as a variable specifies whether the 266 TOGGLE is a symbol whose value as a variable specifies whether the
267 minor mode is active. NAME is the name that should appear in the 267 minor mode is active. NAME is the name that should appear in the
268 modeline (it should be a string beginning with a space). KEYMAP is a 268 modeline (it should either be a string beginning with a space or a
269 keymap to make active when the minor mode is active. AFTER is the 269 symbol). KEYMAP is a keymap to make active when the minor mode is
270 toggling symbol used for another minor mode. If AFTER is non-nil, 270 active. AFTER is the toggling symbol used for another minor mode. If
271 then it is used to position the new mode in the minor-mode alists. 271 AFTER is non-nil, then it is used to position the new mode in the
272 TOGGLE-FUN specifies an interactive function that is called to toggle 272 minor-mode alists. TOGGLE-FUN specifies an interactive function that
273 the mode on and off; this affects what happens when button2 is pressed 273 is called to toggle the mode on and off; this affects what happens
274 on the mode, and when button3 is pressed somewhere in the list of 274 when button2 is pressed on the mode, and when button3 is pressed
275 modes. If TOGGLE-FUN is nil and TOGGLE names an interactive function, 275 somewhere in the list of modes. If TOGGLE-FUN is nil and TOGGLE names
276 TOGGLE is used as the toggle function. 276 an interactive function, TOGGLE is used as the toggle function.
277 277
278 Example: (add-minor-mode 'view-minor-mode \" View\" view-mode-map)" 278 Example: (add-minor-mode 'view-minor-mode \" View\" view-mode-map)"
279 (let (el place 279 (let (el place
280 (add-elt #'(lambda (elt sym) 280 (add-elt #'(lambda (elt sym)
281 (cond ((null after) ; add to front 281 (cond ((null after) ; add to front