diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-22 16:54:59 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-22 16:54:59 -0500 |
commit | 79d585c2befb81ac5480a9577eaeb6e8915cae23 (patch) | |
tree | e67a40183ad9aed2ee63dd5d1e3b00f8805c854a /lisp/obsolete/mouse-sel.el | |
parent | 59698d924e541b1768a61caafd0dfa40b5ed4b34 (diff) | |
download | emacs-79d585c2befb81ac5480a9577eaeb6e8915cae23.tar.gz |
* lisp/obsolete: Use lexical-binding
Use lexical-binding in all the lisp/obsolete/*.el files.
While at it, removed redundant :group arguments and used #' to quote
functions. Commented out the key bindings which the #' revealed
to lead to non-existing commands, and replaced those revealed to be obsolete.
* lisp/obsolete/cl-compat.el: Use cl-lib.
* lisp/obsolete/cust-print.el: Assume `defalias` exists.
(with-custom-print): Use `declare`.
* lisp/obsolete/iswitchb.el (iswitchb-init-XEmacs-trick)
(iswitchb-xemacs-backspacekey): Remove functions.
* lisp/obsolete/landmark.el (landmark, landmark-nslify-wts):
Prefer `apply` to `eval`.
* lisp/obsolete/longlines.el (longlines-mode): Don't use `add-to-list`
on a hook.
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): Use `clear-string`.
* lisp/obsolete/pgg-pgp.el (pgg-pgp-encrypt-region): Remove oddly
unused var `passphrase`.
(pgg-pgp-verify-region): Declare var `jam-zcat-filename-list`.
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-encrypt-region): Remove oddly
unused var `passphrase`.
(pgg-pgp5-verify-region): Declare var `jam-zcat-filename-list`.
* lisp/obsolete/pgg.el: Remove some XEmacs compatibility code.
(pgg-run-at-time, pgg-cancel-timer, pgg-clear-string): Remove functions.
Use their core equivalent instead.
* lisp/obsolete/rcompile.el (remote-compile): Remove unused vars `l`,
`l-host`, `l-user`, and `localname`.
* lisp/obsolete/starttls.el (starttls-any-program-available):
Use `define-obsolete-function-alias`.
* lisp/obsolete/tls.el (tls-format-message): Delete function, use
`format-message` instead.
* lisp/obsolete/url-ns.el (url-ns-prefs): Use `with-current-buffer`
and `dlet`.
* lisp/obsolete/vip.el (vip-escape-to-emacs): Remove unused var `key`.
(vip-command-argument, vip-read-string, ex-delete, ex-line): Remove
unused var `conditions`.
(ex-map): Use a closure instead of `eval`.
(ex-set): Make it an alias of `set-variable`.
(ex-substitute): Remove unused var `cont`.
* lisp/obsolete/abbrevlist.el:
* lisp/obsolete/bruce.el:
* lisp/obsolete/cc-compat.el:
* lisp/obsolete/cl-compat.el:
* lisp/obsolete/cl.el:
* lisp/obsolete/complete.el:
* lisp/obsolete/crisp.el:
* lisp/obsolete/cust-print.el:
* lisp/obsolete/erc-compat.el:
* lisp/obsolete/erc-hecomplete.el:
* lisp/obsolete/eudcb-ph.el:
* lisp/obsolete/fast-lock.el:
* lisp/obsolete/gs.el:
* lisp/obsolete/gulp.el:
* lisp/obsolete/html2text.el:
* lisp/obsolete/info-edit.el:
* lisp/obsolete/iswitchb.el:
* lisp/obsolete/landmark.el:
* lisp/obsolete/lazy-lock.el:
* lisp/obsolete/longlines.el:
* lisp/obsolete/mailpost.el:
* lisp/obsolete/mantemp.el:
* lisp/obsolete/meese.el:
* lisp/obsolete/messcompat.el:
* lisp/obsolete/metamail.el:
* lisp/obsolete/mouse-sel.el:
* lisp/obsolete/nnir.el:
* lisp/obsolete/old-emacs-lock.el:
* lisp/obsolete/otodo-mode.el:
* lisp/obsolete/patcomp.el:
* lisp/obsolete/pc-mode.el:
* lisp/obsolete/pc-select.el:
* lisp/obsolete/pgg-def.el:
* lisp/obsolete/pgg-gpg.el:
* lisp/obsolete/pgg-parse.el:
* lisp/obsolete/pgg-pgp.el:
* lisp/obsolete/pgg-pgp5.el:
* lisp/obsolete/pgg.el:
* lisp/obsolete/rcompile.el:
* lisp/obsolete/s-region.el:
* lisp/obsolete/sb-image.el:
* lisp/obsolete/sregex.el:
* lisp/obsolete/starttls.el:
* lisp/obsolete/sup-mouse.el:
* lisp/obsolete/terminal.el:
* lisp/obsolete/tls.el:
* lisp/obsolete/tpu-edt.el:
* lisp/obsolete/tpu-extras.el:
* lisp/obsolete/tpu-mapper.el:
* lisp/obsolete/url-ns.el:
* lisp/obsolete/vc-arch.el:
* lisp/obsolete/vi.el:
* lisp/obsolete/vip.el:
* lisp/obsolete/ws-mode.el:
* lisp/obsolete/yow.el: Use lexical-binding.
Diffstat (limited to 'lisp/obsolete/mouse-sel.el')
-rw-r--r-- | lisp/obsolete/mouse-sel.el | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/obsolete/mouse-sel.el b/lisp/obsolete/mouse-sel.el index 608596e882b..36d9dc658c7 100644 --- a/lisp/obsolete/mouse-sel.el +++ b/lisp/obsolete/mouse-sel.el @@ -1,4 +1,4 @@ -;;; mouse-sel.el --- multi-click selection support +;;; mouse-sel.el --- multi-click selection support -*- lexical-binding: t; -*- ;; Copyright (C) 1993-1995, 2001-2021 Free Software Foundation, Inc. @@ -146,20 +146,17 @@ If non-nil, \\[mouse-select] and \\[mouse-extend] will leave point at the end of the region nearest to where the mouse last was. If nil, point will always be placed at the beginning of the region." - :type 'boolean - :group 'mouse-sel) + :type 'boolean) (defcustom mouse-sel-cycle-clicks t "If non-nil, \\[mouse-select] cycles the click-counts after 4 clicks." - :type 'boolean - :group 'mouse-sel) + :type 'boolean) (defcustom mouse-sel-default-bindings t "Control mouse bindings." :type '(choice (const :tag "none" nil) (const :tag "cut and paste" interprogram-cut-paste) - (other :tag "default bindings" t)) - :group 'mouse-sel) + (other :tag "default bindings" t))) ;;=== Key bindings ======================================================== @@ -216,14 +213,13 @@ the mouse position (or point, if `mouse-yank-at-point' is non-nil). - mouse-2 while selecting or extending copies selection to the kill ring; mouse-1 or mouse-3 kills it." :global t - :group 'mouse-sel (if mouse-sel-mode (progn ;; If mouse-2 has never been done by the user, initialize the ;; `event-kind' property to ensure that `follow-link' clicks ;; are interpreted correctly. (put 'mouse-2 'event-kind 'mouse-click) - (add-hook 'x-lost-selection-functions 'mouse-sel-lost-selection-hook) + (add-hook 'x-lost-selection-functions #'mouse-sel-lost-selection-hook) (when mouse-sel-default-bindings ;; Save original bindings and replace them with new ones. (setq mouse-sel-original-bindings @@ -240,7 +236,7 @@ kill ring; mouse-1 or mouse-3 kills it." #'mouse-sel--ignore)))) ;; Restore original bindings - (remove-hook 'x-lost-selection-functions 'mouse-sel-lost-selection-hook) + (remove-hook 'x-lost-selection-functions #'mouse-sel-lost-selection-hook) (dolist (binding mouse-sel-original-bindings) (global-set-key (car binding) (cdr binding))) ;; Restore the old values of these variables, |