• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching defs:minor

213 m  describe-mode.  Display documentation of current minor modes,
765 "Display documentation of current major mode and minor modes.
766 A brief summary of the minor modes comes first, followed by the
768 descriptions of the minor modes, each on a separate page.
770 For this to work correctly for a minor mode, the mode's indicator
771 variable \(listed in `minor-mode-alist') must also be a function
772 whose documentation describes the minor mode."
781 (let (minor-modes)
782 ;; Older packages do not register in minor-mode-list but only in
783 ;; minor-mode-alist.
784 (dolist (x minor-mode-alist)
786 (unless (memq x minor-mode-list)
787 (push x minor-mode-list)))
788 ;; Find enabled minor mode we will want to mention.
789 (dolist (mode minor-mode-list)
790 ;; Document a minor mode if it is listed in minor-mode-alist,
792 (let ((fmode (or (get mode :minor-mode-function) mode)))
795 (let ((pretty-minor-mode
796 (if (string-match "\\(\\(-minor\\)?-mode\\)?\\'"
802 (push (list fmode pretty-minor-mode
803 (format-mode-line (assq mode minor-mode-alist)))
804 minor-modes)))))
805 (setq minor-modes
806 (sort minor-modes
808 (when minor-modes
809 (princ "Enabled minor modes:\n")
812 (dolist (mode minor-modes)
814 (pretty-minor-mode (nth 1 mode))
816 (add-text-properties 0 (length pretty-minor-mode)
817 '(face bold) pretty-minor-mode)
822 ;; Document the minor modes fully.
823 (insert pretty-minor-mode)
824 (princ (format " minor mode (%s):\n"
830 (insert-button pretty-minor-mode
839 (princ "\n(Information about these minor modes follows the major mode info.)\n\n"))
851 (defun describe-minor-mode (minor-mode)
852 "Display documentation of a minor mode given as MINOR-MODE.
853 MINOR-MODE can be a minor mode symbol or a minor mode indicator string
858 (describe-minor-mode-completion-table-for-symbol)
859 (describe-minor-mode-completion-table-for-indicator)
861 (if (symbolp minor-mode)
862 (setq minor-mode (symbol-name minor-mode)))
863 (let ((symbols (describe-minor-mode-completion-table-for-symbol))
864 (indicators (describe-minor-mode-completion-table-for-indicator)))
866 ((member minor-mode symbols)
867 (describe-minor-mode-from-symbol (intern minor-mode)))
868 ((member minor-mode indicators)
869 (describe-minor-mode-from-indicator minor-mode))
871 (error "No such minor mode: %s" minor-mode)))))
874 (defun describe-minor-mode-completion-table-for-symbol ()
875 ;; In order to list up all minor modes, minor-mode-list
876 ;; is used here instead of minor-mode-alist.
877 (delq nil (mapcar 'symbol-name minor-mode-list)))
878 (defun describe-minor-mode-from-symbol (symbol)
879 "Display documentation of a minor mode given as a symbol, SYMBOL"
882 (describe-minor-mode-completion-table-for-symbol)))))
888 (defun describe-minor-mode-completion-table-for-indicator ()
900 minor-mode-alist)))
901 (defun describe-minor-mode-from-indicator (indicator)
902 "Display documentation of a minor mode specified by INDICATOR.
908 (describe-minor-mode-completion-table-for-indicator))))
909 (let ((minor-mode (lookup-minor-mode-from-indicator indicator)))
910 (if minor-mode
911 (describe-minor-mode-from-symbol minor-mode)
912 (error "Cannot find minor mode for `%s'" indicator))))
914 (defun lookup-minor-mode-from-indicator (indicator)
915 "Return a minor mode symbol from its indicator on the modeline."
920 (let ((minor-modes minor-mode-alist)
922 (while minor-modes
923 (let* ((minor-mode (car (car minor-modes)))
925 (car (cdr (car minor-modes))))))
932 (setq result minor-mode
933 minor-modes nil)
934 (setq minor-modes (cdr minor-modes)))))
952 (define-minor-mode temp-buffer-resize-mode