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-speed.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-speed.el')
-rw-r--r-- | lisp/mh-e/mh-speed.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index fc661c882ee..c615ba6913d 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -31,7 +31,6 @@ ;;; Code: (require 'mh-e) -(mh-require-cl) (require 'gnus-util) (require 'speedbar) @@ -184,7 +183,7 @@ The optional arguments from speedbar are IGNORED." ;;; Support Routines ;;;###mh-autoload -(defun mh-folder-speedbar-buttons (buffer) +(defun mh-folder-speedbar-buttons (_buffer) "Interface function to create MH-E speedbar buffer. BUFFER is the MH-E buffer for which the speedbar buffer is to be created." @@ -438,7 +437,7 @@ flists is run only for that one folder." ;; Copied from mh-make-folder-list-filter... ;; XXX Refactor to use mh-make-folder-list-filer? -(defun mh-speed-parse-flists-output (process output) +(defun mh-speed-parse-flists-output (_process output) "Parse the incremental results from flists. PROCESS is the flists process and OUTPUT is the results that must be handled next." @@ -451,7 +450,7 @@ be handled next." mh-speed-partial-line (substring output position line-end)) mh-speed-partial-line "") - (multiple-value-setq (folder unseen total) + (cl-multiple-value-setq (folder unseen total) (cl-values-list (mh-parse-flist-output-line line mh-speed-current-folder))) (when (and folder unseen total @@ -555,12 +554,12 @@ The function invalidates the latest ancestor that is present." (last-slash (mh-search-from-end ?/ folder)) (ancestor folder) (ancestor-pos nil)) - (block while-loop + (cl-block while-loop (while last-slash (setq ancestor (substring ancestor 0 last-slash)) (setq ancestor-pos (gethash ancestor mh-speed-folder-map)) (when ancestor-pos - (return-from while-loop)) + (cl-return-from while-loop)) (setq last-slash (mh-search-from-end ?/ ancestor)))) (unless ancestor-pos (setq ancestor nil)) (goto-char (or ancestor-pos (gethash nil mh-speed-folder-map))) |