A customizable variable is either (i) a variable whose property
list contains a non-nil `standard-value' or `custom-autoload'
property, or (ii) an alias for another customizable variable."
+ (declare (side-effect-free t))
(when (symbolp variable)
(setq variable (indirect-variable variable))
(or (get variable 'standard-value)
capitalize car-less-than-car car cdr ceiling char-after char-before
char-equal char-to-string char-width compare-strings
window-configuration-equal-p concat coordinates-in-window-p
- copy-alist copy-sequence copy-marker copysign cos count-lines
+ copy-alist copy-sequence copy-marker copysign cos
current-time-string current-time-zone
decode-char
decode-time default-boundp default-value documentation downcase
float float-time floor format format-time-string frame-first-window
frame-root-window frame-selected-window
frame-visible-p fround ftruncate
- get gethash get-buffer get-buffer-window getenv get-file-buffer
+ get gethash get-buffer get-buffer-window get-file-buffer
hash-table-count
int-to-string intern-soft isnan
keymap-parent
- lax-plist-get ldexp
+ ldexp
length length< length> length=
line-beginning-position line-end-position pos-bol pos-eol
local-variable-if-set-p local-variable-p locale-info
- log log10 logand logb logcount logior lognot logxor lsh
- make-byte-code make-list make-string make-symbol mark marker-buffer max
+ log logand logb logcount logior lognot logxor
+ make-byte-code make-list make-string make-symbol marker-buffer max
match-beginning match-end
member memq memql min minibuffer-selected-window minibuffer-window
mod multibyte-char-to-unibyte next-window nth nthcdr number-to-string
- parse-colon-path
prefix-numeric-value previous-window prin1-to-string propertize
- degrees-to-radians
- radians-to-degrees rassq rassoc read-from-string regexp-opt
+ rassq rassoc read-from-string
regexp-quote region-beginning region-end reverse round
sin sqrt string string< string= string-equal string-lessp
- string> string-greaterp string-empty-p string-blank-p
+ string>
string-search string-to-char
string-to-number string-to-syntax substring
sxhash sxhash-equal sxhash-eq sxhash-eql
string-to-multibyte
take tan time-convert truncate
unibyte-char-to-multibyte upcase user-full-name
- user-login-name user-original-login-name custom-variable-p
+ user-login-name user-original-login-name
vconcat
- window-absolute-pixel-edges window-at window-body-height
+ window-at window-body-height
window-body-width window-buffer window-dedicated-p window-display-table
- window-combination-limit window-edges window-frame window-fringes
+ window-combination-limit window-frame window-fringes
window-height window-hscroll window-inside-edges
window-inside-absolute-pixel-edges window-inside-pixel-edges
window-left-child window-left-column window-margins window-minibuffer-p
window-next-buffers window-next-sibling window-new-normal
window-new-total window-normal-size window-parameter window-parameters
- window-parent window-pixel-edges window-point window-prev-buffers
+ window-parent window-point window-prev-buffers
window-prev-sibling window-scroll-bars
window-start window-text-height window-top-child window-top-line
window-total-height window-total-width window-use-time window-vscroll
- window-width zerop))
+ window-width))
(side-effect-and-error-free-fns
- '(always arrayp atom
- bignump bobp bolp bool-vector-p
- buffer-end buffer-list buffer-size buffer-string bufferp
+ '(arrayp atom
+ bobp bolp bool-vector-p
+ buffer-list buffer-size buffer-string bufferp
car-safe case-table-p cdr-safe char-or-string-p characterp
charsetp commandp cons consp
current-buffer current-global-map current-indentation
current-local-map current-minor-mode-maps current-time
- eobp eolp eq equal eventp
- fixnump floatp following-char framep
- get-largest-window get-lru-window
+ eobp eolp eq equal
+ floatp following-char framep
hash-table-p
- ;; `ignore' isn't here because we don't want calls to it elided;
- ;; see `byte-compile-ignore'.
- identity integerp integer-or-marker-p interactive-p
+ identity integerp integer-or-marker-p
invocation-directory invocation-name
keymapp keywordp
list listp
make-marker mark-marker markerp max-char
- memory-limit
- mouse-movement-p
natnump nlistp not null number-or-marker-p numberp
- one-window-p overlayp
- point point-marker point-min point-max preceding-char primary-charset
+ overlayp
+ point point-marker point-min point-max preceding-char
processp proper-list-p
recent-keys recursion-depth
safe-length selected-frame selected-window sequencep
;; values if a marker is moved.
(let ((pure-fns
- '(concat regexp-opt regexp-quote
+ '(concat regexp-quote
string-to-char string-to-syntax symbol-name
eq eql
= /= < <= >= > min max
copysign isnan ldexp float logb
floor ceiling round truncate
ffloor fceiling fround ftruncate
- string= string-equal string< string-lessp string> string-greaterp
- string-empty-p string-blank-p
+ string= string-equal string< string-lessp string>
string-search
consp atom listp nlistp proper-list-p
sequencep arrayp vectorp stringp bool-vector-p hash-table-p
integer-or-marker-p number-or-marker-p char-or-string-p
symbolp keywordp
type-of
- identity ignore
+ identity
;; The following functions are pure up to mutation of their
;; arguments. This is pure enough for the purposes of
;; constant folding, but not necessarily for all kinds of
;; code motion.
- car cdr car-safe cdr-safe nth nthcdr last take
+ car cdr car-safe cdr-safe nth nthcdr take
equal
length safe-length
memq memql member
;; `assoc' and `assoc-default' are excluded since they are
;; impure if the test function is (consider `string-match').
assq rassq rassoc
- lax-plist-get
aref elt
base64-decode-string base64-encode-string base64url-encode-string
bool-vector-subsetp
"Return the \"far end\" position of the buffer, in direction ARG.
If ARG is positive, that's the end of the buffer.
Otherwise, that's the beginning of the buffer."
+ (declare (side-effect-free error-free))
(if (> arg 0) (point-max) (point-min)))
(defun end-of-defun (&optional arg interactive)
(concat (car parens)
(mapconcat \\='regexp-quote strings \"\\\\|\")
(cdr parens))))"
+ (declare (pure t) (side-effect-free t))
(save-match-data
;; Recurse on the sorted list.
(let* ((max-lisp-eval-depth 10000)
VARIABLE. If it is not found there, then it continues the search
in the environment list of the selected frame."
(interactive (list (read-envvar-name "Get environment variable: " t)))
+ (declare (side-effect-free t))
(let ((value (getenv-internal (if (multibyte-string-p variable)
(encode-coding-string
variable locale-coding-system)
When IGNORE-INVISIBLE-LINES is non-nil, invisible lines are not
included in the count."
+ (declare (side-effect-free t))
(save-excursion
(save-restriction
(narrow-to-region start end)
If you are using this in an editing command, you are most likely making
a mistake; see the documentation of `set-mark'."
+ (declare (side-effect-free t))
(if (or force (not transient-mark-mode) mark-active mark-even-if-inactive)
(marker-position (mark-marker))
(signal 'mark-inactive nil)))
(defsubst string-empty-p (string)
"Check whether STRING is empty."
+ (declare (pure t) (side-effect-free t))
(string= string ""))
(defun read-signal-name ()
(defun lax-plist-get (plist prop)
"Extract a value from a property list, comparing with `equal'."
- (declare (obsolete plist-get "29.1"))
+ (declare (pure t) (side-effect-free t) (obsolete plist-get "29.1"))
(plist-get plist prop #'equal))
(defun lax-plist-put (plist prop val)
"Do nothing and return nil.
This function accepts any number of ARGUMENTS, but ignores them.
Also see `always'."
- (declare (completion ignore))
+ ;; Not declared `side-effect-free' because we don't want calls to it
+ ;; elided; see `byte-compile-ignore'.
+ (declare (pure t) (completion ignore))
(interactive)
nil)
"Do nothing and return t.
This function accepts any number of ARGUMENTS, but ignores them.
Also see `ignore'."
+ (declare (pure t) (side-effect-free error-free))
t)
;; Signal a compile-error if the first arg is missing.
"Return t if NUMBER is zero."
;; Used to be in C, but it's pointless since (= 0 n) is faster anyway because
;; = has a byte-code.
- (declare (compiler-macro (lambda (_) `(= 0 ,number))))
+ (declare (pure t) (side-effect-free t)
+ (compiler-macro (lambda (_) `(= 0 ,number))))
(= 0 number))
(defun fixnump (object)
"Return t if OBJECT is a fixnum."
+ (declare (side-effect-free error-free))
(and (integerp object)
(<= most-negative-fixnum object most-positive-fixnum)))
(defun bignump (object)
"Return t if OBJECT is a bignum."
+ (declare (side-effect-free error-free))
(and (integerp object) (not (fixnump object))))
(defun lsh (value count)
(lambda (form)
(macroexp-warn-and-return
(format-message "avoid `lsh'; use `ash' instead")
- form '(suspicious lsh) t form))))
+ form '(suspicious lsh) t form)))
+ (side-effect-free t))
(when (and (< value 0) (< count 0))
(when (< value most-negative-fixnum)
(signal 'args-out-of-range (list value count)))
If LIST is nil, return nil.
If N is non-nil, return the Nth-to-last link of LIST.
If N is bigger than the length of LIST, return LIST."
- (declare (side-effect-free t))
+ (declare (pure t) (side-effect-free t)) ; pure up to mutation
(if n
(and (>= n 0)
(let ((m (safe-length list)))
(defun eventp (object)
"Return non-nil if OBJECT is an input event or event object."
+ (declare (pure t) (side-effect-free error-free))
(or (integerp object)
(and (if (consp object)
(setq object (car object))
(defsubst mouse-movement-p (object)
"Return non-nil if OBJECT is a mouse movement event."
+ (declare (side-effect-free error-free))
(eq (car-safe object) 'mouse-movement))
(defun mouse-event-p (object)
(defun log10 (x)
"Return (log X 10), the log base 10 of X."
- (declare (obsolete log "24.4"))
+ (declare (side-effect-free t) (obsolete log "24.4"))
(log x 10))
(set-advertised-calling-convention
(defun memory-limit ()
"Return an estimate of Emacs virtual memory usage, divided by 1024."
+ (declare (side-effect-free error-free))
(let ((default-directory temporary-file-directory))
(or (cdr (assq 'vsize (process-attributes (emacs-pid)))) 0)))
"Return non-nil if STRING1 is greater than STRING2 in lexicographic order.
Case is significant.
Symbols are also allowed; their print names are used instead."
+ (declare (pure t) (side-effect-free t))
(string-lessp string2 string1))
\f
`commandp'."
;; Kept around for now. See discussion at:
;; https://lists.gnu.org/r/emacs-devel/2020-08/msg00564.html
- (declare (obsolete called-interactively-p "23.2"))
+ (declare (obsolete called-interactively-p "23.2")
+ (side-effect-free error-free))
(called-interactively-p 'interactive))
(defun internal-push-keymap (keymap symbol)
`display-buffer-avoid-small-windows', if non-nil, is also taken into
consideration. Windows whose height is smaller that the value of that
variable will be avoided if larger windows are available."
+ (declare (side-effect-free error-free))
(let ((windows (window-list-1 nil 'nomini all-frames))
best-window best-time second-best-window second-best-time time)
(dolist (window windows)
Any other value of ALL-FRAMES means consider all windows on the
selected frame and no others."
+ (declare (side-effect-free error-free))
(let ((best-size 0)
best-window size)
(dolist (window (window-list-1 nil 'nomini all-frames))
the coordinates in pixels where the values for RIGHT and BOTTOM
are one more than the actual value of these edges. Note that if
ABSOLUTE is non-nil, PIXELWISE is implicitly non-nil too."
+ (declare (side-effect-free t))
(let* ((window (window-normalize-window window body))
(frame (window-frame window))
(border-width (frame-internal-border-width frame))
"Return a list of the edge coordinates of WINDOW's body.
The return value is that of `window-edges' called with argument
BODY non-nil."
+ (declare (side-effect-free t))
(window-edges window t))
(defalias 'window-inside-edges 'window-body-edges)
"Return a list of the edge pixel coordinates of WINDOW.
The return value is that of `window-edges' called with argument
PIXELWISE non-nil."
+ (declare (side-effect-free t))
(window-edges window nil nil t))
(defun window-body-pixel-edges (&optional window)
"Return a list of the edge pixel coordinates of WINDOW's body.
The return value is that of `window-edges' called with arguments
BODY and PIXELWISE non-nil."
+ (declare (side-effect-free t))
(window-edges window t nil t))
(defalias 'window-inside-pixel-edges 'window-body-pixel-edges)
"Return a list of the edge pixel coordinates of WINDOW.
The return value is that of `window-edges' called with argument
ABSOLUTE non-nil."
+ (declare (side-effect-free t))
(window-edges window nil t t))
(defun window-absolute-body-pixel-edges (&optional window)
"Return a list of the edge pixel coordinates of WINDOW's text area.
The return value is that of `window-edges' called with arguments
BODY and ABSOLUTE non-nil."
+ (declare (side-effect-free t))
(window-edges window t t t))
(defalias 'window-inside-absolute-pixel-edges 'window-absolute-body-pixel-edges)
Anything else means consider all windows on the selected frame
and no others."
+ (declare (side-effect-free error-free))
(let ((base-window (selected-window)))
(if (and nomini (eq base-window (minibuffer-window)))
(setq base-window (next-window base-window)))