[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/help-mode.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/help-mode.el |
Date: |
Tue, 16 Jul 2002 12:02:35 -0400 |
Index: emacs/lisp/help-mode.el
diff -c emacs/lisp/help-mode.el:1.13 emacs/lisp/help-mode.el:1.14
*** emacs/lisp/help-mode.el:1.13 Wed Jun 12 00:56:05 2002
--- emacs/lisp/help-mode.el Tue Jul 16 12:02:35 2002
***************
*** 31,37 ****
;;; Code:
(require 'button)
! (eval-when-compile (require 'view))
(defvar help-mode-map (make-sparse-keymap)
"Keymap for help mode.")
--- 31,37 ----
;;; Code:
(require 'button)
! (require 'view)
(defvar help-mode-map (make-sparse-keymap)
"Keymap for help mode.")
***************
*** 147,156 ****
:supertype 'help-xref
'help-function (lambda (fun file)
(require 'find-func)
! ;; Don't use find-function-noselect because it follows
;; aliases (which fails for built-in functions).
! (let* ((location (find-function-search-for-symbol
! fun nil file)))
(pop-to-buffer (car location))
(goto-char (cdr location))))
'help-echo (purecopy "mouse-2, RET: find function's definition"))
--- 147,157 ----
:supertype 'help-xref
'help-function (lambda (fun file)
(require 'find-func)
! ;; Don't use find-function-noselect because it follows
;; aliases (which fails for built-in functions).
! (let ((location
! (if (bufferp file) (cons file fun)
! (find-function-search-for-symbol fun nil file))))
(pop-to-buffer (car location))
(goto-char (cdr location))))
'help-echo (purecopy "mouse-2, RET: find function's definition"))
***************
*** 197,204 ****
(list (cons (selected-window) help-return-method))))
! ;;; Grokking cross-reference information in doc strings and
! ;;; hyperlinking it.
;; This may have some scope for extension and the same or something
;; similar should be done for widget doc strings, which currently use
--- 198,205 ----
(list (cons (selected-window) help-return-method))))
! ;; Grokking cross-reference information in doc strings and
! ;; hyperlinking it.
;; This may have some scope for extension and the same or something
;; similar should be done for widget doc strings, which currently use
***************
*** 220,226 ****
The words preceding the quoted symbol can be used in doc strings to
distinguish references to variables, functions and symbols.")
! (defconst help-xref-mule-regexp nil
"Regexp matching doc string references to MULE-related keywords.
It is usually nil, and is temporarily bound to an appropriate regexp
--- 221,227 ----
The words preceding the quoted symbol can be used in doc strings to
distinguish references to variables, functions and symbols.")
! (defvar help-xref-mule-regexp nil
"Regexp matching doc string references to MULE-related keywords.
It is usually nil, and is temporarily bound to an appropriate regexp
***************
*** 245,255 ****
because we want to record the \"previous\" position of point so we can
restore it properly when going back."
(with-current-buffer (help-buffer)
! (if interactive-p
! ;; Why do we want to prevent the user from going back ?? -stef
! (setq help-xref-stack nil)
! (when help-xref-stack-item
! (push (cons (point) help-xref-stack-item) help-xref-stack)))
(setq help-xref-stack-item item)))
(defvar help-xref-following nil
--- 246,257 ----
because we want to record the \"previous\" position of point so we can
restore it properly when going back."
(with-current-buffer (help-buffer)
! (when help-xref-stack-item
! (push (cons (point) help-xref-stack-item) help-xref-stack))
! (when interactive-p
! (let ((tail (nthcdr 10 help-xref-stack)))
! ;; Truncate the stack.
! (if tail (setcdr tail nil))))
(setq help-xref-stack-item item)))
(defvar help-xref-following nil
***************
*** 261,266 ****
--- 263,275 ----
(current-buffer)
(get-buffer-create "*Help*"))))
+ (defvar help-xref-override-view-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map view-mode-map)
+ (define-key map "\r" nil)
+ map)
+ "Replacement keymap for `view-mode' in help buffers.")
+
;;;###autoload
(defun help-make-xrefs (&optional buffer)
"Parse and hyperlink documentation cross-references in the given BUFFER.
***************
*** 406,416 ****
(current-buffer))))
;; View mode steals RET from us.
(set (make-local-variable 'minor-mode-overriding-map-alist)
! (list (cons 'view-mode
! (let ((map (make-sparse-keymap)))
! (set-keymap-parent map view-mode-map)
! (define-key map "\r" 'help-follow)
! map))))
(set-buffer-modified-p old-modified))))
;;;###autoload
--- 415,421 ----
(current-buffer))))
;; 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))))
;;;###autoload
***************
*** 517,523 ****
(help-setup-xref (list #'help-xref-interned symbol) nil)))))))
! ;;; Navigation/hyperlinking with xrefs
(defun help-follow-mouse (click)
"Follow the cross-reference that you CLICK on."
--- 522,528 ----
(help-setup-xref (list #'help-xref-interned symbol) nil)))))))
! ;; Navigation/hyperlinking with xrefs
(defun help-follow-mouse (click)
"Follow the cross-reference that you CLICK on."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/help-mode.el,
Stefan Monnier <=