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

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

Redifine make-backup-file-name has no effect


From: Jan Djarv
Subject: Redifine make-backup-file-name has no effect
Date: Fri, 26 Oct 2001 10:23:14 +0200 (MEST)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (sparc-sun-solaris2.8, Motif Version 2.1.0)
 of 2001-10-24 on lws278
configured using `configure  --prefix=/home/epljadj 
--prefix=/home/wbts/users/epljadj/gnu --with-x-toolkit=motif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: iso_8859_1
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: nil

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

In emacs 19 and 20 theses functions worked fine to make backup file name to be
.BAK.file instead of file~.  In 21.1 these do nothing, file~ is always created
regardless of what make-backup-file-name is or what the variable
make-backup-file-name-function is set to.

(defun make-backup-file-name (file)
  "Create the non-numeric backup file name for FILE. This is a separate
function so you can redefine it for customization."
  (if buffer-file-name
      (concat (file-name-directory buffer-file-name)
              ".BAK."
              (file-name-nondirectory buffer-file-name))
    (expand-file-name (concat ".BAK.%" (buffer-name) "#"))))

(defun backup-file-name-p (file)
  "Return non-nil if FILE is a backup file name (numeric or not).
This is a separate function so you can redefine it for customization.
You may need to redefine file-name-sans-versions as well."
  (eq (string-match "^.BAK." file) 0))

  Jan D.



Recent input:
- r e g i o <tab> <return> <switch-frame> <help-echo> 
C-x C-f s l <tab> <return> SPC <backspace> C-x C-s 
C-x k <return> <help-echo> <switch-frame> <down-mouse-1> 
<mouse-movement> <mouse-movement> <mouse-1> C-h v m 
a k e - b a <tab> <return> s <tab> <return> C-h v m 
a k e - b a <tab> - <tab> <return> <help-echo> <help-echo> 
<down-mouse-2> <mouse-2> C-h f m a k e - b a c k u 
p - f i l <tab> <return> <switch-frame> <switch-frame> 
<help-echo> <menu-bar> <help-menu> <emacs-problems> 
<switch-frame> <switch-frame> C-s b a c k u p C-a <help-echo> 
<help-echo> <menu-bar> <help-menu> <report-emacs-b
ug>

Recent messages:
Quit
Wrote /vobs/wbts/cps/slh/test/slh_test.c [2 times]
Making completion list...
Loading view...done
Loading pp...done
Loading 
/home/wbts/users/epljadj/gnu/libexec/emacs/21.1/sparc-sun-solaris2.8/fns-21.1.1.el
 (source)...done
Type C-x 1 to remove help window.  C-M-v to scroll the help.
Type C-h for help, h for commands, q to quit.
Mark saved where search started
Loading emacsbug...done



reply via email to

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