- (lambda (key)
- (setq key (key-description key))
- (put-text-property 0 (length key)
- 'face apropos-keybinding-face
- key)
- key)
- 'key-description)
- item ", ")
- "(not bound to any keys)")))
- (terpri)
- ;; only now so we don't propagate text attributes all over
- (put-text-property point1 (1+ point1) 'item
- (if (eval `(or ,@(cdr apropos-item)))
- (car apropos-item)
- apropos-item))
- (if apropos-symbol-face
- (put-text-property point1 point2 'face apropos-symbol-face))
- (apropos-print-doc 'describe-function 1
- (if (commandp symbol)
- "Command"
- (if (apropos-macrop symbol)
- "Macro"
- "Function"))
- do-keys)
- (apropos-print-doc 'describe-variable 2
- "Variable" do-keys)
- (apropos-print-doc 'apropos-describe-plist 3
- "Plist" nil))
- (put-text-property 1 (point) 'local-map apropos-local-map)))))
+ (put-text-property 0 (length key)
+ 'face apropos-keybinding-face
+ key))
+ key)
+ item ", "))
+ (insert "M-x")
+ (put-text-property (- (point) 3) (point)
+ 'face apropos-keybinding-face)
+ (insert " " (symbol-name symbol) " ")
+ (insert "RET")
+ (put-text-property (- (point) 3) (point)
+ 'face apropos-keybinding-face)))
+ (terpri)
+ ;; only now so we don't propagate text attributes all over
+ (put-text-property point1 point2 'item
+ (if (eval `(or ,@(cdr apropos-item)))
+ (car apropos-item)
+ apropos-item))
+ (if apropos-symbol-face
+ (put-text-property point1 point2 'face apropos-symbol-face))
+ (apropos-print-doc 'describe-function 1
+ (if (commandp symbol)
+ "Command"
+ (if (apropos-macrop symbol)
+ "Macro"
+ "Function"))
+ t)
+ ;; We used to use customize-variable-other-window instead
+ ;; for a customizable variable, but that is slow.
+ ;; It is better to show an ordinary help buffer
+ ;; and let the user click on the customization button
+ ;; in that buffer, if he wants to.
+ (apropos-print-doc 'describe-variable 2 "Variable" t)
+ (apropos-print-doc 'customize-group-other-window 6 "Group" t)
+ (apropos-print-doc 'customize-face-other-window 5 "Face" t)
+ (apropos-print-doc 'widget-browse-other-window 4 "Widget" t)
+ (apropos-print-doc 'apropos-describe-plist 3
+ "Plist" nil))
+ (setq buffer-read-only t))))