comparison lisp/apropos.el @ 430:a5df635868b2 r21-2-23

Import from CVS: tag r21-2-23
author cvs
date Mon, 13 Aug 2007 11:29:08 +0200
parents 3ecd8885ac67
children abe6d1db359e
comparison
equal deleted inserted replaced
429:8305706cbb93 430:a5df635868b2
105 105
106 106
107 (defvar apropos-mode-map 107 (defvar apropos-mode-map
108 (let ((map (make-sparse-keymap))) 108 (let ((map (make-sparse-keymap)))
109 (define-key map [(control m)] 'apropos-follow) 109 (define-key map [(control m)] 'apropos-follow)
110 (define-key map [return] 'apropos-follow)
110 (define-key map [(button2up)] 'apropos-mouse-follow) 111 (define-key map [(button2up)] 'apropos-mouse-follow)
111 (define-key map [(button2)] 'undefined) 112 (define-key map [(button2)] 'undefined)
112 map) 113 map)
113 "Keymap used in Apropos mode.") 114 "Keymap used in Apropos mode.")
114 115
506 (with-current-buffer standard-output 507 (with-current-buffer standard-output
507 (run-hooks 'apropos-mode-hook) 508 (run-hooks 'apropos-mode-hook)
508 (let ((p apropos-accumulator) 509 (let ((p apropos-accumulator)
509 (old-buffer (current-buffer)) 510 (old-buffer (current-buffer))
510 symbol item point1 point2) 511 symbol item point1 point2)
512 ;; Mostly useless but to provide better keymap
513 ;; explanation. help-mode-map will be used instead.
514 (use-local-map apropos-mode-map)
511 ;; XEmacs change from (if window-system 515 ;; XEmacs change from (if window-system
512 (if (device-on-window-system-p) 516 (if (device-on-window-system-p)
513 (progn 517 (progn
514 (princ "If you move the mouse over text that changes color,\n") 518 (princ "If you move the mouse over text that changes color,\n")
515 (princ (substitute-command-keys 519 (princ (substitute-command-keys
573 (if (eval `(or ,@(cdr apropos-item))) 577 (if (eval `(or ,@(cdr apropos-item)))
574 (car apropos-item) 578 (car apropos-item)
575 apropos-item)) 579 apropos-item))
576 (if apropos-symbol-face 580 (if apropos-symbol-face
577 (put-text-property point1 point2 'face apropos-symbol-face)) 581 (put-text-property point1 point2 'face apropos-symbol-face))
582 ;; Add text-property on symbol, too.
583 (put-text-property point1 point2 'keymap apropos-mode-map)
578 (apropos-print-doc 'describe-function 1 584 (apropos-print-doc 'describe-function 1
579 (if (commandp symbol) 585 (if (commandp symbol)
580 "Command" 586 "Command"
581 (if (apropos-macrop symbol) 587 (if (apropos-macrop symbol)
582 "Macro" 588 "Macro"