all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 23.0.50; wrong-type-argument number-or-marker-p nil while trying to edit abbrevs
@ 2007-11-16 22:32 Eric Hanchrow
  2007-11-18 19:32 ` Stefan Monnier
  2007-11-18 22:46 ` Richard Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Hanchrow @ 2007-11-16 22:32 UTC (permalink / raw)
  To: emacs-pretest-bug

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

  M-x read-abb TAB RET ~/.abb TAB RET
  M-x edit-abb TAB RET

Then I searched forward for one particular abbrev, deleted it with
M-d, typed another word, and hit C-c C-c.

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)


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/local/src/emacs-cvs-trunk/etc/DEBUG for instructions.


In GNU Emacs 23.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2007-11-16 on debian
configured using `configure  '--enable-maintainer-mode' '--with-xpm=no' '--with-jpeg=no' '--with-gif=no' '--with-tiff=no' '--with-xft' '--with-gtk' '--enable-font-backend''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
ESC x o p e n - d r TAB RET d r i b b l e RET ESC x 
r e a d - a b b TAB RET ~ / . a b b TAB RET ESC x e 
d i t - a b b TAB RET C-s " b o C-e ESC b ESC d b u 
m m e r C-c C-c ESC x t o g g l e - d e TAB e TAB RET 
C-c C-c ESC x r e p o r t - e m TAB RET

Recent messages:
("/usr/local/src/emacs-cvs-trunk/src/emacs" "-Q")
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading /home/erich/.abbrev_defs...done
Mark saved where search started
apply: Wrong type argument: number-or-marker-p, nil
Debug on Error enabled globally
Entering debugger...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 23.0.50; wrong-type-argument number-or-marker-p nil while trying to edit abbrevs
  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
  2007-11-18 22:46 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2007-11-18 19:32 UTC (permalink / raw)
  To: Eric Hanchrow; +Cc: emacs-pretest-bug

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 23.0.50; wrong-type-argument number-or-marker-p nil while trying to edit abbrevs
  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
@ 2007-11-18 22:46 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2007-11-18 22:46 UTC (permalink / raw)
  To: Eric Hanchrow; +Cc: emacs-pretest-bug

    Please describe exactly what actions triggered the bug
    and the precise symptoms of the bug:

      M-x read-abb TAB RET ~/.abb TAB RET
      M-x edit-abb TAB RET

What is in the file ~/.abbrev_defs?
That information is a necessary part of a self-contained
test case, which is what we need to debug this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-18 22:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-11-18 22:46 ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.