[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in insert-abbrev-table-description
From: |
Richard Stallman |
Subject: |
Re: bug in insert-abbrev-table-description |
Date: |
Fri, 25 Mar 2005 01:43:30 -0500 |
Then type M-x edit-abbrevs, and then C-x C-s. Emacs returns an error
message
Wrong type argument: integerp, (sys)
Thanks for reporting the bug, but
The reason seems to be the presence of "(sys)" in the buffer, for
system abbreviations. It may be sufficient not to print "(sys)" when
the buffer is filled
why suggest a solution that obviously breaks something else? Perhaps
it's because you took a "cure the immediate symptom" approach to the
problem. That's not the way to approach a software problem, because
it isn't designed to lead to working software.
You can design better solutions by asking yourself questions such as:
Which parts of the system are not doing their jobs according to the
design? Would change XYZ result in a system that fully works? Is
there a problem in the current design, and if so, What design would
give us a system that does its job?
Meanwhile, does this patch things work right?
*** abbrev.el 16 Aug 2004 18:43:55 -0400 1.38
--- abbrev.el 24 Mar 2005 20:05:13 -0500
***************
*** 172,186 ****
(while (and (not (eobp)) (re-search-forward "^(" nil t))
(let* ((buf (current-buffer))
(table (read buf))
! abbrevs name hook exp count)
(forward-line 1)
(while (progn (forward-line 1)
(not (eolp)))
! (setq name (read buf) count (read buf) exp (read buf))
(skip-chars-backward " \t\n\f")
(setq hook (if (not (eolp)) (read buf)))
(skip-chars-backward " \t\n\f")
! (setq abbrevs (cons (list name exp hook count) abbrevs)))
(define-abbrev-table table abbrevs)))))
(defun read-abbrev-file (&optional file quietly)
--- 172,189 ----
(while (and (not (eobp)) (re-search-forward "^(" nil t))
(let* ((buf (current-buffer))
(table (read buf))
! abbrevs name hook exp count sys)
(forward-line 1)
(while (progn (forward-line 1)
(not (eolp)))
! (setq name (read buf) count (read buf))
! (if (equal count '(sys))
! (setq sys t count (read buf)))
! (setq exp (read buf))
(skip-chars-backward " \t\n\f")
(setq hook (if (not (eolp)) (read buf)))
(skip-chars-backward " \t\n\f")
! (setq abbrevs (cons (list name exp hook count sys) abbrevs)))
(define-abbrev-table table abbrevs)))))
(defun read-abbrev-file (&optional file quietly)