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>
* 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.
Setup the help buffer so that [back] works.
Remove redundant call to help-mode.
......
......@@ -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
that."
(interactive "b")
(with-current-buffer (or buffer (current-buffer))
(save-excursion
(set-buffer (or buffer (current-buffer)))
(goto-char (point-min))
;; Skip the header-type info, though it might be useful to parse
;; it at some stage (e.g. "function in `library'").
......@@ -484,12 +484,12 @@ that."
(help-xref-button 8 'help-face sym)))
((match-string 6)) ; nothing for `symbol'
((match-string 7)
;;; this used:
;;; #'(lambda (arg)
;;; (let ((location
;;; (find-function-noselect arg)))
;;; (pop-to-buffer (car location))
;;; (goto-char (cdr location))))
;; this used:
;; #'(lambda (arg)
;; (let ((location
;; (find-function-noselect arg)))
;; (pop-to-buffer (car location))
;; (goto-char (cdr location))))
(help-xref-button 8 'help-function-def sym))
((and
(facep sym)
......@@ -534,8 +534,8 @@ that."
;; name will be found.
;; If the keymap substitution isn't the last thing in
;; the doc string, and if there is anything on the
;; same line after it, this code won't recognize the end of it.
;; the doc string, and if there is anything on the same
;; line after it, this code won't recognize the end of it.
(while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n"
nil t)
(let ((col (- (match-end 1) (match-beginning 1))))
......@@ -576,7 +576,7 @@ that."
;; View mode steals RET from us.
(set (make-local-variable 'minor-mode-overriding-map-alist)
(list (cons 'view-mode help-xref-override-view-map)))
(set-buffer-modified-p old-modified))))
(set-buffer-modified-p old-modified)))))
;;;###autoload
(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