Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
61190b51
Commit
61190b51
authored
Dec 22, 2023
by
Mattias Engdegård
Browse files
* lisp/emacs-lisp/byte-opt.el (byte-compile-nilconstp): Extend list.
parent
1ece474c
Pipeline
#27583
failed with stages
in 117 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
lisp/emacs-lisp/byte-opt.el
lisp/emacs-lisp/byte-opt.el
+23
-2
No files found.
lisp/emacs-lisp/byte-opt.el
View file @
61190b51
...
...
@@ -810,8 +810,29 @@ There can be multiple entries for the same NAME if it has several aliases.")
(
or
(
not
form
)
; assume (quote nil) always being normalized to nil
(
and
(
consp
form
)
(
let
((
head
(
car
form
)))
;; FIXME: There are many other expressions that are statically nil.
(
cond
((
memq
head
'
(
while
ignore
))
t
)
(
cond
((
memq
head
;; Some forms that are statically nil.
;; FIXME: Replace with a function property?
'
(
while
ignore
insert
insert-and-inherit
insert-before-markers
insert-before-markers-and-inherit
insert-char
insert-byte
insert-buffer-substring
delete-region
delete-char
widen
narrow-to-region
transpose-regions
forward-char
backward-char
beginning-of-line
end-of-line
erase-buffer
buffer-swap-text
delete-overlay
delete-all-overlays
remhash
maphash
map-charset-chars
map-char-table
mapbacktrace
mapatoms
ding
beep
sleep-for
json-insert
set-match-data
))
t
)
((
eq
head
'if
)
(
and
(
byte-compile-nilconstp
(
nth
2
form
))
(
byte-compile-nilconstp
(
car
(
last
(
cdddr
form
))))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment