emacs-devel
[Top][All Lists]
Advanced

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

VM 7.07 Bug: Emacs 21.3 vm-keyboard-read-file-name


From: Karl Chen
Subject: VM 7.07 Bug: Emacs 21.3 vm-keyboard-read-file-name
Date: Tue, 19 Nov 2002 23:51:49 -0800

`vm-keyboard-read-file-name' assumes incorrectly that GNU Emacs'
`read-file-name' has only 6 arguments (which was true in earlier Emacs
versions). Emacs 21.3 (CVS) has a 7th argument which is incompatible with
XEmacs' 7th argument. Here is a fixed `vm-keyboard-read-file-name', which in
my opinion is even simpler than the old one.

(defun vm-keyboard-read-file-name (prompt &optional dir default
                                             must-match initial history)
  "Like read-file-name, except HISTORY's value is unaltered."
  (cond (vm-xemacs-p (let ((oldvalue (symbol-value history))
                           ;; evade the XEmacs dialog box, yeccch.
                           (use-dialog-box nil))
                       (unwind-protect
                           (read-file-name prompt dir default must-match 
initial history)
                         (and history (set history oldvalue)))))
        (t (if history
               (let ((file-name-history (symbol-value history)))
                 (read-file-name prompt dir default must-match initial))
             (read-file-name prompt dir default must-match initial)))))



Emacs  : GNU Emacs 21.3.50.10 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-11-12 on quack.quarl.org
Package: VM 7.07

-- 
Karl Chen / address@hidden





reply via email to

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