category-docstring category-set-mnemonics char-category-set
copy-category-table get-unused-category make-category-set
;; character.c
- char-width multibyte-char-to-unibyte string unibyte-char-to-multibyte
+ char-width get-byte multibyte-char-to-unibyte string string-width
+ unibyte-char-to-multibyte unibyte-string
;; charset.c
decode-char encode-char
;; chartab.c
line-beginning-position line-end-position ngettext pos-bol pos-eol
propertize region-beginning region-end string-to-char
user-full-name user-login-name
+ ;; eval.c
+ special-variable-p
;; fileio.c
car-less-than-car directory-name-p file-directory-p file-exists-p
file-name-absolute-p file-name-concat file-newer-than-file-p
file-locked-p
;; floatfns.c
abs acos asin atan ceiling copysign cos exp expt fceiling ffloor
- float floor fround ftruncate isnan ldexp log logb round sin sqrt tan
+ float floor frexp fround ftruncate isnan ldexp log logb round
+ sin sqrt tan
truncate
;; fns.c
append assq
base64-decode-string base64-encode-string base64url-encode-string
+ buffer-hash buffer-line-statistics
compare-strings concat copy-alist copy-hash-table copy-sequence elt
featurep get
gethash hash-table-count hash-table-rehash-size
hash-table-rehash-threshold hash-table-size hash-table-test
hash-table-weakness
length length< length= length>
- line-number-at-pos locale-info make-hash-table
+ line-number-at-pos load-average locale-info make-hash-table md5
member memq memql nth nthcdr
- object-intervals rassoc rassq reverse
- string-as-multibyte string-as-unibyte string-bytes string-distance
+ object-intervals rassoc rassq reverse secure-hash
+ string-as-multibyte string-as-unibyte string-bytes
+ string-collate-equalp string-collate-lessp string-distance
string-equal string-lessp string-make-multibyte string-make-unibyte
- string-search string-to-multibyte substring substring-no-properties
+ string-search string-to-multibyte string-to-unibyte
+ string-version-lessp
+ substring substring-no-properties
sxhash-eq sxhash-eql sxhash-equal sxhash-equal-including-properties
take vconcat
;; frame.c
all-threads condition-mutex condition-name mutex-name thread-live-p
thread-name
;; timefns.c
+ current-cpu-time
current-time-string current-time-zone decode-time encode-time
float-time format-time-string time-add time-convert time-equal-p
time-less-p time-subtract
;; fileio.c
default-file-modes
;; fns.c
- eql equal hash-table-p identity proper-list-p safe-length
+ eql equal equal-including-properties
+ hash-table-p identity proper-list-p safe-length
secure-hash-algorithms
;; frame.c
frame-list frame-live-p framep last-nonminibuffer-frame
isnan ldexp logb round sqrt truncate
;; fns.c
assq base64-decode-string base64-encode-string base64url-encode-string
- concat elt eql equal hash-table-p identity length length< length=
+ concat elt eql equal equal-including-properties
+ hash-table-p identity length length< length=
length> member memq memql nth nthcdr proper-list-p rassoc rassq
safe-length string-bytes string-distance string-equal string-lessp
- string-search take
+ string-search string-version-lessp take
;; search.c
regexp-quote
;; syntax.c
(defun buffer-local-boundp (symbol buffer)
"Return non-nil if SYMBOL is bound in BUFFER.
Also see `local-variable-p'."
+ (declare (side-effect-free t))
(condition-case nil
(buffer-local-value symbol buffer)
(:success t)
(defsubst subr-primitive-p (object)
"Return t if OBJECT is a built-in primitive function."
+ (declare (side-effect-free error-free))
(and (subrp object)
(not (subr-native-elisp-p object))))
"Return a new uninterned symbol.
The name is made by appending `gensym-counter' to PREFIX.
PREFIX is a string, and defaults to \"g\"."
+ (declare (important-return-value t))
(let ((num (prog1 gensym-counter
(setq gensym-counter (1+ gensym-counter)))))
(make-symbol (format "%s%d" (or prefix "g") num))))
"Return non-nil if OBJECT seems to be a frame configuration.
Any list whose car is `frame-configuration' is assumed to be a frame
configuration."
+ (declare (pure t) (side-effect-free error-free))
(and (consp object)
(eq (car object) 'frame-configuration)))
The result is a new function which does the same as FUN, except that
the first N arguments are fixed at the values with which this function
was called."
+ (declare (side-effect-free error-free))
(lambda (&rest args2)
(apply fun (append args args2))))
bindings in other keymaps of MAPS.
MAPS can be a list of keymaps or a single keymap.
PARENT if non-nil should be a keymap."
+ (declare (side-effect-free t))
`(keymap
,@(if (keymapp maps) (list maps) maps)
,@parent))
should behave identically to a copy of KEYMAP w.r.t `lookup-key'
and use in active keymaps and menus.
Subkeymaps may be modified but are not canonicalized."
+ (declare (important-return-value t))
;; FIXME: Problem with the difference between a nil binding
;; that hides a binding in an inherited map and a nil binding that's ignored
;; to let some further binding visible. Currently a nil binding hides all.
(defun listify-key-sequence (key)
"Convert a key sequence to a list of events."
+ (declare (side-effect-free t))
(if (vectorp key)
(append key nil)
(mapcar (lambda (c)
that has never been used in an event that has been read as input
in the current Emacs session, then this function may fail to include
the `click' modifier."
+ (declare (side-effect-free t))
(unless (stringp event)
(let ((type event))
(if (listp type)
EVENT may be an event or an event type. If EVENT is a symbol
that has never been used in an event that has been read as input
in the current Emacs session, then this function may return nil."
+ (declare (side-effect-free t))
(unless (stringp event)
(if (consp event)
(setq event (car event)))
(defun mouse-event-p (object)
"Return non-nil if OBJECT is a mouse click event."
+ (declare (side-effect-free t))
;; is this really correct? maybe remove mouse-movement?
(memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement)))
`posn-timestamp': The time the event occurred, in milliseconds.
For more information, see Info node `(elisp)Click Events'."
+ (declare (side-effect-free t))
(or (and (consp event) (nth 1 event))
(event--posn-at-point)))
EVENT should be a click, drag, or key press event.
See `event-start' for a description of the value returned."
+ (declare (side-effect-free t))
(or (and (consp event) (nth (if (consp (nth 2 event)) 2 1) event))
(event--posn-at-point)))
(defsubst event-click-count (event)
"Return the multi-click count of EVENT, a click or drag event.
The return value is a positive integer."
+ (declare (side-effect-free t))
(if (and (consp event) (integerp (nth 2 event))) (nth 2 event) 1))
(defsubst event-line-count (event)
"Return the line count of EVENT, a mousewheel event.
The return value is a positive integer."
+ (declare (side-effect-free t))
(if (and (consp event) (integerp (nth 3 event))) (nth 3 event) 1))
\f
;;;; Extracting fields of the positions in an event.
A `posn' object is returned from functions such as `event-start'.
If OBJ is a valid `posn' object, but specifies a frame rather
than a window, return nil."
+ (declare (side-effect-free error-free))
;; FIXME: Correct the behavior of this function so that all valid
;; `posn' objects are recognized, after updating other code that
;; depends on its present behavior.
If POSITION is outside the frame where the event was initiated,
return that frame instead. POSITION should be a list of the form
returned by the `event-start' and `event-end' functions."
+ (declare (side-effect-free t))
(nth 0 position))
(defsubst posn-area (position)
"Return the window area recorded in POSITION, or nil for the text area.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
+ (declare (side-effect-free t))
(let ((area (if (consp (nth 1 position))
(car (nth 1 position))
(nth 1 position))))
and `event-end' functions.
Returns nil if POSITION does not correspond to any buffer location (e.g.
a click on a scroll bar)."
+ (declare (side-effect-free t))
(or (nth 5 position)
(let ((pt (nth 1 position)))
(or (car-safe pt)
The return value has the form (X . Y), where X and Y are given in
pixels. POSITION should be a list of the form returned by
`event-start' and `event-end'."
+ (declare (side-effect-free t))
(nth 2 position))
(declare-function scroll-bar-scale "scroll-bar" (num-denom whole))
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
+ (declare (side-effect-free t))
(let* ((pair (posn-x-y position))
(frame-or-window (posn-window position))
(frame (if (framep frame-or-window)
number of visual columns taken by a TAB or image. If you need
the coordinates of POSITION in character units, you should use
`posn-col-row', not this function."
+ (declare (side-effect-free t))
(nth 6 position))
(defsubst posn-timestamp (position)
"Return the timestamp of POSITION.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
+ (declare (side-effect-free t))
(nth 3 position))
(defun posn-string (position)
Value is a cons (STRING . STRING-POS), or nil if not a string.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
+ (declare (side-effect-free t))
(let ((x (nth 4 position)))
;; Apparently this can also be `handle' or `below-handle' (bug#13979).
(when (consp x) x)))
Value is a list (image ...), or nil if not an image.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
+ (declare (side-effect-free t))
(nth 7 position))
(defsubst posn-object (position)
\(STRING . STRING-POS) for a string object, and nil for a buffer position.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
+ (declare (side-effect-free t))
(or (posn-image position) (posn-string position)))
(defsubst posn-object-x-y (position)
given in pixels, and they are relative to the top-left corner of
the clicked glyph of object at POSITION. POSITION should be a
list of the form returned by `event-start' and `event-end'."
+ (declare (side-effect-free t))
(nth 8 position))
(defsubst posn-object-width-height (position)
"Return the pixel width and height of the object of POSITION.
The return value has the form (WIDTH . HEIGHT). POSITION should
be a list of the form returned by `event-start' and `event-end'."
+ (declare (side-effect-free t))
(nth 9 position))
(defun values--store-value (value)
Uses the `derived-mode-parent' property of the symbol to trace backwards.
If you just want to check `major-mode', use `derived-mode-p'."
;; If MODE is an alias, then look up the real mode function first.
+ (declare (side-effect-free t))
(when-let ((alias (symbol-function mode)))
(when (symbolp alias)
(setq mode alias)))
(defun derived-mode-p (&rest modes)
"Non-nil if the current major mode is derived from one of MODES.
Uses the `derived-mode-parent' property of the symbol to trace backwards."
+ (declare (side-effect-free t))
(apply #'provided-mode-derived-p major-mode modes))
(defvar-local major-mode--suspended nil)
(defsubst autoloadp (object)
"Non-nil if OBJECT is an autoload."
+ (declare (side-effect-free error-free))
(eq 'autoload (car-safe object)))
;; (defun autoload-type (object)
(defun locate-eln-file (eln-file)
"Locate a natively-compiled ELN-FILE by searching its load path.
This function looks in directories named by `native-comp-eln-load-path'."
+ (declare (important-return-value t))
(or (locate-file-internal (concat comp-native-version-dir "/" eln-file)
native-comp-eln-load-path)
(locate-file-internal
This function only works for symbols defined in Lisp files. For
symbols that are defined in C files, use `help-C-file-name'
instead."
+ (declare (important-return-value t))
(if (and (or (null type) (eq type 'defun))
(symbolp symbol)
(autoloadp (symbol-function symbol)))
program before the output is collected. If STATUS-HANDLER is
nil, an error is signaled if the program returns with a non-zero
exit status."
+ (declare (important-return-value t))
(with-temp-buffer
(let ((status (apply #'call-process program nil (current-buffer) nil args)))
(if status-handler
"Execute PROGRAM with ARGS, returning its output as a list of lines.
Signal an error if the program returns with a non-zero exit status.
Also see `process-lines-ignore-status'."
+ (declare (important-return-value t))
(apply #'process-lines-handling-status program nil args))
(defun process-lines-ignore-status (program &rest args)
"Execute PROGRAM with ARGS, returning its output as a list of lines.
The exit status of the program is ignored.
Also see `process-lines'."
+ (declare (important-return-value t))
(apply #'process-lines-handling-status program #'ignore args))
(defun process-live-p (process)
(defun process-get (process propname)
"Return the value of PROCESS' PROPNAME property.
This is the last value stored with `(process-put PROCESS PROPNAME VALUE)'."
+ (declare (side-effect-free t))
(plist-get (process-plist process) propname))
(defun process-put (process propname value)
(defun copy-overlay (o)
"Return a copy of overlay O."
+ (declare (important-return-value t))
(let ((o1 (if (overlay-buffer o)
(make-overlay (overlay-start o) (overlay-end o)
;; FIXME: there's no easy way to find the
If the optional POSIX argument is non-nil, ARGUMENT is quoted
according to POSIX shell quoting rules, regardless of the
system's shell."
+ (declare (important-return-value t))
(cond
((and (not posix) (eq system-type 'ms-dos))
;; Quote using double quotes, but escape any existing quotes in
(defun field-at-pos (pos)
"Return the field at position POS, taking stickiness etc into account."
+ (declare (important-return-value t))
(let ((raw-field (get-char-property (field-beginning pos) 'field)))
(if (eq raw-field 'boundary)
(get-char-property (1- (field-end pos)) 'field)