summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-opt.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-08-27 14:20:38 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-09-15 09:42:53 +0200
commit824ae5faeec9cfa5e14e750030d55800b08ad7f2 (patch)
tree25698af46b03cd7539b9876fbe9c1dd15ab3156e /lisp/emacs-lisp/byte-opt.el
parent3ad2adc48c700a8c15459f623081c32420f0b726 (diff)
downloademacs-824ae5faeec9cfa5e14e750030d55800b08ad7f2.tar.gz
Use `eql` or `eq` instead of `=` in some places
For a switch op to be generated, comparisons must be made using `eq`, `eql` or `equal`, not `=`. * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): * lisp/files.el (file-modes-char-to-who, file-modes-char-to-right): * lisp/international/titdic-cnv.el (tit-process-header): * lisp/language/ethio-util.el (ethio-input-special-character) (ethio-fidel-to-tex-buffer): * lisp/language/lao.el (consonant): Use `eq` or `eql` instead of `=`. In these cases either `eq` or `eql` would do and the choice does not affect the resulting code. We compare numbers with `eql` and characters with `eq` as a matter of style.
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r--lisp/emacs-lisp/byte-opt.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 27b0d33d3ef..0d5f8c26eb2 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1999,20 +1999,20 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance."
(setq keep-going t)
(setq tmp (aref byte-stack+-info (symbol-value (car lap0))))
(setq rest (cdr rest))
- (cond ((= tmp 1)
+ (cond ((eql tmp 1)
(byte-compile-log-lap
" %s discard\t-->\t<deleted>" lap0)
(setq lap (delq lap0 (delq lap1 lap))))
- ((= tmp 0)
+ ((eql tmp 0)
(byte-compile-log-lap
" %s discard\t-->\t<deleted> discard" lap0)
(setq lap (delq lap0 lap)))
- ((= tmp -1)
+ ((eql tmp -1)
(byte-compile-log-lap
" %s discard\t-->\tdiscard discard" lap0)
(setcar lap0 'byte-discard)
(setcdr lap0 0))
- ((error "Optimizer error: too much on the stack"))))
+ (t (error "Optimizer error: too much on the stack"))))
;;
;; goto*-X X: --> X:
;;