diff options
author | Mattias Engdegård <mattiase@acm.org> | 2022-08-27 14:20:38 +0200 |
---|---|---|
committer | Mattias Engdegård <mattiase@acm.org> | 2022-09-15 09:42:53 +0200 |
commit | 824ae5faeec9cfa5e14e750030d55800b08ad7f2 (patch) | |
tree | 25698af46b03cd7539b9876fbe9c1dd15ab3156e /lisp/language | |
parent | 3ad2adc48c700a8c15459f623081c32420f0b726 (diff) | |
download | emacs-824ae5faeec9cfa5e14e750030d55800b08ad7f2.tar.gz emacs-824ae5faeec9cfa5e14e750030d55800b08ad7f2.tar.bz2 emacs-824ae5faeec9cfa5e14e750030d55800b08ad7f2.zip |
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/language')
-rw-r--r-- | lisp/language/ethio-util.el | 43 | ||||
-rw-r--r-- | lisp/language/lao.el | 6 |
2 files changed, 25 insertions, 24 deletions
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el index a0159679da2..2f76acfe7cb 100644 --- a/lisp/language/ethio-util.el +++ b/lisp/language/ethio-util.el @@ -794,15 +794,15 @@ The 2nd and 3rd arguments BEGIN and END specify the region." "This function is deprecated." (interactive "*cInput number: 1. 2. 3. 4. 5.") (cond - ((= arg ?1) + ((eq arg ?1) (insert "")) - ((= arg ?2) + ((eq arg ?2) (insert "")) - ((= arg ?3) + ((eq arg ?3) (insert "")) - ((= arg ?4) + ((eq arg ?4) (insert "")) - ((= arg ?5) + ((eq arg ?5) (insert "")) (t (error "")))) @@ -816,7 +816,7 @@ The 2nd and 3rd arguments BEGIN and END specify the region." "Convert each fidel characters in the current buffer into a fidel-tex command." (interactive) (let ((buffer-read-only nil) - comp ch) + comp) ;; Special treatment for geminated characters. ;; Geminated characters la", etc. change into \geminateG{\laG}, etc. @@ -835,21 +835,22 @@ The 2nd and 3rd arguments BEGIN and END specify the region." ;; Special Ethiopic punctuation. (goto-char (point-min)) (while (re-search-forward "\\ce[».?]\\|«\\ce" nil t) - (cond - ((= (setq ch (preceding-char)) ?\») - (delete-char -1) - (insert "\\rquoteG")) - ((= ch ?.) - (delete-char -1) - (insert "\\dotG")) - ((= ch ??) - (delete-char -1) - (insert "\\qmarkG")) - (t - (forward-char -1) - (delete-char -1) - (insert "\\lquoteG") - (forward-char 1)))) + (let ((ch (preceding-char))) + (cond + ((eq ch ?\») + (delete-char -1) + (insert "\\rquoteG")) + ((eq ch ?.) + (delete-char -1) + (insert "\\dotG")) + ((eq ch ??) + (delete-char -1) + (insert "\\qmarkG")) + (t + (forward-char -1) + (delete-char -1) + (insert "\\lquoteG") + (forward-char 1))))) ;; Ethiopic characters to TeX macros (robin-invert-region (point-min) (point-max) "ethiopic-tex") diff --git a/lisp/language/lao.el b/lisp/language/lao.el index 1861eff15eb..0ad5b9f84e3 100644 --- a/lisp/language/lao.el +++ b/lisp/language/lao.el @@ -60,9 +60,9 @@ (len (length chars)) ;; Replace `c', `t', `v' to consonant, tone, and vowel. (regexp (mapconcat (lambda (c) - (cond ((= c ?c) consonant) - ((= c ?t) tone) - ((= c ?v) vowel-upper-lower) + (cond ((eq c ?c) consonant) + ((eq c ?t) tone) + ((eq c ?v) vowel-upper-lower) (t (string c)))) (cdr l) "")) ;; Element of composition-function-table. |