]> git.eshelyaron.com Git - emacs.git/commitdiff
(texinfo-format-scan): Signal an error if
authorEli Zaretskii <eliz@gnu.org>
Thu, 22 Feb 2001 13:30:58 +0000 (13:30 +0000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 22 Feb 2001 13:30:58 +0000 (13:30 +0000)
@ follows an accent command such as @'.  Support optional braces
in commands that insert accents, like makeinfo does.

lisp/ChangeLog
lisp/textmodes/texinfmt.el

index cb469756610385a91952cdc482e10804d6efeb18..dd927559b4d3d25b90bb5d17fed46fe146b2a90e 100644 (file)
@@ -1,3 +1,9 @@
+2001-02-22  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * textmodes/texinfmt.el (texinfo-format-scan): Signal an error if
+       @ follows an accent command such as @'.  Support optional braces
+       in commands that insert accents, like makeinfo does.
+
 2001-02-22  Gerd Moellmann  <gerd@gnu.org>
 
        * startup.el (fancy-splash-text): Add a line for ordering
index 822631e039becf737fb7f6dff728cdf2e8029df4..0441602b3a753ad21873430ce69a66919afee3ed 100644 (file)
@@ -868,7 +868,23 @@ lower types.")
          ;; Otherwise: the other characters are simply quoted.  Delete the @.
          (t
          (delete-char -1)
-         (forward-char 1)))
+        ;; Be compatible with makeinfo: if @' and its ild are
+        ;; followed by a @ without a brace, barf.
+        (if (looking-at "[\"'^`~=]")
+            (progn
+              (if (= (char-after (1+ (point))) ?@)
+                  (error "Use braces to give a command as an argument to @%c"
+                         (following-char)))
+              (forward-char 1)
+              ;; @' etc. can optionally accept their argument in
+              ;; braces (makeinfo supports that).
+              (when (looking-at "{")
+                (let ((start (point)))
+                  (forward-list 1)
+                  (delete-char -1)
+                  (goto-char start)
+                  (delete-char 1))))
+          (forward-char 1))))
       ;; @ is followed by a command-word; find the end of the word.
       (setq texinfo-command-start (1- (point)))
       (if (= (char-syntax (following-char)) ?w)