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

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

write-abbrev-file


From: Andreas Roehler
Subject: write-abbrev-file
Date: Fri, 05 May 2006 20:30:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060411

Two related bugs in abbrev.el

M-x `edit-abbrevs', narrowing the buffer, calling `edit-abbrevs-redefine'.

Then `write-abbrev-file' kills all abbrevs
except the visible one in the narrowed buffer.

At least this behavior misses the Manual where is
written: "writes a description of all current abbrev
definitions".

Happens even if the buffer has been widened before, but
not, if `edit-abbrevs-redefine' has been called again.

Bug was remarked only with an explicit `write-abbrev-file' after
`edit-abbrevs-redefine', but not forcibly (maybe sometimes also?) if
Emacs was closed and abbrevs written at this occasion.

Proposed fix below.

Also with this fix installed, the question `save-abbrevs?' while closing
Emacs  has to be denied if `write-abbrev-file' was called in this
session; otherwise all abbrevs will be deleted and only void abbrev
tables saved.

This seems an other bug.

diff -c /home/speck/progarbeit/weitere/easy/abbrev.el ~/emacs/lisp/abbrev.el
*** /home/speck/progarbeit/weitere/easy/abbrev.el       2006-05-05
20:00:16.000000000 +0200
--- /home/speck/emacs/lisp/abbrev.el    2006-04-30 08:58:26.000000000 +0200
***************
*** 227,235 ****
                    abbrev-file-name)))
    (or (and file (> (length file) 0))
        (setq file abbrev-file-name))
-   ;; 20060505 address@hidden
-   (edit-abbrevs-redefine)
-   ;; end of inserted section
    (let ((coding-system-for-write 'emacs-mule))
      (with-temp-file file
        (insert ";;-*-coding: emacs-mule;-*-\n")
--- 227,232 ----

In GNU Emacs 22.0.50.2 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2006-02-23 on kiste
X server distributor `The X.Org Foundation', version 11.0.60802000
Important settings:
  value of $LC_ALL: C
  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: de_DE.UTF-8
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Edit-Abbrevs

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

Recent input:
M-x e d i t - a b b r e v s <return> C-SPC C-s m o
d e - a b b C-s <up> C-x n n y M-< <down> <down> <down>
<right> <right> <right> t C-x C-s M-x w r i t e - a
b b r e <tab> <return> <return> M-x r e o p <backspace>
<backspace> p o r t - e m <tab> <return>

Recent messages:
For information about the GNU Project and its goals, type C-h C-p.
Mark set
Mark saved where search started
Loading novice...done
Loading help-mode (compiled; note, source file is newer)...done
Type y, n, ! or SPC (the space bar):
Mark set
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done




reply via email to

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