From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.50; Abbreviations in mail cause error Date: Wed, 31 Oct 2007 11:45:32 -0400 Message-ID: References: <5172-Wed31Oct2007081410+0000-jpff@codemist.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193848351 16721 80.91.229.12 (31 Oct 2007 16:32:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Oct 2007 16:32:31 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: jpff Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 31 17:32:33 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1InGUL-0002NZ-T0 for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2007 17:32:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InGUC-00020H-4W for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2007 12:32:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1InGTA-0001CY-KH for emacs-devel@gnu.org; Wed, 31 Oct 2007 12:31:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1InGT8-0001A4-IT for emacs-devel@gnu.org; Wed, 31 Oct 2007 12:31:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InGT7-00018T-Vl for emacs-devel@gnu.org; Wed, 31 Oct 2007 12:31:02 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1InFlI-0000tz-PF for emacs-devel@gnu.org; Wed, 31 Oct 2007 11:45:44 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1InFlI-0002OH-A5 for emacs-pretest-bug@gnu.org; Wed, 31 Oct 2007 11:45:44 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1InFl8-0000pf-Mc for emacs-pretest-bug@gnu.org; Wed, 31 Oct 2007 11:45:40 -0400 Original-Received: from tomts16.bellnexxia.net ([209.226.175.4] helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1InFl7-0000op-Op for emacs-pretest-bug@gnu.org; Wed, 31 Oct 2007 11:45:34 -0400 Original-Received: from pastel.home ([74.12.208.145]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071031154532.FHHO574.tomts16-srv.bellnexxia.net@pastel.home> for ; Wed, 31 Oct 2007 11:45:32 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5EA337F9F; Wed, 31 Oct 2007 11:45:32 -0400 (EDT) In-Reply-To: <5172-Wed31Oct2007081410+0000-jpff@codemist.co.uk> (jpff@codemist.co.uk's message of "Wed\, 31 Oct 2007 08\:14\:10 +0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82230 gmane.emacs.pretest.bugs:20214 Archived-At: > I try to send an e-mail (using mail in sendmail.el) and type a name > that I expect to be looked up in the .mailrc file. The name s > expanded but then I get Thanks. I believe the patch below will fix the two bugs into which you bumped. Stefan Index: abbrev.el =================================================================== RCS file: /sources/emacs/emacs/lisp/abbrev.el,v retrieving revision 1.57 diff -u -u -b -r1.57 abbrev.el --- abbrev.el 30 Oct 2007 01:39:16 -0000 1.57 +++ abbrev.el 31 Oct 2007 15:45:11 -0000 @@ -649,7 +649,7 @@ (let ((tables (abbrev--active-tables table)) sym) (while (and tables (not (symbol-value sym))) - (let ((table (pop tables)) + (let* ((table (pop tables)) (case-fold (not (abbrev-table-get table :case-fixed)))) (setq tables (append (abbrev-table-get table :parents) tables)) ;; In case the table doesn't set :case-fixed but some of the @@ -693,9 +693,10 @@ (delete-region start (1+ start))) (skip-syntax-backward " ") (setq end (point)) + (when (> end start) (setq name (buffer-substring start end)) (goto-char pos) ; Restore point. - (list (abbrev-symbol name tables) name start end)) + (list (abbrev-symbol name tables) name start end))) (while (and tables (not (car res))) (let* ((table (pop tables))