From fb020fe894db0dfa6d6d2b180a1cf8b489bfccba Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 19 Jun 2003 20:56:49 +0000 Subject: [PATCH] (Info-fontify-node): Improve calculation of other-tag. --- lisp/ChangeLog | 4 ++++ lisp/info.el | 20 +++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1464a5ff799..8434d40bbe1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2003-06-19 Andreas Schwab + + * info.el (Info-fontify-node): Improve calculation of other-tag. + 2003-06-19 Stefan Monnier * progmodes/cc-mode.el (c-mode): Reverting last change. diff --git a/lisp/info.el b/lisp/info.el index 54e6f6d1f02..ce013c7c844 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2872,13 +2872,19 @@ the variable `Info-file-list-for-emacs'." (goto-char start) (skip-syntax-backward " ") (setq other-tag - (cond - ((<= (point) (point-min)) - "See ") - ((memq (char-before) '(nil ?\. ?! )) - "See ") - ((memq (char-before) '( ?\( ?\[ ?\{ ?\, ?\; ?\: )) - "see "))) + (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 "))) (goto-char next)) (if hide-tag (add-text-properties (match-beginning 1) (match-end 1) -- 2.39.2