]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-fontify-node): Improve calculation of other-tag.
authorAndreas Schwab <schwab@suse.de>
Thu, 19 Jun 2003 20:56:49 +0000 (20:56 +0000)
committerAndreas Schwab <schwab@suse.de>
Thu, 19 Jun 2003 20:56:49 +0000 (20:56 +0000)
lisp/ChangeLog
lisp/info.el

index 1464a5ff7992085357277994251b769841c86766..8434d40bbe12ed61402d5a6c29a92febba3325f6 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-19  Andreas Schwab  <schwab@suse.de>
+
+       * info.el (Info-fontify-node): Improve calculation of other-tag.
+
 2003-06-19  Stefan Monnier  <monnier@cs.yale.edu>
 
        * progmodes/cc-mode.el (c-mode): Reverting last change.
index 54e6f6d1f02de615f1ae226c7b1898205c7da9b0..ce013c7c8445096a43211bbdcabfd83530d902d5 100644 (file)
@@ -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)