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

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

bug#28258: 26.0.50; [PATCH] Let file-name-base succeed when buffer-file-


From: Glenn Morris
Subject: bug#28258: 26.0.50; [PATCH] Let file-name-base succeed when buffer-file-name is nil
Date: Mon, 18 Sep 2017 20:41:52 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Philipp Stephani wrote:

> Changing from raising an error to returning nil is a breaking change:
> callers currently can rely on the return value being never nil, and can
> rely on errors being raised. Changing this would break these assumptions.
> Even ignoring that, I think raising an error is the right thing to do:
> unless given a filename, the function can't fulfil its promise, and raising
> an error is the most appropriate reaction to this. (There are already way
> too many Elisp functions that silently ignore errorneous situations.)

I think you've summarized things very well.

> I do agree that the calling convention of `file-name-base' is odd. How
> about making the argument mandatory (initially only by changing the
> advertised calling convention and the docstring)?

Sounds good to me.





reply via email to

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