* doc/lispref/functions.texi (Calling Functions): Document it.
* lisp/subr.el (always): New function.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark it as
side effect free.
@defun ignore &rest arguments
This function ignores any @var{arguments} and returns @code{nil}.
+@end defun
+
+@defun always &rest arguments
+This function ignores any @var{arguments} and returns @code{t}.
@end defun
Some functions are user-visible @dfn{commands}, which can be called
\f
* Lisp Changes in Emacs 28.1
++++
+** New function 'always'.
+This is identical to 'ignore', but returns t instead.
+
+++
** New forms to declare how completion should happen has been added.
'(declare (completion PREDICATE))' can be used as a general predicate
window-total-height window-total-width window-use-time window-vscroll
window-width zerop))
(side-effect-and-error-free-fns
- '(arrayp atom
+ '(always arrayp atom
bignump bobp bolp bool-vector-p
buffer-end buffer-list buffer-size buffer-string bufferp
car-safe case-table-p cdr-safe char-or-string-p characterp
(defun ignore (&rest _arguments)
"Do nothing and return nil.
-This function accepts any number of ARGUMENTS, but ignores them."
+This function accepts any number of ARGUMENTS, but ignores them.
+Also see `always'."
(interactive)
nil)
+(defun always (&rest _arguments)
+ "Do nothing and return t.
+This function accepts any number of ARGUMENTS, but ignores them.
+Also see `ignore'."
+ t)
+
;; Signal a compile-error if the first arg is missing.
(defun error (&rest args)
"Signal an error, making a message by passing ARGS to `format-message'.