diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-08-06 03:56:51 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-08-06 03:56:51 -0400 |
commit | 74b097b61c5201405ad7bc5bb76f1ca0e794184b (patch) | |
tree | 9e616fd95c5cb01c7dac507c6d84a34637f14411 /lisp/mh-e/mh-compat.el | |
parent | b06917a4912a60402025286d07d4a195749245c4 (diff) | |
download | emacs-74b097b61c5201405ad7bc5bb76f1ca0e794184b.tar.gz |
* lisp/mh-e: Use cl-lib
Also, use underscore prefixes and defvar in preparation for lexical binding
* lisp/mh-e/mh-acros.el: Require cl-lib instead of cl.
Rename all cl.el uses by adding `cl-` prefix.
(mh-require-cl): Remove. Not needed any more. Remove all calls.
(mh-defstruct): Remove. Replace all uses with cl-defstruct.
(mh-dlet*): New macro.
* lisp/mh-e/mh-comp.el (mh-user-agent-compose): Fold all ignored
optional args into the &rest arg.
* lisp/mh-e/mh-e.el: Require cl-lib instead of using mh-require-cl.
(mh-variants): Don't add-to-list on a local var.
* lisp/mh-e/mh-folder.el (mh-restore-desktop-buffer): Use shorter arg
names that don't collide with global vars.
* lisp/mh-e/mh-mime.el (mh-insert-mime-button):
(mh-insert-mime-security-button): Use mh-dlet*.
* lisp/mh-e/mh-search.el (mh-swish-next-result, mh-grep-next-result)
(mh-namazu-next-result): Use `or`.
* lisp/mh-e/mh-thread.el (mh-thread-generate)
(mh-thread-prune-containers): Use underscore rather than declare+ignore.
* lisp/mh-e/mh-tool-bar.el (mh-tool-bar-define): Use mh-dlet*.
(mh-tool-bar-define): Prefer the more precise \`...\' regexp ops.
Prefer Elisp's `eval-and-compile` over `cl-eval-when`.
* lisp/mh-e/mh-xface.el (mh-picon-get-image): Don't use
mh-funcall-if-exists for ietf-drums-parse-address.
Avoid the use of `cl-return` and hence use plain `defun`.
Replace some `cl-loop` with `dolist`.
Diffstat (limited to 'lisp/mh-e/mh-compat.el')
-rw-r--r-- | lisp/mh-e/mh-compat.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index a459d27ee2d..7c5bd3a987e 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -143,7 +143,7 @@ introduced in Emacs 22." `(face-background ,face ,frame ,inherit))) (defun-mh mh-font-lock-add-keywords font-lock-add-keywords - (mode keywords &optional how) + (_mode _keywords &optional _how) "XEmacs does not have `font-lock-add-keywords'. This function returns nil on that system.") @@ -243,7 +243,7 @@ compatibility with versions of Emacs that lack the variable (delete image-directory (copy-sequence (or path load-path)))))) (defun-mh mh-image-search-load-path - image-search-load-path (file &optional path) + image-search-load-path (_file &optional _path) "Emacs 21 and XEmacs don't have `image-search-load-path'. This function returns nil on those systems." nil) @@ -292,7 +292,7 @@ introduced in Emacs 24." `(make-obsolete-variable ,obsolete-name ,current-name ,when ,access-type)))) (defun-mh mh-match-string-no-properties - match-string-no-properties (num &optional string) + match-string-no-properties (num &optional _string) "Return string of text matched by last search, without text properties. This function is used by XEmacs that lacks `match-string-no-properties'. The function `buffer-substring-no-properties' is used instead. @@ -301,7 +301,7 @@ The argument STRING is ignored." (match-beginning num) (match-end num))) (defun-mh mh-replace-regexp-in-string replace-regexp-in-string - (regexp rep string &optional fixedcase literal subexp start) + (regexp rep string &optional _fixedcase literal _subexp _start) "Replace REGEXP with REP everywhere in STRING and return result. This function is used by XEmacs that lacks `replace-regexp-in-string'. The function `replace-in-string' is used instead. @@ -311,7 +311,7 @@ The arguments FIXEDCASE, SUBEXP, and START, used by (replace-in-string string regexp rep literal))) (defun-mh mh-test-completion - test-completion (string collection &optional predicate) + test-completion (_string _collection &optional _predicate) "Return non-nil if STRING is a valid completion. XEmacs does not have `test-completion'. This function returns nil on that system." nil) @@ -352,7 +352,7 @@ The arguments RETURN-TO and EXIT-ACTION are ignored." (view-mode 1)) (defun-mh mh-window-full-height-p - window-full-height-p (&optional WINDOW) + window-full-height-p (&optional _window) "Return non-nil if WINDOW is not the result of a vertical split. This function is defined in XEmacs as it lacks `window-full-height-p'. The values of the functions |