comparison lisp/modeline.el @ 695:74f176715ed2

[xemacs-hg @ 2001-12-15 11:46:33 by youngs] 2001-12-15 John Paul Wallington <jpw@shootybangbang.com> * modeline.el: (abbrev-mode-line-string): new customizable variable (overwrite-mode-line-string): ditto (auto-fill-mode-line-string): ditto (defining-kbd-macro-mode-line-string): ditto * view-less.el: (view-mode-line-string): ditto
author youngs
date Sat, 15 Dec 2001 11:46:34 +0000
parents 7039e6323819
children 217aff1c578d
comparison
equal deleted inserted replaced
694:561ad704dc70 695:74f176715ed2
454 (setcdr el keymap) 454 (setcdr el keymap)
455 (funcall add-elt 455 (funcall add-elt
456 (cons toggle keymap) 456 (cons toggle keymap)
457 'minor-mode-map-alist))))) 457 'minor-mode-map-alist)))))
458 458
459 (defcustom abbrev-mode-line-string " Abbrev"
460 "*String to display in the modeline when `abbrev-mode' is active.
461 Set this to nil if you don't want a modeline indicator."
462 :type '(choice string
463 (const :tag "none" nil)))
464
465 (defcustom overwrite-mode-line-string " Ovwrt"
466 "*String to display in the modeline when `overwrite-mode' is active.
467 Set this to nil if you don't want a modeline indicator."
468 :type '(choice string
469 (const :tag "none" nil)))
470
471 (defcustom auto-fill-mode-line-string " Fill"
472 "*String to display in the modeline when `auto-fill-mode' is active.
473 Set this to nil if you don't want a modeline indicator."
474 :type '(choice string
475 (const :tag "none" nil)))
476
477 (defcustom defining-kbd-macro-mode-line-string " Def"
478 "*String to display in the modeline when `defining-kbd-macro' is active.
479 Set this to nil if you don't want a modeline indicator."
480 :type '(choice string
481 (const :tag "none" nil)))
482
459 ;; #### TODO: Add `:menu-tag' keyword to add-minor-mode. Or create a 483 ;; #### TODO: Add `:menu-tag' keyword to add-minor-mode. Or create a
460 ;; separate function to manage the minor mode menu. 484 ;; separate function to manage the minor mode menu.
461 485
462 ;(put 'abbrev-mode :menu-tag "Abbreviation Expansion") 486 ;(put 'abbrev-mode :menu-tag "Abbreviation Expansion")
463 (add-minor-mode 'abbrev-mode " Abbrev") 487 (add-minor-mode 'abbrev-mode 'abbrev-mode-line-string)
464 ;; only when visiting a file... 488 ;; only when visiting a file...
465 (add-minor-mode 'overwrite-mode 'overwrite-mode) 489 (add-minor-mode 'overwrite-mode 'overwrite-mode-line-string)
466 ;(put 'auto-fill-function :menu-tag "Auto Fill") 490 ;(put 'auto-fill-function :menu-tag "Auto Fill")
467 (add-minor-mode 'auto-fill-function " Fill" nil nil 'auto-fill-mode) 491 (add-minor-mode 'auto-fill-function 'auto-fill-mode-line-string
492 nil nil 'auto-fill-mode)
468 493
469 ;(put 'defining-kbd-macro :menu-tag "Keyboard Macro") 494 ;(put 'defining-kbd-macro :menu-tag "Keyboard Macro")
470 (add-minor-mode 'defining-kbd-macro " Def" nil nil 495 (add-minor-mode 'defining-kbd-macro 'defining-kbd-macro-mode-line-string
496 nil nil
471 (lambda () 497 (lambda ()
472 (interactive) 498 (interactive)
473 (if defining-kbd-macro 499 (if defining-kbd-macro
474 (progn 500 (progn
475 ;; #### This means to disregard the last event. 501 ;; #### This means to disregard the last event.