From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eric Hanchrow <offby1@blarg.net>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: 23.0.50; wrong-type-argument number-or-marker-p nil while trying to edit abbrevs
Date: Sun, 18 Nov 2007 14:32:24 -0500 [thread overview]
Message-ID: <jwv4pfj1hm7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ve81bz4m.fsf@offby1.atm01.sea.blarg.net> (Eric Hanchrow's message of "Fri, 16 Nov 2007 14:32:09 -0800")
> I saw
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
> define-abbrev([0 0 0 0 0 0 0 0 0 rho 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 ...] "rho" "right-hand opponent" nil 1 nil)
> apply(define-abbrev [0 0 0 0 0 0 0 0 0 rho 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 ...] ("rho" "right-hand opponent" nil 1 nil))
> define-abbrev-table(outline-mode-abbrev-table (("rho" "right-hand opponent" nil 1 nil) ("pseudocode" "pseudo code" nil 0 nil) ("consitute" "constitute" nil 0 nil)))
> define-abbrevs(t)
> edit-abbrevs-redefine()
> call-interactively(edit-abbrevs-redefine)
I installed the patch below which should fix this bug,
Stefan
Index: lisp/abbrev.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/abbrev.el,v
retrieving revision 1.63
diff -u -r1.63 abbrev.el
--- lisp/abbrev.el 16 Nov 2007 18:27:06 -0000 1.63
+++ lisp/abbrev.el 18 Nov 2007 19:31:16 -0000
@@ -524,8 +519,14 @@
(defun clear-abbrev-table (table)
"Undefine all abbrevs in abbrev table TABLE, leaving it empty."
(setq abbrevs-changed t)
- (dotimes (i (length table))
- (aset table i 0)))
+ (let* ((sym (intern-soft "" table)))
+ (dotimes (i (length table))
+ (aset table i 0))
+ ;; Preserve the table's properties.
+ (assert sym)
+ (intern sym table)
+ (abbrev-table-put table :abbrev-table-modiff
+ (1+ (abbrev-table-get table :abbrev-table-modiff)))))
(defun define-abbrev (table name expansion &optional hook &rest props)
"Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK.
next prev parent reply other threads:[~2007-11-18 19:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-16 22:32 23.0.50; wrong-type-argument number-or-marker-p nil while trying to edit abbrevs Eric Hanchrow
2007-11-18 19:32 ` Stefan Monnier [this message]
2007-11-18 22:46 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4pfj1hm7.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-pretest-bug@gnu.org \
--cc=offby1@blarg.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).