aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-04-22 03:19:43 +0000
committerRichard M. Stallman1998-04-22 03:19:43 +0000
commit35d2d241554de1928235edabc848419cc088e02c (patch)
tree381f3002f5cce50950fb58f86c9e8f422e0a2306
parentd7c0adec0a15fee33b62a2449254ef058bfb6c37 (diff)
downloademacs-35d2d241554de1928235edabc848419cc088e02c.tar.gz
emacs-35d2d241554de1928235edabc848419cc088e02c.zip
(Info-fontify-node): For menu items, use info-xref font.
Use info-node font for the node's own name, and do not make it mouse-sensitive. (Info-find-node): Update Info-history after switching buffer. (info): If no arg, and *info* buffer exists, just go to it and don't alter it.
-rw-r--r--lisp/info.el44
1 files changed, 25 insertions, 19 deletions
diff --git a/lisp/info.el b/lisp/info.el
index c1fb110a2bc..95875900906 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -286,10 +286,12 @@ The top-level Info directory is made by combining all the files named `dir'
286in all the directories in that path." 286in all the directories in that path."
287 (interactive (if current-prefix-arg 287 (interactive (if current-prefix-arg
288 (list (read-file-name "Info file name: " nil nil t)))) 288 (list (read-file-name "Info file name: " nil nil t))))
289 (pop-to-buffer "*info*")
290 (if file 289 (if file
291 (Info-goto-node (concat "(" file ")")) 290 (progn (pop-to-buffer "*info*")
292 (Info-directory))) 291 (Info-goto-node (concat "(" file ")")))
292 (if (get-buffer "*info*")
293 (pop-to-buffer "*info*")
294 (Info-directory))))
293 295
294;;;###autoload 296;;;###autoload
295(defun info-standalone () 297(defun info-standalone ()
@@ -353,16 +355,16 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
353 (if found 355 (if found
354 (setq filename found) 356 (setq filename found)
355 (error "Info file %s does not exist" filename)))) 357 (error "Info file %s does not exist" filename))))
356 ;; Record the node we are leaving.
357 (if (and Info-current-file (not no-going-back))
358 (setq Info-history
359 (cons (list Info-current-file Info-current-node (point))
360 Info-history)))
361 ;; Go into info buffer. 358 ;; Go into info buffer.
362 (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) 359 (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*"))
363 (buffer-disable-undo (current-buffer)) 360 (buffer-disable-undo (current-buffer))
364 (or (eq major-mode 'Info-mode) 361 (or (eq major-mode 'Info-mode)
365 (Info-mode)) 362 (Info-mode))
363 ;; Record the node we are leaving.
364 (if (and Info-current-file (not no-going-back))
365 (setq Info-history
366 (cons (list Info-current-file Info-current-node (point))
367 Info-history)))
366 (widen) 368 (widen)
367 (setq Info-current-node nil) 369 (setq Info-current-node nil)
368 (unwind-protect 370 (unwind-protect
@@ -1997,16 +1999,20 @@ The alist key is the character the title is underlined with (?*, ?= or ?-)."
1997 (save-excursion 1999 (save-excursion
1998 (let ((buffer-read-only nil)) 2000 (let ((buffer-read-only nil))
1999 (goto-char (point-min)) 2001 (goto-char (point-min))
2000 (if (looking-at "^File: [^,: \t]+,?[ \t]+") 2002 (when (looking-at "^File: [^,: \t]+,?[ \t]+")
2001 (progn 2003 (goto-char (match-end 0))
2002 (goto-char (match-end 0)) 2004 (while
2003 (while 2005 (looking-at "[ \t]*\\([^:, \t\n]+\\):[ \t]+\\([^:,\t\n]+\\),?")
2004 (looking-at "[ \t]*[^:, \t\n]+:[ \t]+\\([^:,\t\n]+\\),?") 2006 (goto-char (match-end 0))
2005 (goto-char (match-end 0)) 2007 (if (save-excursion
2006 (put-text-property (match-beginning 1) (match-end 1) 2008 (goto-char (match-beginning 1))
2007 'face 'info-xref) 2009 (save-match-data (looking-at "Node:")))
2008 (put-text-property (match-beginning 1) (match-end 1) 2010 (put-text-property (match-beginning 2) (match-end 2)
2009 'mouse-face 'highlight)))) 2011 'face 'info-node)
2012 (put-text-property (match-beginning 2) (match-end 2)
2013 'face 'info-xref)
2014 (put-text-property (match-beginning 2) (match-end 2)
2015 'mouse-face 'highlight))))
2010 (goto-char (point-min)) 2016 (goto-char (point-min))
2011 (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\)$" 2017 (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\)$"
2012 nil t) 2018 nil t)
@@ -2040,7 +2046,7 @@ The alist key is the character the title is underlined with (?*, ?= or ?-)."
2040 (1+ (match-beginning 0)) 2046 (1+ (match-beginning 0))
2041 'face 'info-menu-5)) 2047 'face 'info-menu-5))
2042 (put-text-property (match-beginning 1) (match-end 1) 2048 (put-text-property (match-beginning 1) (match-end 1)
2043 'face 'info-node) 2049 'face 'info-xref)
2044 (put-text-property (match-beginning 1) (match-end 1) 2050 (put-text-property (match-beginning 1) (match-end 1)
2045 'mouse-face 'highlight)))) 2051 'mouse-face 'highlight))))
2046 (set-buffer-modified-p nil)))) 2052 (set-buffer-modified-p nil))))