* lisp/mh-e/mh-alias.el: Use lexical-binding.
(mh-alias-insert-file): Completion tables can be mere lists of strings.
* lisp/mh-e/mh-mime.el: Use lexical-binding.
(mh-mm-inline-message): Remove always-nil var `visible-headers`.
* lisp/mh-e/mh-search.el: Use lexical-binding.
(mh-search-folder): Remove unused var `pick-folder`.
* lisp/mh-e/mh-show.el: Use lexical-binding.
(mh-display-msg): Remove always-nil var `visible-headers`.
* lisp/mh-e/mh-utils.el: Use lexical-binding.
(completion-root-regexp): Always declare var.
* lisp/mh-e/mh-buffers.el: Use lexical-binding.
* lisp/mh-e/mh-comp.el: Use lexical-binding.
* lisp/mh-e/mh-folder.el: Use lexical-binding.
* lisp/mh-e/mh-funcs.el: Use lexical-binding.
* lisp/mh-e/mh-gnus.el: Use lexical-binding.
* lisp/mh-e/mh-identity.el: Use lexical-binding.
* lisp/mh-e/mh-inc.el: Use lexical-binding.
* lisp/mh-e/mh-junk.el: Use lexical-binding.
* lisp/mh-e/mh-letter.el: Use lexical-binding.
* lisp/mh-e/mh-limit.el: Use lexical-binding.
* lisp/mh-e/mh-print.el: Use lexical-binding.
* lisp/mh-e/mh-scan.el: Use lexical-binding.
* lisp/mh-e/mh-seq.el: Use lexical-binding.
* lisp/mh-e/mh-speed.el: Use lexical-binding.
* lisp/mh-e/mh-thread.el: Use lexical-binding.
* lisp/mh-e/mh-tool-bar.el: Use lexical-binding.
* lisp/mh-e/mh-xface.el: Use lexical-binding.
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`.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
* mh-compat.el: Rename mh-cl-flet to mh-flet and convert alias to
macro using patch from Katsumi Yamaoka <yamaoka@jpl.org>.
* mh-thread.el (mh-thread-set-tables):
* mh-show.el (mh-gnus-article-highlight-citation):
* mh-mime.el (mh-display-with-external-viewer):
(mh-mime-display, mh-press-button, mh-push-button):
(mh-display-emphasis): Call mh-flet instead of mh-cl-flet.
(mh-make-obsolete-variable): New macros to fix XEmacs compiler
warnings.
* mh-letter.el (mh-yank-hooks): Use new mh-make-obsolete-variable
macro.
* mh-e.el (mh-kill-folder-suppress-prompt-hooks): Use new
mh-define-obsolete-variable-alias macro.
* mh-compat.el (mh-cl-flet): New alias for cl-flet on Emacs 24 and
flet elsewhere.
* mh-thread.el (mh-thread-set-tables): Replace flet with new alias
mh-cl-flet.
* mh-show.el (mh-gnus-article-highlight-citation): Replace flet with
new alias mh-cl-flet.
* mh-mime.el (mh-display-with-external-viewer, mh-mime-display)
(mh-press-button, mh-push-button, mh-display-emphasis): Replace flet
with new alias mh-cl-flet.
* mh-e.el (mh-invisible-header-fields-internal): Remove trailing
whitespace.
instead of replace-regexp-in-string.
(crm, multi-prompt): Use mh-require instead of require.
(mh-goto-address-find-address-at-point): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position. Use
mh-match-string-no-properties instead of match-string-no-properties.
* mh-comp.el (mh-modify-header-field): Use mh-line-beginning-position
and mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-compat.el (mailabbrev): Use mh-require instead of require.
(mh-assoc-string, mh-display-completion-list, mh-face-foreground)
(mh-face-background): Make docstring consistent.
(mh-require, mh-cancel-timer, mh-display-color-cells)
(mh-line-beginning-position, mh-line-end-position)
(mh-match-string-no-properties, mh-replace-regexp-in-string)
(mh-view-mode-enter): Move definition here from mh-xemacs.el and add
mh- prefix since compatibility functions should have our package
prefix (mh-) by Emacs convention and to avoid messing up checks for
the same functions in other packages.
* mh-e.el (mh-compiling-flag): Move mh-xemacs-compiling-flag here from
mh-xemacs.el and rename.
(mh-xargs): Use mh-line-beginning-position and mh-line-end-position
instead of line-beginning-position and line-end-position.
(mh-defface-compat): Use mh-display-color-cells instead of
display-color-cells.
* mh-folder.el (which-func): Use mh-require instead of require.
* mh-funcs.el (mh-list-folders): Use mh-view-mode-enter instead of
view-mode-enter.
* mh-gnus.el (gnus-util, mm-bodies, mm-decode, mm-view, mml): Use
mh-require instead of require.
* mh-letter.el (mh-letter-header-end, mh-letter-mode)
(mh-letter-next-header-field): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-limit.el (mh-subject-to-sequence-unthreaded): Use
mh-match-string-no-properties instead of match-string-no-properties.
(mh-narrow-to-header-field): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-mime.el (mh-mime-inline-part, mh-mm-display-part)
(mh-mh-quote-unescaped-sharp, mh-mh-directive-present-p): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-search.el (which-func): Use mh-require instead of require.
(mh-make-pick-template, mh-index-visit-folder)
(mh-pick-parse-search-buffer, mh-swish-next-result)
(mh-mairix-next-result, mh-namazu-next-result)
(mh-pick-next-result, mh-grep-next-result)
(mh-index-create-imenu-index, mh-index-match-checksum)
(mh-md5sum-parser, mh-openssl-parser, mh-index-update-maps): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-seq.el (mh-list-sequences): Use mh-view-mode-enter instead of
view-mode-enter.
(mh-folder-size-flist, mh-parse-flist-output-line)
(mh-add-sequence-notation): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-show.el (mh-show-addr): Use mh-require instead of require.
* mh-speed.el (mh-folder-speedbar-menu-items, mh-speed-toggle)
(mh-speed-view, mh-folder-speedbar-buttons)
(mh-speed-highlight, mh-speed-goto-folder)
(mh-speed-add-buttons, mh-speed-parse-flists-output)
(mh-speed-invalidate-map, mh-speedbar-change-expand-button-char)
(mh-speed-add-folder): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
(mh-speed-flists): Use mh-cancel-timer instead of cancel-timer.
* mh-thread.el (mh-thread-find-children)
(mh-thread-parse-scan-line, mh-thread-generate): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-utils.el (mh-colors-available-p): Use mh-display-color-cells
instead of display-color-cells.
(mh-folder-list): Use mh-replace-regexp-in-string instead of
replace-regexp-in-string.
(mh-sub-folders-actual, mh-letter-toggle-header-field-display): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-comp.el (mh-send-sub): Don't find components file in current
directory--this seems to have been a side-effect of commenting out the
use of an old mh-etc variable. Improve error message.