X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fhyper-apropos.el;h=77258393ed2caa175084aa58deb9ea799203a455;hp=af739d813686662b9717877de03e38288b6cd86a;hb=716cfba952c1dc0d2cf5c968971f3780ba728a89;hpb=b73e352f264e9da0a00159dc29f318305cbe8636 diff --git a/lisp/hyper-apropos.el b/lisp/hyper-apropos.el index af739d8..7725839 100644 --- a/lisp/hyper-apropos.el +++ b/lisp/hyper-apropos.el @@ -58,7 +58,7 @@ ;; Massive changes by Christoph Wedler ;; Some changes for XEmacs 20.3 by hniksic -;; ### The maintainer is supposed to be stig, but I haven't seen him +;; #### The maintainer is supposed to be stig, but I haven't seen him ;; around for ages. The real maintainer for the moment is Hrvoje ;; Niksic . @@ -243,16 +243,22 @@ See also `hyper-apropos-mode'." (setq hyper-apropos-prev-wconfig (current-window-configuration))) (if (string= "" regexp) (if (get-buffer hyper-apropos-apropos-buf) - (if toggle-apropos - (hyper-apropos-toggle-programming-flag) - (message "Using last search results")) + (progn + (setq regexp hyper-apropos-last-regexp) + (if toggle-apropos + (hyper-apropos-toggle-programming-flag) + (message "Using last search results"))) (error "Be more specific...")) (set-buffer (get-buffer-create hyper-apropos-apropos-buf)) (setq buffer-read-only nil) (erase-buffer) (if toggle-apropos - (set (make-local-variable 'hyper-apropos-programming-apropos) - (not (default-value 'hyper-apropos-programming-apropos)))) + (if (local-variable-p 'hyper-apropos-programming-apropos + (current-buffer)) + (setq hyper-apropos-programming-apropos + (not hyper-apropos-programming-apropos)) + (set (make-local-variable 'hyper-apropos-programming-apropos) + (not (default-value 'hyper-apropos-programming-apropos))))) (let ((flist (apropos-internal regexp (if hyper-apropos-programming-apropos #'fboundp @@ -432,7 +438,9 @@ General Commands: (if (and (or (symbolp defn) (symbolp (setq defn (car-safe defn)))) defn show) - (hyper-apropos-get-doc defn t)))))) + (hyper-apropos-get-doc defn t)) + (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode)) + (setq hyper-apropos-prev-wconfig (current-window-configuration))))))) ;;;###autoload (defun hyper-describe-face (symbol &optional this-ref-buffer) @@ -454,10 +462,9 @@ See also `hyper-apropos' and `hyper-describe-function'." ": ")) (mapcar #'(lambda (x) (list (symbol-name x))) (face-list)) - nil t nil 'hyper-apropos-face-history))) - (list (if (string= val "") - (progn (push (symbol-name v) hyper-apropos-face-history) v) - (intern-soft val)) + nil t nil 'hyper-apropos-face-history + (and v (symbol-name v))))) + (list (intern-soft val) current-prefix-arg))) (if (null symbol) (message "Sorry, nothing to describe.") @@ -524,10 +531,10 @@ See also `hyper-apropos' and `hyper-describe-function'." (if v (format " (default %s): " v) ": ")) - obarray predicate t nil 'variable-history))) - (if (string= val "") - (progn (push (symbol-name v) variable-history) v) - (intern-soft val)))) + obarray predicate t nil 'variable-history + (and v (symbol-name v))))) + (intern-soft val))) + ;;;###autoload (define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol) @@ -543,10 +550,9 @@ See also `hyper-apropos' and `hyper-describe-function'." (format "%s (default %s): " prompt fn) (format "%s: " prompt)) obarray 'fboundp t nil - 'function-history))) - (if (equal val "") - (progn (push (symbol-name fn) function-history) fn) - (intern-soft val)))) + 'function-history + (and fn (symbol-name fn))))) + (intern-soft val))) (defun hyper-apropos-last-help (arg) "Go back to the last symbol documented in the *Hyper Help* buffer."