From d75baf12216600cbe35b927f0c1b3d60cd8862fe Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 26 Oct 2005 16:39:23 +0000 Subject: [PATCH] (Info-fontify-node): Fix detection of sentence-break before *Note. --- lisp/ChangeLog | 7 ++++++- lisp/info.el | 20 +++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3f35fff8a33..1aec594adbe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,11 @@ +2005-10-26 Richard M. Stallman + + * info.el (Info-fontify-node): Fix detection of sentence-break + before *Note. + 2005-10-26 Romain Francoise - * smerge-mode.el: Add 'tools' to file keywords. + * smerge-mode.el: Add `tools' to file keywords. 2005-10-26 Nick Roberts diff --git a/lisp/info.el b/lisp/info.el index c94e4121dc8..ec74160188a 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3736,20 +3736,18 @@ the variable `Info-file-list-for-emacs'." ;; *Note is often used where *note should have been (goto-char start) (skip-syntax-backward " ") + (when (memq (char-before) '(?\( ?\[ ?\{)) + ;; Check whether the paren is preceded by + ;; an end of sentence + (skip-syntax-backward " (")) (setq other-tag (cond ((memq (char-before) '(nil ?\. ?! ??)) "See ") - ((memq (char-before) '(?\, ?\; ?\: ?-)) - "see ") - ((memq (char-before) '(?\( ?\[ ?\{)) - ;; Check whether the paren is preceded by - ;; an end of sentence - (skip-syntax-backward " (") - (if (memq (char-before) '(nil ?\. ?! ??)) - "See " - "see ")) - ((save-match-data (looking-at "\n\n")) - "See ")))) + ((save-match-data + (save-excursion + (search-forward "\n\n" start t))) + "See ") + (t "see ")))) (goto-char next) (add-text-properties (match-beginning 1) -- 2.39.5