It looks like read-file-name is behaving as documented for both emacs
21 and emacs 22. What I missed before is that the two documented
behavior is different for the two. So the problem seems to be that
the change in behavior of read-file-name was not documented in NEWS
file.
Emacs 22 doc-string says:
If the user exits with an empty minibuffer, this function returns
an empty string. (This can only happen if the user erased the
pre-inserted contents or if `insert-default-directory' is nil.)
Emacs 21 doc-string says:
Default name to DEFAULT-FILENAME if user enters a null string.
So emacs 22 returns "" if the user simply hits RETURN.
Emacs 21 returns default-name argument instead.
I guess I now need to make elisp code changes in igrep.el and all
other elips files to reflect the change in behavior of read-file-name.
Richard Y. Kim writes:
>
>
> Evaluating following expression then hitting ENTER when prompted
> results in incorrect value of "" rather than the expected value of
> ".el". For example, emacs version 21.4 returns "*.el", but
> emacs 22 that I compiled using the latest code from cvs as of today
> 2006/12/26 results in "".
>
> (let ((insert-default-directory nil))
> (read-file-name "Enter [default: *.el]: " nil "*.el" nil nil))
>
> I tracked this down after noticing that igrep.el package which I've
> been using for many years on emacs 19, 20, and 21 suddenly broke when
> I tried to use it on emacs 22.
>
>
>
>
> In GNU Emacs 22.0.92.1 (i686-pc-linux-gnu, GTK+ Version 2.10.6)
> of 2006-12-26 on richard-laptop
> X server distributor `The X.Org Foundation', version 11.0.70101000
> configured using `configure '--with-x-toolkit=gtk''
>
> 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: Apropos
>
> Minor modes in effect:
> display-time-mode: t
> tooltip-mode: t
> mouse-wheel-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
> auto-compression-mode: t
> line-number-mode: t
>
> Recent input:
> ESC C-b ESC w ESC >C-y
> C-x C-e ESC x s u b m i C-a
> C-k b u g C-a C-k e m a C-a C-k b
> u g
> s u b m h C-g C-h a b u g C-x
> o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-v C-s s u b
> m i t C-s C-e ESC x e d e b s u b m b u
>
>
> Recent messages:
> Mark set [2 times]
> ""
> Mark set [3 times]
> ""
> Making completion list...
> Quit [2 times]
> Loading apropos...done
> Type C-x 1 to remove help window.
> Mark saved where search started
> Loading emacsbug...done
>
>
>
___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug