Mercurial > hg > xemacs-beta
diff lisp/packages/apropos.el @ 72:b9518feda344 r20-0b31
Import from CVS: tag r20-0b31
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:03:46 +0200 |
parents | 131b0175ea99 |
children | c0c698873ce1 |
line wrap: on
line diff
--- a/lisp/packages/apropos.el Mon Aug 13 09:03:07 2007 +0200 +++ b/lisp/packages/apropos.el Mon Aug 13 09:03:46 2007 +0200 @@ -66,22 +66,34 @@ "*Whether the apropos commands should do more. Slows them down more or less. Set this non-nil if you have a fast machine.") -(defvar apropos-symbol-face 'bold +;; XEmacs addition +(defvar apropos-symbol-face (if (boundp 'font-lock-keyword-face) + font-lock-keyword-face + 'bold) "*Face for symbol name in apropos output or `nil'. This looks good, but slows down the commands several times.") -(defvar apropos-keybinding-face 'underline +;; XEmacs addition +(defvar apropos-keybinding-face (if (boundp 'font-lock-string-face) + font-lock-string-face + 'underline) "*Face for keybinding display in apropos output or `nil'. This looks good, but slows down the commands several times.") -(defvar apropos-label-face 'italic +;; XEmacs addition +(defvar apropos-label-face (if (boundp 'font-lock-comment-face) + font-lock-comment-face + 'italic) "*Face for label (Command, Variable ...) in apropos output or `nil'. If this is `nil' no mouse highlighting occurs. This looks good, but slows down the commands several times. When this is a face name, as it is initially, it gets transformed to a text-property list for efficiency.") -(defvar apropos-property-face 'bold-italic +;; XEmacs addition +(defvar apropos-property-face (if (boundp 'font-lock-variable-name-face) + font-lock-variable-name-face + 'bold-italic) "*Face for property name in apropos output or `nil'. This looks good, but slows down the commands several times.") @@ -93,7 +105,8 @@ (defvar apropos-mode-map (let ((map (make-sparse-keymap))) (define-key map [(control m)] 'apropos-follow) - (define-key map [(button2)] 'apropos-mouse-follow) + (define-key map [(button2up)] 'apropos-mouse-follow) + (define-key map [(button2)] 'undefined) map) "Keymap used in Apropos mode.") @@ -110,6 +123,8 @@ (defvar apropos-item () "Current item in or for apropos-accumulator.") +(defvar apropos-mode-hook nil) ; XEmacs + (defun apropos-mode () "Major mode for following hyperlinks in output of apropos commands. @@ -118,7 +133,8 @@ (kill-all-local-variables) (use-local-map apropos-mode-map) (setq major-mode 'apropos-mode - mode-name "Apropos")) + mode-name "Apropos") + (run-hooks 'apropos-mode-hook)) ; XEmacs ;; For auld lang syne: @@ -460,7 +476,8 @@ (sort apropos-accumulator (lambda (a b) (string-lessp (car a) (car b))))) (and apropos-label-face - (symbolp apropos-label-face) + (or (symbolp apropos-label-face) + (facep apropos-label-face)) ; XEmacs (setq apropos-label-face `(face ,apropos-label-face mouse-face highlight))) (with-output-to-temp-buffer "*Apropos*" @@ -628,4 +645,6 @@ (princ ")") (print-help-return-message))) +(provide 'apropos) ; XEmacs + ;;; apropos.el ends here