comparison lisp/hyper-apropos.el @ 438:84b14dcb0985 r21-2-27

Import from CVS: tag r21-2-27
author cvs
date Mon, 13 Aug 2007 11:32:25 +0200
parents 9d177e8d4150
children 8de8e3f6228a
comparison
equal deleted inserted replaced
437:e2a4e8b94b82 438:84b14dcb0985
436 (message "%s" msg) 436 (message "%s" msg)
437 (if final (setq defn final)) 437 (if final (setq defn final))
438 (if (and (or (symbolp defn) (symbolp (setq defn (car-safe defn)))) 438 (if (and (or (symbolp defn) (symbolp (setq defn (car-safe defn))))
439 defn 439 defn
440 show) 440 show)
441 (hyper-apropos-get-doc defn t)))))) 441 (hyper-apropos-get-doc defn t))
442 (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
443 (setq hyper-apropos-prev-wconfig (current-window-configuration)))))))
442 444
443 ;;;###autoload 445 ;;;###autoload
444 (defun hyper-describe-face (symbol &optional this-ref-buffer) 446 (defun hyper-describe-face (symbol &optional this-ref-buffer)
445 "Describe face.. 447 "Describe face..
446 See also `hyper-apropos' and `hyper-describe-function'." 448 See also `hyper-apropos' and `hyper-describe-function'."
458 (if v 460 (if v
459 (format " (default %s): " v) 461 (format " (default %s): " v)
460 ": ")) 462 ": "))
461 (mapcar #'(lambda (x) (list (symbol-name x))) 463 (mapcar #'(lambda (x) (list (symbol-name x)))
462 (face-list)) 464 (face-list))
463 nil t nil 'hyper-apropos-face-history))) 465 nil t nil 'hyper-apropos-face-history
464 (list (if (string= val "") 466 (and v (symbol-name v)))))
465 (progn (push (symbol-name v) hyper-apropos-face-history) v) 467 (list (intern-soft val)
466 (intern-soft val))
467 current-prefix-arg))) 468 current-prefix-arg)))
468 (if (null symbol) 469 (if (null symbol)
469 (message "Sorry, nothing to describe.") 470 (message "Sorry, nothing to describe.")
470 (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode)) 471 (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
471 (setq hyper-apropos-prev-wconfig (current-window-configuration))) 472 (setq hyper-apropos-prev-wconfig (current-window-configuration)))
528 (completing-read 529 (completing-read
529 (concat prompt 530 (concat prompt
530 (if v 531 (if v
531 (format " (default %s): " v) 532 (format " (default %s): " v)
532 ": ")) 533 ": "))
533 obarray predicate t nil 'variable-history))) 534 obarray predicate t nil 'variable-history
534 (if (string= val "") 535 (and v (symbol-name v)))))
535 (progn (push (symbol-name v) variable-history) v) 536 (intern-soft val)))
536 (intern-soft val)))) 537
537 ;;;###autoload 538 ;;;###autoload
538 (define-obsolete-function-alias 539 (define-obsolete-function-alias
539 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol) 540 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol)
540 541
541 (defun hyper-apropos-read-function-symbol (prompt) 542 (defun hyper-apropos-read-function-symbol (prompt)
547 (setq val (let ((enable-recursive-minibuffers t)) 548 (setq val (let ((enable-recursive-minibuffers t))
548 (completing-read (if fn 549 (completing-read (if fn
549 (format "%s (default %s): " prompt fn) 550 (format "%s (default %s): " prompt fn)
550 (format "%s: " prompt)) 551 (format "%s: " prompt))
551 obarray 'fboundp t nil 552 obarray 'fboundp t nil
552 'function-history))) 553 'function-history
553 (if (equal val "") 554 (and fn (symbol-name fn)))))
554 (progn (push (symbol-name fn) function-history) fn) 555 (intern-soft val)))
555 (intern-soft val))))
556 556
557 (defun hyper-apropos-last-help (arg) 557 (defun hyper-apropos-last-help (arg)
558 "Go back to the last symbol documented in the *Hyper Help* buffer." 558 "Go back to the last symbol documented in the *Hyper Help* buffer."
559 (interactive "P") 559 (interactive "P")
560 (let ((win (get-buffer-window hyper-apropos-help-buf))) 560 (let ((win (get-buffer-window hyper-apropos-help-buf)))