aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-09-17 19:43:09 +0000
committerRichard M. Stallman1999-09-17 19:43:09 +0000
commit07eeca5d43e7361849dd104e6615837c81ad7bce (patch)
tree04502c3d1878cd9e18c43b696750f276b52bb1e3
parent8241495da57ca0efed1b2e86ff693b5614e0aebd (diff)
downloademacs-07eeca5d43e7361849dd104e6615837c81ad7bce.tar.gz
emacs-07eeca5d43e7361849dd104e6615837c81ad7bce.zip
(apropos-symbol-face): Non-nil even for ttys.
(apropos-keybinding-face, apropos-label-face): Likewise. (apropos-property-face, apropos-match-face): Likewise. (apropos-label-properties): New variable. (apropos-print-doc): Use apropos-label-properties. (apropos-print): Set apropos-label-properties.
-rw-r--r--lisp/apropos.el49
1 files changed, 25 insertions, 24 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el
index b29a8e134b0..19a8aab206b 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -71,36 +71,32 @@ Slows them down more or less. Set this non-nil if you have a fast machine."
71 :type 'boolean) 71 :type 'boolean)
72 72
73 73
74(defcustom apropos-symbol-face (if window-system 'bold) 74(defcustom apropos-symbol-face 'bold
75 "*Face for symbol name in apropos output or `nil'. 75 "*Face for symbol name in Apropos output, or nil for none."
76This looks good, but slows down the commands several times."
77 :group 'apropos 76 :group 'apropos
78 :type 'face) 77 :type 'face)
79 78
80(defcustom apropos-keybinding-face (if window-system 'underline) 79(defcustom apropos-keybinding-face 'underline
81 "*Face for keybinding display in apropos output or `nil'. 80 "*Face for lists of keybinding in Apropos output, or nil for none."
82This looks good, but slows down the commands several times."
83 :group 'apropos 81 :group 'apropos
84 :type 'face) 82 :type 'face)
85 83
86(defcustom apropos-label-face (if window-system 'italic) 84(defcustom apropos-label-face 'italic
87 "*Face for label (Command, Variable ...) in apropos output or `nil'. 85 "*Face for label (`Command', `Variable' ...) in Apropos output.
88If this is `nil' no mouse highlighting occurs. 86A value of nil means don't use any special font for them, and also
89This looks good, but slows down the commands several times. 87turns off mouse highlighting."
90When this is a face name, as it is initially, it gets transformed to a
91text-property list for efficiency."
92 :group 'apropos 88 :group 'apropos
93 :type 'face) 89 :type 'face)
94 90
95(defcustom apropos-property-face (if window-system 'bold-italic) 91(defcustom apropos-property-face 'bold-italic
96 "*Face for property name in apropos output or `nil'. 92 "*Face for property name in apropos output, or nil for none."
97This looks good, but slows down the commands several times."
98 :group 'apropos 93 :group 'apropos
99 :type 'face) 94 :type 'face)
100 95
101(defcustom apropos-match-face (if window-system 'secondary-selection) 96(defcustom apropos-match-face 'secondary-selection
102 "*Face for matching part in apropos-documentation/value output or `nil'. 97 "*Face for matching text in Apropos documentation/value, or nil for none.
103This looks good, but slows down the commands several times." 98This applies when you look for matches in the documentation or variable value
99for the regexp; the part that matches gets displayed in this font."
104 :group 'apropos 100 :group 'apropos
105 :type 'face) 101 :type 'face)
106 102
@@ -494,6 +490,10 @@ Will return nil instead."
494 490
495 491
496 492
493(defvar apropos-label-properties nil
494 "List of face properties to use for a label.
495Bound by `apropos-print' for use by `apropos-print-doc'.")
496
497(defun apropos-print (do-keys spacing) 497(defun apropos-print (do-keys spacing)
498 "Output result of apropos searching into buffer `*Apropos*'. 498 "Output result of apropos searching into buffer `*Apropos*'.
499The value of `apropos-accumulator' is the list of items to output. 499The value of `apropos-accumulator' is the list of items to output.
@@ -506,10 +506,11 @@ alphabetically by symbol name; but this function also sets
506 (setq apropos-accumulator 506 (setq apropos-accumulator
507 (sort apropos-accumulator (lambda (a b) 507 (sort apropos-accumulator (lambda (a b)
508 (string-lessp (car a) (car b))))) 508 (string-lessp (car a) (car b)))))
509 (and apropos-label-face 509 (setq apropos-label-properties
510 (symbolp apropos-label-face) 510 (if (and apropos-label-face
511 (setq apropos-label-face `(face ,apropos-label-face 511 (symbolp apropos-label-face))
512 mouse-face highlight))) 512 `(face ,apropos-label-face
513 mouse-face highlight)))
513 (with-output-to-temp-buffer "*Apropos*" 514 (with-output-to-temp-buffer "*Apropos*"
514 (let ((p apropos-accumulator) 515 (let ((p apropos-accumulator)
515 (old-buffer (current-buffer)) 516 (old-buffer (current-buffer))
@@ -623,10 +624,10 @@ alphabetically by symbol name; but this function also sets
623 (put-text-property (- (point) 2) (1- (point)) 624 (put-text-property (- (point) 2) (1- (point))
624 'action action) 625 'action action)
625 (insert str ": ") 626 (insert str ": ")
626 (if apropos-label-face 627 (if apropos-label-properties
627 (add-text-properties (- (point) (length str) 2) 628 (add-text-properties (- (point) (length str) 2)
628 (1- (point)) 629 (1- (point))
629 apropos-label-face)) 630 apropos-label-properties))
630 (insert (if do-keys (substitute-command-keys i) i)) 631 (insert (if do-keys (substitute-command-keys i) i))
631 (or (bolp) (terpri))))) 632 (or (bolp) (terpri)))))
632 633