mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
Add more function declarations
* lisp/subr.el (buffer-narrowed-p, sha1, match-substitute-replacement) (version-to-list, version<, version<=, version=) (function-get, subregexp-context-p, split-string) (combine-and-quote-strings, split-string-and-unquote) (replace-regexp-in-string, syntax-after) (string-trim-left, string-trim): * lisp/emacs-lisp/subr-x.el (hash-table-empty-p, hash-table-keys) (hash-table-values, string-glyph-split) (string-clean-whitespace, string-fill, string-limit) (string-pixel-width): * lisp/env.el (substitute-env-vars, substitute-env-in-file-name) (setenv-internal): * lisp/emacs-lisp/rx.el (rx-to-string): * lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth) (regexp-opt-charset): Add appropriate declarations: pure, side-effect-free, and/or important-return-value.
This commit is contained in:
parent
54ac1165bc
commit
ef778f5143
5 changed files with 32 additions and 1 deletions
|
|
@ -154,6 +154,7 @@ usually more efficient than that of a simplified version:
|
|||
"Return the depth of REGEXP.
|
||||
This means the number of non-shy regexp grouping constructs
|
||||
\(parenthesized expressions) in REGEXP."
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(save-match-data
|
||||
;; Hack to signal an error if REGEXP does not have balanced parentheses.
|
||||
(string-match regexp "")
|
||||
|
|
@ -270,6 +271,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
|
|||
CHARS should be a list of characters.
|
||||
If CHARS is the empty list, the return value is a regexp that
|
||||
never matches anything."
|
||||
(declare (pure t) (side-effect-free t))
|
||||
;; The basic idea is to find character ranges. Also we take care in the
|
||||
;; position of character set meta characters in the character set regexp.
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue