Commit 589888fe authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(help-make-xrefs): Undo the last revert, and replace it with a real fix.

parent 8d720a00
2009-11-15 Stefan Monnier <monnier@iro.umontreal.ca> 2009-11-15 Stefan Monnier <monnier@iro.umontreal.ca>
* help-mode.el (help-make-xrefs): Undo the last revert, and replace it
with a real fix.
* novice.el (disabled-command-function): Add useful args. * novice.el (disabled-command-function): Add useful args.
Setup the help buffer so that [back] works. Setup the help buffer so that [back] works.
Remove redundant call to help-mode. Remove redundant call to help-mode.
......
...@@ -413,8 +413,8 @@ A special reference `back' is made to return back through a stack of ...@@ -413,8 +413,8 @@ A special reference `back' is made to return back through a stack of
help buffers. Variable `help-back-label' specifies the text for help buffers. Variable `help-back-label' specifies the text for
that." that."
(interactive "b") (interactive "b")
(with-current-buffer (or buffer (current-buffer))
(save-excursion (save-excursion
(set-buffer (or buffer (current-buffer)))
(goto-char (point-min)) (goto-char (point-min))
;; Skip the header-type info, though it might be useful to parse ;; Skip the header-type info, though it might be useful to parse
;; it at some stage (e.g. "function in `library'"). ;; it at some stage (e.g. "function in `library'").
...@@ -484,12 +484,12 @@ that." ...@@ -484,12 +484,12 @@ that."
(help-xref-button 8 'help-face sym))) (help-xref-button 8 'help-face sym)))
((match-string 6)) ; nothing for `symbol' ((match-string 6)) ; nothing for `symbol'
((match-string 7) ((match-string 7)
;;; this used: ;; this used:
;;; #'(lambda (arg) ;; #'(lambda (arg)
;;; (let ((location ;; (let ((location
;;; (find-function-noselect arg))) ;; (find-function-noselect arg)))
;;; (pop-to-buffer (car location)) ;; (pop-to-buffer (car location))
;;; (goto-char (cdr location)))) ;; (goto-char (cdr location))))
(help-xref-button 8 'help-function-def sym)) (help-xref-button 8 'help-function-def sym))
((and ((and
(facep sym) (facep sym)
...@@ -534,8 +534,8 @@ that." ...@@ -534,8 +534,8 @@ that."
;; name will be found. ;; name will be found.
;; If the keymap substitution isn't the last thing in ;; If the keymap substitution isn't the last thing in
;; the doc string, and if there is anything on the ;; the doc string, and if there is anything on the same
;; same line after it, this code won't recognize the end of it. ;; line after it, this code won't recognize the end of it.
(while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n" (while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n"
nil t) nil t)
(let ((col (- (match-end 1) (match-beginning 1)))) (let ((col (- (match-end 1) (match-beginning 1))))
...@@ -576,7 +576,7 @@ that." ...@@ -576,7 +576,7 @@ that."
;; View mode steals RET from us. ;; View mode steals RET from us.
(set (make-local-variable 'minor-mode-overriding-map-alist) (set (make-local-variable 'minor-mode-overriding-map-alist)
(list (cons 'view-mode help-xref-override-view-map))) (list (cons 'view-mode help-xref-override-view-map)))
(set-buffer-modified-p old-modified)))) (set-buffer-modified-p old-modified)))))
;;;###autoload ;;;###autoload
(defun help-xref-button (match-number type &rest args) (defun help-xref-button (match-number type &rest args)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment