emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.50; Abbreviations in mail cause error


From: Stefan Monnier
Subject: Re: 23.0.50; Abbreviations in mail cause error
Date: Wed, 31 Oct 2007 11:45:32 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> 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))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]