Index: ChangeLog =================================================================== RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.14668 diff -u -r1.14668 ChangeLog --- ChangeLog 24 Oct 2008 09:39:28 -0000 1.14668 +++ ChangeLog 24 Oct 2008 17:29:37 -0000 @@ -1,3 +1,8 @@ +2008-10-24 Aaron S. Hawley + + * textmodes/texinfo.el (texinfo-insert-quote): Handle corner + case where point is at the beginning of the buffer. + 2008-10-24 Juanma Barranquero * subr.el (locate-user-emacs-file): New function. Index: textmodes/texinfo.el =================================================================== RCS file: /sources/emacs/emacs/lisp/textmodes/texinfo.el,v retrieving revision 1.122 diff -u -r1.122 texinfo.el --- textmodes/texinfo.el 6 May 2008 04:33:13 -0000 1.122 +++ textmodes/texinfo.el 24 Oct 2008 17:29:37 -0000 @@ -682,7 +682,9 @@ (if (or arg (= (preceding-char) ?\\) (save-excursion - (backward-char (length texinfo-open-quote)) + (if (> (point) (length texinfo-open-quote)) + (backward-char (length texinfo-open-quote)) + (goto-char (point-min))) (when (or (looking-at texinfo-open-quote) (looking-at texinfo-close-quote)) (delete-char (length texinfo-open-quote)) @@ -694,7 +696,8 @@ (setq in-env t))))) (self-insert-command (prefix-numeric-value arg)) (insert - (if (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) + (if (or (bobp) ;; (eq (preceding-char) 0) + (memq (char-syntax (preceding-char)) '(?\( ?> ?\s))) texinfo-open-quote texinfo-close-quote)))))