comparison lisp/hyper-apropos.el @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents cc15677e0335
children bbff43aa5eb7
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
209 ;; (define-key map [button2] 'hyper-apropos-mouse-get-doc) 209 ;; (define-key map [button2] 'hyper-apropos-mouse-get-doc)
210 ;; map)) 210 ;; map))
211 211
212 (defvar hyper-apropos-mode-hook nil 212 (defvar hyper-apropos-mode-hook nil
213 "*User function run after hyper-apropos mode initialization. Usage: 213 "*User function run after hyper-apropos mode initialization. Usage:
214 \(setq hyper-apropos-mode-hook '(lambda () ... your init forms ...)).") 214 \(add-hook 'hyper-apropos-mode-hook #'(lambda () ... your init forms ...)).")
215 215
216 ;; ---------------------------------------------------------------------- ;; 216 ;; ---------------------------------------------------------------------- ;;
217 217
218 (defconst hyper-apropos-junk-regexp 218 (defconst hyper-apropos-junk-regexp
219 "^Apropos\\|^Functions\\|^Variables\\|^$") 219 "^Apropos\\|^Functions\\|^Variables\\|^$")
378 (use-local-map hyper-apropos-map) 378 (use-local-map hyper-apropos-map)
379 (run-hooks 'hyper-apropos-mode-hook)) 379 (run-hooks 'hyper-apropos-mode-hook))
380 380
381 ;; ---------------------------------------------------------------------- ;; 381 ;; ---------------------------------------------------------------------- ;;
382 382
383 ;; similar to `describe-key-briefly', copied from prim/help.el by CW 383 ;; similar to `describe-key-briefly', copied from help.el by CW
384 384
385 ;;;###autoload 385 ;;;###autoload
386 (defun hyper-describe-key (key) 386 (defun hyper-describe-key (key)
387 (interactive "kDescribe key: ") 387 (interactive "kDescribe key: ")
388 (hyper-describe-key-briefly key t)) 388 (hyper-describe-key-briefly key t))
450 "Follow face" 450 "Follow face"
451 "Describe face") 451 "Describe face")
452 (if v 452 (if v
453 (format " (default %s): " v) 453 (format " (default %s): " v)
454 ": ")) 454 ": "))
455 (mapcar (function (lambda (x) (list (symbol-name x)))) 455 (mapcar #'(lambda (x) (list (symbol-name x)))
456 (face-list)) 456 (face-list))
457 nil t nil 'hyper-apropos-face-history))) 457 nil t nil 'hyper-apropos-face-history)))
458 (list (if (string= val "") 458 (list (if (string= val "")
459 (progn (push (symbol-name v) hyper-apropos-face-history) v) 459 (progn (push (symbol-name v) hyper-apropos-face-history) v)
460 (intern-soft val)) 460 (intern-soft val))
883 (and (memq 'face type) 883 (and (memq 'face type)
884 (find-face symbol) 884 (find-face symbol)
885 (progn 885 (progn
886 (setq ok t) 886 (setq ok t)
887 (copy-face symbol 'hyper-apropos-temp-face 'global) 887 (copy-face symbol 'hyper-apropos-temp-face 'global)
888 (mapcar (function 888 (mapcar #'(lambda (property)
889 (lambda (property) 889 (setq symtype (face-property-instance symbol
890 (setq symtype (face-property-instance symbol 890 property))
891 property)) 891 (if symtype
892 (if symtype 892 (set-face-property 'hyper-apropos-temp-face
893 (set-face-property 'hyper-apropos-temp-face 893 property
894 property 894 symtype)))
895 symtype))))
896 built-in-face-specifiers) 895 built-in-face-specifiers)
897 (setq font (cons (face-property-instance symbol 'font nil 0 t) 896 (setq font (cons (face-property-instance symbol 'font nil 0 t)
898 (face-property-instance symbol 'font)) 897 (face-property-instance symbol 'font))
899 fore (cons (face-foreground-instance symbol nil 0 t) 898 fore (cons (face-foreground-instance symbol nil 0 t)
900 (face-foreground-instance symbol)) 899 (face-foreground-instance symbol))