[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/info.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/info.el |
Date: |
Wed, 12 Jun 2002 11:50:15 -0400 |
Index: emacs/lisp/info.el
diff -c emacs/lisp/info.el:1.307 emacs/lisp/info.el:1.308
*** emacs/lisp/info.el:1.307 Wed Jun 12 08:20:17 2002
--- emacs/lisp/info.el Wed Jun 12 11:50:15 2002
***************
*** 2580,2585 ****
--- 2580,2613 ----
(put-text-property (match-beginning 1) (match-end 1)
'font-lock-face 'info-menu-header)))))
+ (defvar Info-next-link-keymap
+ (let ((keymap (make-sparse-keymap)))
+ (define-key keymap [header-line mouse-1] 'Info-next)
+ (define-key keymap [header-line mouse-2] 'Info-next)
+ (define-key keymap [header-line down-mouse-1] 'ignore)
+ (define-key keymap [mouse-2] 'Info-next)
+ keymap)
+ "Keymap to put on the Next link in the text or the header line.")
+
+ (defvar Info-prev-link-keymap
+ (let ((keymap (make-sparse-keymap)))
+ (define-key keymap [header-line mouse-1] 'Info-prev)
+ (define-key keymap [header-line mouse-2] 'Info-prev)
+ (define-key keymap [header-line down-mouse-1] 'ignore)
+ (define-key keymap [mouse-2] 'Info-prev)
+ keymap)
+ "Keymap to put on the Prev link in the text or the header line.")
+
+
+ (defvar Info-up-link-keymap
+ (let ((keymap (make-sparse-keymap)))
+ (define-key keymap [header-line mouse-1] 'Info-up)
+ (define-key keymap [header-line mouse-2] 'Info-up)
+ (define-key keymap [header-line down-mouse-1] 'ignore)
+ (define-key keymap [mouse-2] 'Info-up)
+ keymap)
+ "Keymap to put on the Up link in the text or the header line.")
+
(defun Info-fontify-node ()
;; Only fontify the node if it hasn't already been done. [We pass in
;; LIMIT arg to `next-property-change' because it seems to search past
***************
*** 2607,2639 ****
(concat "Go to node "
(buffer-substring nbeg nend)))
;; Always set up the text property keymap.
! ;; It will be used either in the buffer
;; or copied in the header line.
! (let ((fun (cdr (assoc tag '(("Prev" . Info-prev)
! ("Next" . Info-next)
! ("Up" . Info-up))))))
! (when fun
! (let ((keymap (make-sparse-keymap)))
! (define-key keymap [header-line mouse-1] fun)
! (define-key keymap [header-line mouse-2] fun)
! (define-key keymap [header-line down-mouse-1] 'ignore)
! (define-key keymap [mouse-2] fun)
! (put-text-property tbeg nend 'keymap keymap))))
! )))
(goto-char (point-min))
! (let* ((header-end (save-excursion (end-of-line) (point)))
! ;; If we find neither Next: nor Prev: link, show the entire
! ;; node header. Otherwise, don't show the File: and Node:
! ;; parts, to avoid wasting precious space on information that
! ;; is available in the mode line.
! (header-beg (if (re-search-forward
! "\\(next\\|prev[ious]*\\): "
! header-end t)
! (match-beginning 1)
! (point))))
(put-text-property (point-min) (1+ (point-min))
! 'header-line
! (buffer-substring header-beg header-end))))
(goto-char (point-min))
(while (re-search-forward "\n\\([^
\t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$"
nil t)
--- 2635,2678 ----
(concat "Go to node "
(buffer-substring nbeg nend)))
;; Always set up the text property keymap.
! ;; It will either be used in the buffer
;; or copied in the header line.
! (cond ((equal tag "Prev")
! (put-text-property tbeg nend 'keymap
! Info-prev-link-keymap))
! ((equal tag "Next")
! (put-text-property tbeg nend 'keymap
! Info-next-link-keymap))
! ((equal tag "Up")
! (put-text-property tbeg nend 'keymap
! Info-up-link-keymap))))))
(goto-char (point-min))
! (let ((header-end (save-excursion (end-of-line) (point)))
! header)
! ;; If we find neither Next: nor Prev: link, show the entire
! ;; node header. Otherwise, don't show the File: and Node:
! ;; parts, to avoid wasting precious space on information that
! ;; is available in the mode line.
! (if (re-search-forward
! "\\(next\\|up\\|prev[ious]*\\): "
! header-end t)
! (progn
! (goto-char (match-beginning 1))
! (setq header (buffer-substring (point) header-end)))
! (if (re-search-forward "node:[ \t]*[^ \t]+[ \t]*" nil t)
! (setq header
! (concat "No next, prev or up links -- "
! (buffer-substring (point) header-end)))
! (setq header (buffer-substring (point) header-end))))
!
(put-text-property (point-min) (1+ (point-min))
! 'header-line header)
! ;; Hide the part of the first line
! ;; that is in the header, if it is just part.
! (unless (bobp)
! ;; Hide the punctuation at the end, too.
! (skip-chars-backward " \t,")
! (put-text-property (point) header-end 'invisible t))))
(goto-char (point-min))
(while (re-search-forward "\n\\([^
\t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$"
nil t)
- [Emacs-diffs] Changes to emacs/lisp/info.el, Richard M. Stallman, 2002/06/03
- [Emacs-diffs] Changes to emacs/lisp/info.el, Colin Walters, 2002/06/08
- [Emacs-diffs] Changes to emacs/lisp/info.el, Colin Walters, 2002/06/08
- [Emacs-diffs] Changes to emacs/lisp/info.el, Colin Walters, 2002/06/12
- [Emacs-diffs] Changes to emacs/lisp/info.el, Colin Walters, 2002/06/12
- [Emacs-diffs] Changes to emacs/lisp/info.el, Richard M. Stallman, 2002/06/12
- [Emacs-diffs] Changes to emacs/lisp/info.el,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/info.el, Juanma Barranquero, 2002/06/26