aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-12-02 03:34:19 +0000
committerGlenn Morris2008-12-02 03:34:19 +0000
commit083654ee81c101fb648680e1071ecb974d447874 (patch)
tree6caf71ed778727f7fb70cbfc0d4682f69f120d92
parent2da6792633e8f6282a291487862404d63e360348 (diff)
downloademacs-083654ee81c101fb648680e1071ecb974d447874.tar.gz
emacs-083654ee81c101fb648680e1071ecb974d447874.zip
Aaron S. Hawley <aaronh at garden.org>
(texinfo-insert-quote): Handle corner case where point is at the beginning of the buffer. (Bug#1239)
-rw-r--r--lisp/textmodes/texinfo.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 5f6724fea0e..ba61ab54008 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -682,7 +682,9 @@ With prefix argument or inside @code or @example, inserts a plain \"."
682 (if (or arg 682 (if (or arg
683 (= (preceding-char) ?\\) 683 (= (preceding-char) ?\\)
684 (save-excursion 684 (save-excursion
685 (backward-char (length texinfo-open-quote)) 685 (if (> (point) (length texinfo-open-quote))
686 (backward-char (length texinfo-open-quote))
687 (goto-char (point-min)))
686 (when (or (looking-at texinfo-open-quote) 688 (when (or (looking-at texinfo-open-quote)
687 (looking-at texinfo-close-quote)) 689 (looking-at texinfo-close-quote))
688 (delete-char (length texinfo-open-quote)) 690 (delete-char (length texinfo-open-quote))
@@ -694,7 +696,8 @@ With prefix argument or inside @code or @example, inserts a plain \"."
694 (setq in-env t))))) 696 (setq in-env t)))))
695 (self-insert-command (prefix-numeric-value arg)) 697 (self-insert-command (prefix-numeric-value arg))
696 (insert 698 (insert
697 (if (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) 699 (if (or (bobp)
700 (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)))
698 texinfo-open-quote 701 texinfo-open-quote
699 texinfo-close-quote))))) 702 texinfo-close-quote)))))
700 703