bug-gnu-emacs
[Top][All Lists]
Advanced

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

patch: fix read-abbrev-file cant read files produced by write-abbrev-fil


From: Paweł Ostrowski
Subject: patch: fix read-abbrev-file cant read files produced by write-abbrev-file
Date: Thu, 15 Nov 2007 15:46:39 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello,

Emacs version: latest CVS, GNU Emacs 23.0.50.2 (i686-pc-linux-gnu,
               GTK+ Version 2.10.11) of 2007-11-14 on paszaibm

Configured with: --prefix=/home/pasza/tmp/emacs_cvs
Source modifications: no modifications at all

Bug description: read-abbrev-file has problems reading file written
                 with write-abbrev-file. I get the following message:

                 "define-abbrev: Wrong type argument: stringp, po"

                 ..and the following backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp po)
  intern(po [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...])
  define-abbrev([ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] po "Pawe\x51062 Ostrowski" nil 1)
  apply(define-abbrev [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] (po "Pawe\x51062 Ostrowski" nil 
1))
  define-abbrev-table(global-abbrev-table ((po "Pawe\x51062 Ostrowski" nil 1)))
  eval-buffer(#<buffer  *load*> nil "/home/pasza/.abbrevs" nil t)  ; Reading at 
buffer position 408
  load-with-code-conversion("/home/pasza/.abbrevs" "/home/pasza/.abbrevs" nil 
nil)
  load("~/.abbrevs" nil nil)
  read-abbrev-file("~/.abbrevs")
  call-interactively(read-abbrev-file)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)

                 Indeed abbrev names in files produced by
                 write-abbrev-file miss surrounding quotes, e.g.:

(define-abbrev-table 'global-abbrev-table '(    (po "My Expansion"..
                                                 ^^

                 Abbrevs stored in the file are not loaded.
                 Bug may be easily reproduced: define an abbrev,
                 write-abbrev-file, read-abbrev-file.


Fix description: I added (symbol-name) around abbrev symbol in
                 abbrev.el (abbrev--write). Now files produced by
                 write-abbrev-file look like they used to in old
                 emacs (my is 21.4.1) and load without problems.



-- 
Paweł Ostrowski
pasza at zodiac mimuw edu pl

Attachment: abbrevs.patch
Description: Text Data


reply via email to

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