From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Aaron S. Hawley" Newsgroups: gmane.emacs.bugs Subject: bug#1239: PATCH: Fix corner case of texinfo-insert-quote Date: Fri, 24 Oct 2008 13:40:46 -0400 Message-ID: <4902089E.9030302@garden.org> Reply-To: "Aaron S. Hawley" , 1239@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080408080708000509060700" X-Trace: ger.gmane.org 1224871857 13618 80.91.229.12 (24 Oct 2008 18:10:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 18:10:57 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 20:11:58 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KtR8A-0004tH-Hf for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 20:11:27 +0200 Original-Received: from localhost ([127.0.0.1]:57628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtR73-0001NH-Qb for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 14:10:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtR6y-0001LY-Su for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:10:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtR6w-0001Kb-NR for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:10:12 -0400 Original-Received: from [199.232.76.173] (port=52491 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtR6w-0001KN-Ky for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:10:10 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42621) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KtR6v-0004ir-WF for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:10:10 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9OIA2rL011404; Fri, 24 Oct 2008 11:10:02 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9OHo2ED005936; Fri, 24 Oct 2008 10:50:02 -0700 X-Loop: don@donarmstrong.com Resent-From: "Aaron S. Hawley" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 24 Oct 2008 17:50:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1239 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12248700754701 (code B ref -1); Fri, 24 Oct 2008 17:50:02 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 24 Oct 2008 17:41:15 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9OHfAvs004695 for ; Fri, 24 Oct 2008 10:41:12 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtQes-0005fS-SM for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 13:41:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtQep-0005fF-E2 for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 13:41:09 -0400 Original-Received: from [199.232.76.173] (port=53404 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtQep-0005fC-7w for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 13:41:07 -0400 Original-Received: from host13.natgard1.cust.sover.net ([207.136.219.173]:52137 helo=marigold.garden.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtQeo-000383-Di for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 13:41:06 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by marigold.garden.org (Postfix) with ESMTP id 363C5681A9 for ; Fri, 24 Oct 2008 13:41:01 -0400 (EDT) X-Virus-Scanned: amavisd-new at garden.org Original-Received: from marigold.garden.org ([127.0.0.1]) by localhost (marigold.garden.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k1K6wUpOGp3j for ; Fri, 24 Oct 2008 13:40:55 -0400 (EDT) Original-Received: from localhost.localdomain (unknown [192.168.219.109]) by marigold.garden.org (Postfix) with ESMTP id 99522680EE for ; Fri, 24 Oct 2008 13:40:55 -0400 (EDT) User-Agent: Thunderbird 2.0.0.16 (X11/20080723) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 24 Oct 2008 14:10:12 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21872 Archived-At: This is a multi-part message in MIME format. --------------080408080708000509060700 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Patch is attached and in-line. It would be nice to have this, in case one tries to do quotation mark manipulation with with-temp-buffer. Thanks for Emacs, /a 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))))) --------------080408080708000509060700 Content-Type: text/plain; name="texinfo.el-bobp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="texinfo.el-bobp.diff" 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))))) --------------080408080708000509060700--