aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-12-21 19:31:06 +0000
committerEli Zaretskii2001-12-21 19:31:06 +0000
commit066d7e2e7208455b69d51f3558effb0652c59edb (patch)
tree45dd3675b12aa3ba8a65825fca1ba76d9ebe7fa5
parent4dcd20ec59ac274c4b800c026aa38c437a305844 (diff)
downloademacs-066d7e2e7208455b69d51f3558effb0652c59edb.tar.gz
emacs-066d7e2e7208455b69d51f3558effb0652c59edb.zip
(Info-fontify-node): Remove any local-map text properties left
over from past visits to this node.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/info.el21
2 files changed, 19 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5c1c86df486..0c93b1c45b3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,7 +3,8 @@
3 * info.el (Info-select-node): If Info-use-header-line is nil, set 3 * info.el (Info-select-node): If Info-use-header-line is nil, set
4 header-line-format to nil. 4 header-line-format to nil.
5 (Info-fontify-node): Don't put a keymap text property on the 5 (Info-fontify-node): Don't put a keymap text property on the
6 heading if we are not going to display the header line. 6 heading if we are not going to display the header line. Remove
7 any such text properties left over from past visits to this node.
7 8
8 * ls-lisp.el (insert-directory): Insert the amount of free disk 9 * ls-lisp.el (insert-directory): Insert the amount of free disk
9 space, like files.el's insert-directory does. 10 space, like files.el's insert-directory does.
diff --git a/lisp/info.el b/lisp/info.el
index cc90027a77f..f1a4621fb9d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2578,8 +2578,15 @@ the variable `Info-file-list-for-emacs'."
2578 ;; Only fontify the node if it hasn't already been done. [We pass in 2578 ;; Only fontify the node if it hasn't already been done. [We pass in
2579 ;; LIMIT arg to `next-property-change' because it seems to search past 2579 ;; LIMIT arg to `next-property-change' because it seems to search past
2580 ;; (point-max).] 2580 ;; (point-max).]
2581 (unless (< (next-property-change (point-min) nil (point-max)) 2581 (unless (and (< (next-property-change (point-min) nil (point-max))
2582 (point-max)) 2582 (point-max))
2583 ;; But do put the text properties if the local-map property
2584 ;; is inconsistent with Info-use-header-line's value.
2585 (eq
2586 (= (next-single-property-change
2587 (point-min) 'local-map nil (point-max))
2588 (point-max))
2589 (null Info-use-header-line)))
2583 (save-excursion 2590 (save-excursion
2584 (let ((buffer-read-only nil) 2591 (let ((buffer-read-only nil)
2585 (case-fold-search t)) 2592 (case-fold-search t))
@@ -2610,8 +2617,14 @@ the variable `Info-file-list-for-emacs'."
2610 (let ((keymap (make-sparse-keymap))) 2617 (let ((keymap (make-sparse-keymap)))
2611 (define-key keymap [header-line down-mouse-1] fun) 2618 (define-key keymap [header-line down-mouse-1] fun)
2612 (define-key keymap [header-line down-mouse-2] fun) 2619 (define-key keymap [header-line down-mouse-2] fun)
2613 (put-text-property tbeg nend 'local-map keymap)))) 2620 (put-text-property tbeg nend 'local-map keymap)))))
2614 ))))) 2621 (if (not Info-use-header-line)
2622 ;; In case they switched Info-use-header-line off
2623 ;; in the middle of an Info session, some text
2624 ;; properties may have been left lying around from
2625 ;; past visits of this node. Remove them.
2626 (remove-text-properties tbeg nend '(local-map nil)))
2627 ))))
2615 (goto-char (point-min)) 2628 (goto-char (point-min))
2616 (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$" 2629 (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$"
2617 nil t) 2630 nil t)