summaryrefslogtreecommitdiff
path: root/lisp/obsolete
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/obsolete')
-rw-r--r--lisp/obsolete/abbrevlist.el4
-rw-r--r--lisp/obsolete/bruce.el10
-rw-r--r--lisp/obsolete/cc-compat.el4
-rw-r--r--lisp/obsolete/cl-compat.el51
-rw-r--r--lisp/obsolete/cl.el49
-rw-r--r--lisp/obsolete/complete.el80
-rw-r--r--lisp/obsolete/crisp.el130
-rw-r--r--lisp/obsolete/cust-print.el47
-rw-r--r--lisp/obsolete/erc-compat.el7
-rw-r--r--lisp/obsolete/erc-hecomplete.el11
-rw-r--r--lisp/obsolete/eudcb-ph.el6
-rw-r--r--lisp/obsolete/fast-lock.el144
-rw-r--r--lisp/obsolete/gs.el4
-rw-r--r--lisp/obsolete/gulp.el17
-rw-r--r--lisp/obsolete/html2text.el2
-rw-r--r--lisp/obsolete/info-edit.el4
-rw-r--r--lisp/obsolete/inversion.el530
-rw-r--r--lisp/obsolete/iswitchb.el192
-rw-r--r--lisp/obsolete/landmark.el153
-rw-r--r--lisp/obsolete/lazy-lock.el168
-rw-r--r--lisp/obsolete/longlines.el57
-rw-r--r--lisp/obsolete/mailpost.el4
-rw-r--r--lisp/obsolete/mantemp.el2
-rw-r--r--lisp/obsolete/meese.el2
-rw-r--r--lisp/obsolete/messcompat.el2
-rw-r--r--lisp/obsolete/metamail.el13
-rw-r--r--lisp/obsolete/mouse-sel.el16
-rw-r--r--lisp/obsolete/nnir.el116
-rw-r--r--lisp/obsolete/old-emacs-lock.el16
-rw-r--r--lisp/obsolete/otodo-mode.el113
-rw-r--r--lisp/obsolete/patcomp.el2
-rw-r--r--lisp/obsolete/pc-mode.el18
-rw-r--r--lisp/obsolete/pc-select.el17
-rw-r--r--lisp/obsolete/pgg-def.el10
-rw-r--r--lisp/obsolete/pgg-gpg.el12
-rw-r--r--lisp/obsolete/pgg-parse.el18
-rw-r--r--lisp/obsolete/pgg-pgp.el16
-rw-r--r--lisp/obsolete/pgg-pgp5.el14
-rw-r--r--lisp/obsolete/pgg.el113
-rw-r--r--lisp/obsolete/rcompile.el21
-rw-r--r--lisp/obsolete/s-region.el8
-rw-r--r--lisp/obsolete/sb-image.el2
-rw-r--r--lisp/obsolete/sregex.el40
-rw-r--r--lisp/obsolete/starttls.el34
-rw-r--r--lisp/obsolete/sup-mouse.el2
-rw-r--r--lisp/obsolete/terminal.el76
-rw-r--r--lisp/obsolete/tls.el33
-rw-r--r--lisp/obsolete/tpu-edt.el441
-rw-r--r--lisp/obsolete/tpu-extras.el35
-rw-r--r--lisp/obsolete/tpu-mapper.el4
-rw-r--r--lisp/obsolete/url-ns.el45
-rw-r--r--lisp/obsolete/vc-arch.el31
-rw-r--r--lisp/obsolete/vi.el308
-rw-r--r--lisp/obsolete/vip.el324
-rw-r--r--lisp/obsolete/ws-mode.el242
-rw-r--r--lisp/obsolete/yow.el5
56 files changed, 1934 insertions, 1891 deletions
diff --git a/lisp/obsolete/abbrevlist.el b/lisp/obsolete/abbrevlist.el
index 1d517dbd116..c9c0956903f 100644
--- a/lisp/obsolete/abbrevlist.el
+++ b/lisp/obsolete/abbrevlist.el
@@ -1,4 +1,4 @@
-;;; abbrevlist.el --- list one abbrev table alphabetically ordered
+;;; abbrevlist.el --- list one abbrev table alphabetically ordered -*- lexical-binding: t; -*-
;; Copyright (C) 1986, 1992, 2001-2021 Free Software Foundation, Inc.
;; Suggested by a previous version by Gildea.
@@ -38,7 +38,7 @@
(function (lambda (abbrev)
(setq abbrev-list (cons abbrev abbrev-list))))
abbrev-table)
- (setq abbrev-list (sort abbrev-list 'string-lessp))
+ (setq abbrev-list (sort abbrev-list #'string-lessp))
(while abbrev-list
(if (> (+ first-column 40) (window-width))
(progn
diff --git a/lisp/obsolete/bruce.el b/lisp/obsolete/bruce.el
index 398f315c5d4..1c3581f7d05 100644
--- a/lisp/obsolete/bruce.el
+++ b/lisp/obsolete/bruce.el
@@ -1,4 +1,4 @@
-;;; bruce.el --- bruce phrase utility for overloading the Communications
+;;; bruce.el --- bruce phrase utility for overloading the Communications -*- lexical-binding: t; -*-
;;; Decency Act snoops, if any.
;; Copyright (C) 1988, 1993, 1997, 2001-2021 Free Software Foundation,
@@ -30,7 +30,7 @@
;; Decency Act of 1996. This Act bans "indecent speech", whatever that is,
;; from the Internet. For more on the CDA, see Richard Stallman's essay on
;; censorship, included in the etc directory of emacs distributions 19.34
-;; and up. See also http://www.eff.org/blueribbon.html.
+;; and up. See also https://www.eff.org/blueribbon.html.
;; For many years, emacs has included a program called Spook. This program
;; adds a series of "keywords" to email just before it goes out. On the
@@ -113,13 +113,11 @@
(defcustom bruce-phrases-file "~/bruce.lines"
"Keep your favorite phrases here."
- :type 'file
- :group 'bruce)
+ :type 'file)
(defcustom bruce-phrase-default-count 15
"Default number of phrases to insert."
- :type 'integer
- :group 'bruce)
+ :type 'integer)
;;;###autoload
(defun bruce ()
diff --git a/lisp/obsolete/cc-compat.el b/lisp/obsolete/cc-compat.el
index 96b036e892c..037a8e9e87c 100644
--- a/lisp/obsolete/cc-compat.el
+++ b/lisp/obsolete/cc-compat.el
@@ -1,4 +1,4 @@
-;;; cc-compat.el --- cc-mode compatibility with c-mode.el confusion
+;;; cc-compat.el --- cc-mode compatibility with c-mode.el confusion -*- lexical-binding: t; -*-
;; Copyright (C) 1985, 1987, 1992-2021 Free Software Foundation, Inc.
@@ -156,7 +156,7 @@ This is in addition to c-continued-statement-offset.")
(if bracep 0 c-indent-level)))))
-(defun cc-substatement-open-offset (langelem)
+(defun cc-substatement-open-offset (_langelem)
(+ c-continued-statement-offset c-continued-brace-offset))
diff --git a/lisp/obsolete/cl-compat.el b/lisp/obsolete/cl-compat.el
index 4abedf3e627..619bc06122b 100644
--- a/lisp/obsolete/cl-compat.el
+++ b/lisp/obsolete/cl-compat.el
@@ -1,4 +1,4 @@
-;;; cl-compat.el --- Common Lisp extensions for GNU Emacs Lisp (compatibility)
+;;; cl-compat.el --- Common Lisp extensions for GNU Emacs Lisp (compatibility) -*- lexical-binding: t; -*-
;; Copyright (C) 1993, 2001-2021 Free Software Foundation, Inc.
@@ -46,31 +46,23 @@
;;; Code:
-;; This used to be:
-;; (or (featurep 'cl) (require 'cl))
-;; which just has the effect of fooling the byte-compiler into not
-;; loading cl when compiling. However, that leads to some bogus
-;; compiler warnings. Loading cl when compiling cannot do any harm,
-;; because for a long time bootstrap-emacs contained 'cl, due to being
-;; dumped from uncompiled files that eval-when-compile'd cl. So every
-;; file was compiled with 'cl loaded.
-(require 'cl)
+(require 'cl-lib)
;;; Keyword routines not supported by new package.
(defmacro defkeyword (x &optional doc)
- (list* 'defconst x (list 'quote x) (and doc (list doc))))
+ (cl-list* 'defconst x (list 'quote x) (and doc (list doc))))
(defun keyword-of (sym)
(or (keywordp sym) (keywordp (intern (format ":%s" sym)))))
-;;; Multiple values. Note that the new package uses a different
-;;; convention for multiple values. The following definitions
-;;; emulate the old convention; all function names have been changed
-;;; by capitalizing the first letter: Values, Multiple-value-*,
-;;; to avoid conflict with the new-style definitions in cl-macs.
+;; Multiple values. Note that the new package uses a different
+;; convention for multiple values. The following definitions
+;; emulate the old convention; all function names have been changed
+;; by capitalizing the first letter: Values, Multiple-value-*,
+;; to avoid conflict with the new-style definitions in cl-macs.
(defvar *mvalues-values* nil)
@@ -79,7 +71,7 @@
(car val-forms))
(defun Values-list (val-forms)
- (apply 'values val-forms))
+ (apply #'cl-values val-forms))
(defmacro Multiple-value-list (form)
(list 'let* (list '(*mvalues-values* nil) (list '*mvalues-temp* form))
@@ -95,7 +87,7 @@
(defmacro Multiple-value-bind (vars form &rest body)
(declare (indent 2))
- (list* 'multiple-value-bind vars (list 'Multiple-value-list form) body))
+ (cl-list* 'multiple-value-bind vars (list 'Multiple-value-list form) body))
(defmacro Multiple-value-setq (vars form)
(declare (indent 2))
@@ -103,17 +95,16 @@
(defmacro Multiple-value-prog1 (form &rest body)
(declare (indent 1))
- (list 'prog1 form (list* 'let '((*mvalues-values* nil)) body)))
+ (list 'prog1 form (cl-list* 'let '((*mvalues-values* nil)) body)))
;;; Routines for parsing keyword arguments.
(defun build-klist (arglist keys &optional allow-others)
- (let ((res (Multiple-value-call 'mapcar* 'cons (unzip-lists arglist))))
+ (let ((res (Multiple-value-call #'cl-mapcar 'cons (unzip-lists arglist))))
(or allow-others
- (with-suppressed-warnings ((obsolete set-difference))
- (let ((bad (set-difference (mapcar 'car res) keys)))
- (if bad (error "Bad keywords: %s not in %s" bad keys)))))
+ (let ((bad (cl-set-difference (mapcar #'car res) keys)))
+ (if bad (error "Bad keywords: %s not in %s" bad keys))))
res))
(defun extract-from-klist (klist key &optional def)
@@ -131,18 +122,16 @@
(funcall (or test 'eql) item elt))))
(defun safe-idiv (a b)
- (with-suppressed-warnings ((obsolete signum))
- (let* ((q (/ (abs a) (abs b)))
- (s (* (signum a) (signum b))))
- (Values q (- a (* s q b)) s))))
+ (let* ((q (/ (abs a) (abs b)))
+ (s (* (cl-signum a) (cl-signum b))))
+ (Values q (- a (* s q b)) s)))
;; Internal routines.
(defun pair-with-newsyms (oldforms)
- (with-suppressed-warnings ((obsolete mapcar*))
- (let ((newsyms (mapcar (lambda (x) (make-symbol "--cl-var--")) oldforms)))
- (Values (mapcar* 'list newsyms oldforms) newsyms))))
+ (let ((newsyms (mapcar (lambda (_) (make-symbol "--cl-var--")) oldforms)))
+ (Values (cl-mapcar #'list newsyms oldforms) newsyms)))
(defun zip-lists (evens odds)
(cl-mapcan 'list evens odds))
@@ -154,7 +143,7 @@
(Values (nreverse e) (nreverse o))))
(defun reassemble-argslists (list)
- (let ((n (apply 'min (mapcar 'length list))) (res nil))
+ (let ((n (apply #'min (mapcar #'length list))) (res nil))
(while (>= (setq n (1- n)) 0)
(setq res (cons (mapcar (function (lambda (x) (elt x n))) list) res)))
res))
diff --git a/lisp/obsolete/cl.el b/lisp/obsolete/cl.el
index 95af29bb87f..9df62318572 100644
--- a/lisp/obsolete/cl.el
+++ b/lisp/obsolete/cl.el
@@ -331,7 +331,7 @@ The two cases that are handled are:
(cddr f))))
(if (and cl-closure-vars
(cl--expr-contains-any body cl-closure-vars))
- (let* ((new (mapcar 'cl-gensym cl-closure-vars))
+ (let* ((new (mapcar #'cl-gensym cl-closure-vars))
(sub (cl-pairlis cl-closure-vars new)) (decls nil))
(while (or (stringp (car body))
(eq (car-safe (car body)) 'interactive))
@@ -431,14 +431,13 @@ definitions, or lack thereof).
(obsolete "use either `cl-flet' or `cl-letf'." "24.3"))
`(letf ,(mapcar
(lambda (x)
- (if (or (and (fboundp (car x))
- (eq (car-safe (symbol-function (car x))) 'macro))
+ (if (or (eq (car-safe (symbol-function (car x))) 'macro)
(cdr (assq (car x) macroexpand-all-environment)))
(error "Use `labels', not `flet', to rebind macro names"))
(let ((func `(cl-function
(lambda ,(cadr x)
(cl-block ,(car x) ,@(cddr x))))))
- (when (cl--compiling-file)
+ (when (macroexp-compiling-p)
;; Bug#411. It would be nice to fix this.
(and (get (car x) 'byte-compile)
(error "Byte-compiling a redefinition of `%s' \
@@ -446,7 +445,7 @@ will not work - use `labels' instead" (symbol-name (car x))))
;; FIXME This affects the rest of the file, when it
;; should be restricted to the flet body.
(and (boundp 'byte-compile-function-environment)
- (push (cons (car x) (eval func))
+ (push (cons (car x) (eval func t))
byte-compile-function-environment)))
(list `(symbol-function ',(car x)) func)))
bindings)
@@ -466,10 +465,10 @@ rather than relying on `lexical-binding'."
(push `(cl-function (lambda . ,(cdr binding))) sets)
(push var sets)
(push (cons (car binding)
- `(lambda (&rest cl-labels-args)
- (if (eq (car cl-labels-args) cl--labels-magic)
- (list cl--labels-magic ',var)
- (cl-list* 'funcall ',var cl-labels-args))))
+ (lambda (&rest cl-labels-args)
+ (if (eq (car cl-labels-args) cl--labels-magic)
+ (list cl--labels-magic var)
+ (cl-list* 'funcall var cl-labels-args))))
newenv)))
;; `lexical-let' adds `cl--function-convert' (which calls
;; `cl--labels-convert') as a macroexpander for `function'.
@@ -630,10 +629,10 @@ You can replace this macro with `gv-letplace'."
;;; Additional compatibility code.
;; For names that were clean but really aren't needed any more.
-(define-obsolete-function-alias 'cl-macroexpand 'macroexpand "24.3")
+(define-obsolete-function-alias 'cl-macroexpand #'macroexpand "24.3")
(define-obsolete-variable-alias 'cl-macro-environment
'macroexpand-all-environment "24.3")
-(define-obsolete-function-alias 'cl-macroexpand-all 'macroexpand-all "24.3")
+(define-obsolete-function-alias 'cl-macroexpand-all #'macroexpand-all "24.3")
;;; Hash tables.
;; This is just kept for compatibility with code byte-compiled by Emacs-20.
@@ -652,22 +651,22 @@ You can replace this macro with `gv-letplace'."
(defvar cl-builtin-maphash (symbol-function 'maphash))
(make-obsolete-variable 'cl-builtin-maphash nil "24.3")
-(define-obsolete-function-alias 'cl-map-keymap 'map-keymap "24.3")
-(define-obsolete-function-alias 'cl-copy-tree 'copy-tree "24.3")
-(define-obsolete-function-alias 'cl-gethash 'gethash "24.3")
-(define-obsolete-function-alias 'cl-puthash 'puthash "24.3")
-(define-obsolete-function-alias 'cl-remhash 'remhash "24.3")
-(define-obsolete-function-alias 'cl-clrhash 'clrhash "24.3")
-(define-obsolete-function-alias 'cl-maphash 'maphash "24.3")
-(define-obsolete-function-alias 'cl-make-hash-table 'make-hash-table "24.3")
-(define-obsolete-function-alias 'cl-hash-table-p 'hash-table-p "24.3")
-(define-obsolete-function-alias 'cl-hash-table-count 'hash-table-count "24.3")
+(define-obsolete-function-alias 'cl-map-keymap #'map-keymap "24.3")
+(define-obsolete-function-alias 'cl-copy-tree #'copy-tree "24.3")
+(define-obsolete-function-alias 'cl-gethash #'gethash "24.3")
+(define-obsolete-function-alias 'cl-puthash #'puthash "24.3")
+(define-obsolete-function-alias 'cl-remhash #'remhash "24.3")
+(define-obsolete-function-alias 'cl-clrhash #'clrhash "24.3")
+(define-obsolete-function-alias 'cl-maphash #'maphash "24.3")
+(define-obsolete-function-alias 'cl-make-hash-table #'make-hash-table "24.3")
+(define-obsolete-function-alias 'cl-hash-table-p #'hash-table-p "24.3")
+(define-obsolete-function-alias 'cl-hash-table-count #'hash-table-count "24.3")
(define-obsolete-function-alias 'cl-map-keymap-recursively
- 'cl--map-keymap-recursively "24.3")
-(define-obsolete-function-alias 'cl-map-intervals 'cl--map-intervals "24.3")
-(define-obsolete-function-alias 'cl-map-extents 'cl--map-overlays "24.3")
-(define-obsolete-function-alias 'cl-set-getf 'cl--set-getf "24.3")
+ #'cl--map-keymap-recursively "24.3")
+(define-obsolete-function-alias 'cl-map-intervals #'cl--map-intervals "24.3")
+(define-obsolete-function-alias 'cl-map-extents #'cl--map-overlays "24.3")
+(define-obsolete-function-alias 'cl-set-getf #'cl--set-getf "24.3")
(defun cl-maclisp-member (item list)
(declare (obsolete member "24.3"))
diff --git a/lisp/obsolete/complete.el b/lisp/obsolete/complete.el
index 735e1e0b6a6..2d3be2dd9a4 100644
--- a/lisp/obsolete/complete.el
+++ b/lisp/obsolete/complete.el
@@ -1,4 +1,4 @@
-;;; complete.el --- partial completion mechanism plus other goodies
+;;; complete.el --- partial completion mechanism plus other goodies -*- lexical-binding: t; -*-
;; Copyright (C) 1990-1993, 1999-2021 Free Software Foundation, Inc.
@@ -102,14 +102,12 @@ If non-nil and non-t, the first character is taken literally only for file name
completion."
:type '(choice (const :tag "delimiter" nil)
(const :tag "literal" t)
- (other :tag "find-file" find-file))
- :group 'partial-completion)
+ (other :tag "find-file" find-file)))
(defcustom PC-meta-flag t
"If non-nil, TAB means PC completion and M-TAB means normal completion.
Otherwise, TAB means normal completion and M-TAB means Partial Completion."
- :type 'boolean
- :group 'partial-completion)
+ :type 'boolean)
(defcustom PC-word-delimiters "-_. "
"A string of characters treated as word delimiters for completion.
@@ -119,19 +117,16 @@ If `^' is in this string, it must not come first.
If `-' is in this string, it must come first or right after `]'.
In other words, if S is this string, then `[S]' must be a valid Emacs regular
expression (not containing character ranges like `a-z')."
- :type 'string
- :group 'partial-completion)
+ :type 'string)
(defcustom PC-include-file-path '("/usr/include" "/usr/local/include")
"A list of directories in which to look for include files.
If nil, means use the colon-separated path in the variable $INCPATH instead."
- :type '(repeat directory)
- :group 'partial-completion)
+ :type '(repeat directory))
(defcustom PC-disable-includes nil
"If non-nil, include-file support in \\[find-file] is disabled."
- :type 'boolean
- :group 'partial-completion)
+ :type 'boolean)
(defvar PC-default-bindings t
"If non-nil, default partial completion key bindings are suppressed.")
@@ -146,36 +141,36 @@ If nil, means use the colon-separated path in the variable $INCPATH instead."
(cond ((not bind)
;; These bindings are the default bindings. It would be better to
;; restore the previous bindings.
- (define-key read-expression-map "\e\t" 'lisp-complete-symbol)
+ (define-key read-expression-map "\e\t" #'completion-at-point)
- (define-key completion-map "\t" 'minibuffer-complete)
- (define-key completion-map " " 'minibuffer-complete-word)
- (define-key completion-map "?" 'minibuffer-completion-help)
+ (define-key completion-map "\t" #'minibuffer-complete)
+ (define-key completion-map " " #'minibuffer-complete-word)
+ (define-key completion-map "?" #'minibuffer-completion-help)
- (define-key must-match-map "\r" 'minibuffer-complete-and-exit)
- (define-key must-match-map "\n" 'minibuffer-complete-and-exit)
+ (define-key must-match-map "\r" #'minibuffer-complete-and-exit)
+ (define-key must-match-map "\n" #'minibuffer-complete-and-exit)
(define-key global-map [remap lisp-complete-symbol] nil))
(PC-default-bindings
- (define-key read-expression-map "\e\t" 'PC-lisp-complete-symbol)
+ (define-key read-expression-map "\e\t" #'PC-lisp-complete-symbol)
- (define-key completion-map "\t" 'PC-complete)
- (define-key completion-map " " 'PC-complete-word)
- (define-key completion-map "?" 'PC-completion-help)
+ (define-key completion-map "\t" #'PC-complete)
+ (define-key completion-map " " #'PC-complete-word)
+ (define-key completion-map "?" #'PC-completion-help)
- (define-key completion-map "\e\t" 'PC-complete)
- (define-key completion-map "\e " 'PC-complete-word)
- (define-key completion-map "\e\r" 'PC-force-complete-and-exit)
- (define-key completion-map "\e\n" 'PC-force-complete-and-exit)
- (define-key completion-map "\e?" 'PC-completion-help)
+ (define-key completion-map "\e\t" #'PC-complete)
+ (define-key completion-map "\e " #'PC-complete-word)
+ (define-key completion-map "\e\r" #'PC-force-complete-and-exit)
+ (define-key completion-map "\e\n" #'PC-force-complete-and-exit)
+ (define-key completion-map "\e?" #'PC-completion-help)
- (define-key must-match-map "\r" 'PC-complete-and-exit)
- (define-key must-match-map "\n" 'PC-complete-and-exit)
+ (define-key must-match-map "\r" #'PC-complete-and-exit)
+ (define-key must-match-map "\n" #'PC-complete-and-exit)
- (define-key must-match-map "\e\r" 'PC-complete-and-exit)
- (define-key must-match-map "\e\n" 'PC-complete-and-exit)
+ (define-key must-match-map "\e\r" #'PC-complete-and-exit)
+ (define-key must-match-map "\e\n" #'PC-complete-and-exit)
- (define-key global-map [remap lisp-complete-symbol] 'PC-lisp-complete-symbol)))))
+ (define-key global-map [remap lisp-complete-symbol] #'PC-lisp-complete-symbol)))))
(defvar PC-do-completion-end nil
"Internal variable used by `PC-do-completion'.")
@@ -212,14 +207,15 @@ see), so that if it is neither nil nor t, Emacs shows the `*Completions*'
buffer only on the second attempt to complete. That is, if TAB finds nothing
to complete, the first TAB just says \"Next char not unique\" and the
second TAB brings up the `*Completions*' buffer."
- :global t :group 'partial-completion
+ :global t
;; Deal with key bindings...
(PC-bindings partial-completion-mode)
;; Deal with include file feature...
(cond ((not partial-completion-mode)
- (remove-hook 'find-file-not-found-functions 'PC-look-for-include-file))
+ (remove-hook 'find-file-not-found-functions
+ #'PC-look-for-include-file))
((not PC-disable-includes)
- (add-hook 'find-file-not-found-functions 'PC-look-for-include-file)))
+ (add-hook 'find-file-not-found-functions #'PC-look-for-include-file)))
;; Adjust the completion selection in *Completion* buffers to the way
;; we work. The default minibuffer completion code only completes the
;; text before point and leaves the text after point alone (new in
@@ -229,9 +225,9 @@ second TAB brings up the `*Completions*' buffer."
;; to trick choose-completion into replacing the whole minibuffer text
;; rather than only the text before point. --Stef
(funcall
- (if partial-completion-mode 'add-hook 'remove-hook)
+ (if partial-completion-mode #'add-hook #'remove-hook)
'choose-completion-string-functions
- (lambda (choice buffer &rest ignored)
+ (lambda (_choice buffer &rest _)
;; When completing M-: (lisp- ) with point before the ), it is
;; not appropriate to go to point-max (unlike the filename case).
(if (and (not PC-goto-end)
@@ -247,7 +243,7 @@ second TAB brings up the `*Completions*' buffer."
(when (and partial-completion-mode (null PC-env-vars-alist))
(setq PC-env-vars-alist
(mapcar (lambda (string)
- (let ((d (string-match "=" string)))
+ (let ((d (string-search "=" string)))
(cons (concat "$" (substring string 0 d))
(and d (substring string (1+ d))))))
process-environment))))
@@ -579,7 +575,7 @@ GOTO-END is non-nil, however, it instead replaces up to END."
p (+ p (length PC-ndelims-regex) 1)))))
(setq p 0)
(if filename
- (while (setq p (string-match "\\\\\\*" regex p))
+ (while (setq p (string-search "\\*" regex p))
(setq regex (concat (substring regex 0 p)
"[^/]*"
(substring regex (+ p 2))))))
@@ -648,7 +644,7 @@ GOTO-END is non-nil, however, it instead replaces up to END."
(when (string-match regex x)
(push x p)))
(setq basestr (try-completion "" p)))
- (setq basestr (mapconcat 'list str "-"))
+ (setq basestr (mapconcat #'list str "-"))
(delete-region beg end)
(setq end (+ beg (length basestr)))
(insert basestr))))
@@ -672,7 +668,7 @@ GOTO-END is non-nil, however, it instead replaces up to END."
(setq PC-ignored-regexp
(concat "\\("
(mapconcat
- 'regexp-quote
+ #'regexp-quote
(setq PC-ignored-extensions
completion-ignored-extensions)
"\\|")
@@ -815,7 +811,7 @@ GOTO-END is non-nil, however, it instead replaces up to END."
(eq mode 'help))
(let ((prompt-end (minibuffer-prompt-end)))
(with-output-to-temp-buffer "*Completions*"
- (display-completion-list (sort helpposs 'string-lessp))
+ (display-completion-list (sort helpposs #'string-lessp))
(setq PC-do-completion-end end
PC-goto-end goto-end)
(with-current-buffer standard-output
@@ -1093,7 +1089,7 @@ absolute rather than relative to some directory on the SEARCH-PATH."
file-lists))))
(setq search-path (cdr search-path))))
;; Compress out duplicates while building complete list (slloooow!)
- (let ((sorted (sort (apply 'nconc file-lists)
+ (let ((sorted (sort (apply #'nconc file-lists)
(lambda (x y) (not (string-lessp x y)))))
compressed)
(while sorted
diff --git a/lisp/obsolete/crisp.el b/lisp/obsolete/crisp.el
index 91ff899c84d..69bf3ed12bc 100644
--- a/lisp/obsolete/crisp.el
+++ b/lisp/obsolete/crisp.el
@@ -1,4 +1,4 @@
-;;; crisp.el --- CRiSP/Brief Emacs emulator
+;;; crisp.el --- CRiSP/Brief Emacs emulator -*- lexical-binding: t; -*-
;; Copyright (C) 1997-1999, 2001-2021 Free Software Foundation, Inc.
@@ -66,63 +66,63 @@
(defvar crisp-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map [(f1)] 'other-window)
+ (define-key map [(f1)] #'other-window)
- (define-key map [(f2) (down)] 'enlarge-window)
- (define-key map [(f2) (left)] 'shrink-window-horizontally)
- (define-key map [(f2) (right)] 'enlarge-window-horizontally)
- (define-key map [(f2) (up)] 'shrink-window)
- (define-key map [(f3) (down)] 'split-window-below)
- (define-key map [(f3) (right)] 'split-window-right)
+ (define-key map [(f2) (down)] #'enlarge-window)
+ (define-key map [(f2) (left)] #'shrink-window-horizontally)
+ (define-key map [(f2) (right)] #'enlarge-window-horizontally)
+ (define-key map [(f2) (up)] #'shrink-window)
+ (define-key map [(f3) (down)] #'split-window-below)
+ (define-key map [(f3) (right)] #'split-window-right)
- (define-key map [(f4)] 'delete-window)
- (define-key map [(control f4)] 'delete-other-windows)
+ (define-key map [(f4)] #'delete-window)
+ (define-key map [(control f4)] #'delete-other-windows)
- (define-key map [(f5)] 'search-forward-regexp)
- (define-key map [(f19)] 'search-forward-regexp)
- (define-key map [(meta f5)] 'search-backward-regexp)
+ (define-key map [(f5)] #'search-forward-regexp)
+ (define-key map [(f19)] #'search-forward-regexp)
+ (define-key map [(meta f5)] #'search-backward-regexp)
- (define-key map [(f6)] 'query-replace)
+ (define-key map [(f6)] #'query-replace)
- (define-key map [(f7)] 'start-kbd-macro)
- (define-key map [(meta f7)] 'end-kbd-macro)
+ (define-key map [(f7)] #'start-kbd-macro)
+ (define-key map [(meta f7)] #'end-kbd-macro)
- (define-key map [(f8)] 'call-last-kbd-macro)
- (define-key map [(meta f8)] 'save-kbd-macro)
+ (define-key map [(f8)] #'call-last-kbd-macro)
+ ;;(define-key map [(meta f8)] #'save-kbd-macro) ;FIXME:Unknown command?
- (define-key map [(f9)] 'find-file)
- (define-key map [(meta f9)] 'load-library)
+ (define-key map [(f9)] #'find-file)
+ (define-key map [(meta f9)] #'load-library)
- (define-key map [(f10)] 'execute-extended-command)
- (define-key map [(meta f10)] 'compile)
+ (define-key map [(f10)] #'execute-extended-command)
+ (define-key map [(meta f10)] #'compile)
- (define-key map [(SunF37)] 'kill-buffer)
- (define-key map [(kp-add)] 'crisp-copy-line)
- (define-key map [(kp-subtract)] 'crisp-kill-line)
+ (define-key map [(SunF37)] #'kill-buffer)
+ (define-key map [(kp-add)] #'crisp-copy-line)
+ (define-key map [(kp-subtract)] #'crisp-kill-line)
;; just to cover all the bases (GNU Emacs, for instance)
- (define-key map [(f24)] 'crisp-kill-line)
- (define-key map [(insert)] 'crisp-yank-clipboard)
- (define-key map [(f16)] 'crisp-set-clipboard) ; copy on Sun5 kbd
- (define-key map [(f20)] 'crisp-kill-region) ; cut on Sun5 kbd
- (define-key map [(f18)] 'crisp-yank-clipboard) ; paste on Sun5 kbd
+ (define-key map [(f24)] #'crisp-kill-line)
+ (define-key map [(insert)] #'crisp-yank-clipboard)
+ (define-key map [(f16)] #'crisp-set-clipboard) ; copy on Sun5 kbd
+ (define-key map [(f20)] #'crisp-kill-region) ; cut on Sun5 kbd
+ (define-key map [(f18)] #'crisp-yank-clipboard) ; paste on Sun5 kbd
- (define-key map [(control f)] 'fill-paragraph-or-region)
+ ;; (define-key map [(control f)] #'fill-paragraph-or-region)
(define-key map [(meta d)] (lambda ()
(interactive)
(beginning-of-line) (kill-line)))
- (define-key map [(meta e)] 'find-file)
- (define-key map [(meta g)] 'goto-line)
- (define-key map [(meta h)] 'help)
- (define-key map [(meta i)] 'overwrite-mode)
- (define-key map [(meta j)] 'bookmark-jump)
- (define-key map [(meta l)] 'crisp-mark-line)
- (define-key map [(meta m)] 'set-mark-command)
- (define-key map [(meta n)] 'bury-buffer)
- (define-key map [(meta p)] 'crisp-unbury-buffer)
- (define-key map [(meta u)] 'undo)
- (define-key map [(f14)] 'undo)
- (define-key map [(meta w)] 'save-buffer)
- (define-key map [(meta x)] 'crisp-meta-x-wrapper)
+ (define-key map [(meta e)] #'find-file)
+ (define-key map [(meta g)] #'goto-line)
+ (define-key map [(meta h)] #'help)
+ (define-key map [(meta i)] #'overwrite-mode)
+ (define-key map [(meta j)] #'bookmark-jump)
+ (define-key map [(meta l)] #'crisp-mark-line)
+ (define-key map [(meta m)] #'set-mark-command)
+ (define-key map [(meta n)] #'bury-buffer)
+ (define-key map [(meta p)] #'crisp-unbury-buffer)
+ (define-key map [(meta u)] #'undo)
+ (define-key map [(f14)] #'undo)
+ (define-key map [(meta w)] #'save-buffer)
+ (define-key map [(meta x)] #'crisp-meta-x-wrapper)
(define-key map [(meta ?0)] (lambda ()
(interactive)
(bookmark-set "0")))
@@ -154,21 +154,21 @@
(interactive)
(bookmark-set "9")))
- (define-key map [(shift delete)] 'kill-word)
- (define-key map [(shift backspace)] 'backward-kill-word)
- (define-key map [(control left)] 'backward-word)
- (define-key map [(control right)] 'forward-word)
+ (define-key map [(shift delete)] #'kill-word)
+ (define-key map [(shift backspace)] #'backward-kill-word)
+ (define-key map [(control left)] #'backward-word)
+ (define-key map [(control right)] #'forward-word)
- (define-key map [(home)] 'crisp-home)
+ (define-key map [(home)] #'crisp-home)
(define-key map [(control home)] (lambda ()
(interactive)
(move-to-window-line 0)))
- (define-key map [(meta home)] 'beginning-of-line)
- (define-key map [(end)] 'crisp-end)
+ (define-key map [(meta home)] #'beginning-of-line)
+ (define-key map [(end)] #'crisp-end)
(define-key map [(control end)] (lambda ()
(interactive)
(move-to-window-line -1)))
- (define-key map [(meta end)] 'end-of-line)
+ (define-key map [(meta end)] #'end-of-line)
map)
"Local keymap for CRiSP emulation mode.
All the bindings are done here instead of globally to try and be
@@ -179,8 +179,7 @@ nice to the world.")
(defcustom crisp-mode-mode-line-string " *CRiSP*"
"String to display in the mode line when CRiSP emulation mode is enabled."
- :type 'string
- :group 'crisp)
+ :type 'string)
;;;###autoload
(defcustom crisp-mode nil
@@ -190,20 +189,18 @@ indicates CRiSP mode is enabled.
Setting this variable directly does not take effect;
use either M-x customize or the function `crisp-mode'."
- :set (lambda (symbol value) (crisp-mode (if value 1 0)))
- :initialize 'custom-initialize-default
+ :set (lambda (_symbol value) (crisp-mode (if value 1 0)))
+ :initialize #'custom-initialize-default
:require 'crisp
:version "20.4"
- :type 'boolean
- :group 'crisp)
+ :type 'boolean)
(defcustom crisp-override-meta-x t
"Controls overriding the normal Emacs M-x key binding in the CRiSP emulator.
Normally the CRiSP emulator rebinds M-x to `save-buffers-exit-emacs', and
provides the usual M-x functionality on the F10 key. If this variable
is non-nil, M-x will exit Emacs."
- :type 'boolean
- :group 'crisp)
+ :type 'boolean)
(defcustom crisp-load-scroll-all nil
"Controls loading of the Scroll Lock in the CRiSP emulator.
@@ -212,18 +209,15 @@ package when enabling the CRiSP emulator.
If this variable is nil when you start the CRiSP emulator, it
does not load the scroll-all package."
- :type 'boolean
- :group 'crisp)
+ :type 'boolean)
(defcustom crisp-load-hook nil
"Hooks to run after loading the CRiSP emulator package."
- :type 'hook
- :group 'crisp)
+ :type 'hook)
(defcustom crisp-mode-hook nil
"Hook run by the function `crisp-mode'."
- :type 'hook
- :group 'crisp)
+ :type 'hook)
(defconst crisp-version "1.34"
"The version of the CRiSP emulator.")
@@ -370,11 +364,11 @@ normal CRiSP binding) and when it is nil M-x will run
(if crisp-load-scroll-all
(require 'scroll-all))
(if (featurep 'scroll-all)
- (define-key crisp-mode-map [(meta f1)] 'scroll-all-mode))))
+ (define-key crisp-mode-map [(meta f1)] #'scroll-all-mode))))
;; People might use Apropos on `brief'.
;;;###autoload
-(defalias 'brief-mode 'crisp-mode)
+(defalias 'brief-mode #'crisp-mode)
(run-hooks 'crisp-load-hook)
(provide 'crisp)
diff --git a/lisp/obsolete/cust-print.el b/lisp/obsolete/cust-print.el
index c7342b61ae7..01fcd38199c 100644
--- a/lisp/obsolete/cust-print.el
+++ b/lisp/obsolete/cust-print.el
@@ -1,4 +1,4 @@
-;;; cust-print.el --- handles print-level and print-circle
+;;; cust-print.el --- handles print-level and print-circle -*- lexical-binding: t; -*-
;; Copyright (C) 1992, 2001-2021 Free Software Foundation, Inc.
@@ -118,9 +118,6 @@
;; Emacs 18 doesn't have defalias.
;; Provide def for byte compiler.
-(eval-and-compile
- (or (fboundp 'defalias) (fset 'defalias 'fset)))
-
;; Variables:
;;=========================================================
@@ -141,8 +138,7 @@ If non-nil, components at levels equal to or greater than `print-level'
are printed simply as `#'. The object to be printed is at level 0,
and if the object is a list or vector, its top-level components are at
level 1."
- :type '(choice (const nil) integer)
- :group 'cust-print)
+ :type '(choice (const nil) integer))
(defcustom print-circle nil
@@ -157,14 +153,12 @@ If non-nil, shared substructures anywhere in the structure are printed
with `#N=' before the first occurrence (in the order of the print
representation) and `#N#' in place of each subsequent occurrence,
where N is a positive decimal integer."
- :type 'boolean
- :group 'cust-print)
+ :type 'boolean)
(defcustom custom-print-vectors nil
"Non-nil if printing of vectors should obey `print-level' and `print-length'."
- :type 'boolean
- :group 'cust-print)
+ :type 'boolean)
;; Custom printers
@@ -201,7 +195,7 @@ Any pair that has the same PREDICATE is first removed."
(cust-print-update-custom-printers))
-(defun cust-print-use-custom-printer (object)
+(defun cust-print-use-custom-printer (_object)
;; Default function returns nil.
nil)
@@ -231,11 +225,11 @@ Any pair that has the same PREDICATE is first removed."
(defalias (car symbol-pair)
(symbol-function (car (cdr symbol-pair)))))
-(defun cust-print-original-princ (object &optional stream)) ; dummy def
+(defun cust-print-original-princ (_object &optional _stream) nil) ; dummy def
;; Save emacs routines.
(if (not (fboundp 'cust-print-original-prin1))
- (mapc 'cust-print-set-function-cell
+ (mapc #'cust-print-set-function-cell
'((cust-print-original-prin1 prin1)
(cust-print-original-princ princ)
(cust-print-original-print print)
@@ -243,14 +237,15 @@ Any pair that has the same PREDICATE is first removed."
(cust-print-original-format format)
(cust-print-original-message message)
(cust-print-original-error error))))
-
+(declare-function cust-print-original-format "cust-print")
+(declare-function cust-print-original-message "cust-print")
(defun custom-print-install ()
"Replace print functions with general, customizable, Lisp versions.
The Emacs subroutines are saved away, and you can reinstall them
by running `custom-print-uninstall'."
(interactive)
- (mapc 'cust-print-set-function-cell
+ (mapc #'cust-print-set-function-cell
'((prin1 custom-prin1)
(princ custom-princ)
(print custom-print)
@@ -264,7 +259,7 @@ by running `custom-print-uninstall'."
(defun custom-print-uninstall ()
"Reset print functions to their Emacs subroutines."
(interactive)
- (mapc 'cust-print-set-function-cell
+ (mapc #'cust-print-set-function-cell
'((prin1 cust-print-original-prin1)
(princ cust-print-original-princ)
(print cust-print-original-print)
@@ -275,22 +270,20 @@ by running `custom-print-uninstall'."
))
t)
-(defalias 'custom-print-funcs-installed-p 'custom-print-installed-p)
+(defalias 'custom-print-funcs-installed-p #'custom-print-installed-p)
(defun custom-print-installed-p ()
"Return t if custom-print is currently installed, nil otherwise."
(eq (symbol-function 'custom-prin1) (symbol-function 'prin1)))
-(put 'with-custom-print-funcs 'edebug-form-spec '(body))
-(put 'with-custom-print 'edebug-form-spec '(body))
-
-(defalias 'with-custom-print-funcs 'with-custom-print)
(defmacro with-custom-print (&rest body)
"Temporarily install the custom print package while executing BODY."
+ (declare (debug t))
`(unwind-protect
(progn
(custom-print-install)
,@body)
(custom-print-uninstall)))
+(defalias 'with-custom-print-funcs #'with-custom-print)
;; Lisp replacements for prin1 and princ, and for some subrs that use them
@@ -369,7 +362,7 @@ vector, or symbol args. The format specification for such args should
be `%s' in any case, so a string argument will also work. The string
is generated with `custom-prin1-to-string', which quotes quotable
characters."
- (apply 'cust-print-original-format fmt
+ (apply #'cust-print-original-format fmt
(mapcar (function (lambda (arg)
(if (or (listp arg) (vectorp arg) (symbolp arg))
(custom-prin1-to-string arg)
@@ -393,7 +386,7 @@ See `custom-format' for the details."
;; because the echo area requires special handling
;; to avoid duplicating the output.
;; cust-print-original-message does it right.
- (apply 'cust-print-original-message fmt
+ (apply #'cust-print-original-message fmt
(mapcar (function (lambda (arg)
(if (or (listp arg) (vectorp arg) (symbolp arg))
(custom-prin1-to-string arg)
@@ -406,7 +399,7 @@ See `custom-format' for the details."
This is the custom-print replacement for the standard `error'.
See `custom-format' for the details."
- (signal 'error (list (apply 'custom-format fmt args))))
+ (signal 'error (list (apply #'custom-format fmt args))))
@@ -417,9 +410,9 @@ See `custom-format' for the details."
(defvar circle-table)
(defvar cust-print-current-level)
-(defun cust-print-original-printer (object)) ; One of the standard printers.
-(defun cust-print-low-level-prin (object)) ; Used internally.
-(defun cust-print-prin (object)) ; Call this to print recursively.
+(defun cust-print-original-printer (_object) nil) ; One of the standard printers.
+(defun cust-print-low-level-prin (_object) nil) ; Used internally.
+(defun cust-print-prin (_object) nil) ; Call this to print recursively.
(defun cust-print-top-level (object stream emacs-printer)
;; Set up for printing.
diff --git a/lisp/obsolete/erc-compat.el b/lisp/obsolete/erc-compat.el
index 203ef079c14..9972e927e61 100644
--- a/lisp/obsolete/erc-compat.el
+++ b/lisp/obsolete/erc-compat.el
@@ -1,4 +1,4 @@
-;;; erc-compat.el --- ERC compatibility code for XEmacs
+;;; erc-compat.el --- ERC compatibility code for XEmacs -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2003, 2005-2021 Free Software Foundation, Inc.
@@ -31,8 +31,7 @@
(require 'format-spec)
;;;###autoload(autoload 'erc-define-minor-mode "erc-compat")
-(defalias 'erc-define-minor-mode 'define-minor-mode)
-(put 'erc-define-minor-mode 'edebug-form-spec 'define-minor-mode)
+(defalias 'erc-define-minor-mode #'define-minor-mode)
(defun erc-decode-coding-string (s coding-system)
"Decode S using CODING-SYSTEM."
@@ -73,7 +72,7 @@ are placed.
Note that this should end with a directory separator.")
(defun erc-replace-match-subexpression-in-string
- (newtext string match subexp start &optional fixedcase literal)
+ (newtext string _match subexp _start &optional fixedcase literal)
"Replace the subexpression SUBEXP of the last match in STRING with NEWTEXT.
MATCH is the text which matched the subexpression (see `match-string').
START is the beginning position of the last match (see `match-beginning').
diff --git a/lisp/obsolete/erc-hecomplete.el b/lisp/obsolete/erc-hecomplete.el
index fce79f7f34f..36b08d56f7b 100644
--- a/lisp/obsolete/erc-hecomplete.el
+++ b/lisp/obsolete/erc-hecomplete.el
@@ -1,4 +1,4 @@
-;;; erc-hecomplete.el --- Provides Nick name completion for ERC
+;;; erc-hecomplete.el --- Provides Nick name completion for ERC -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2002, 2004, 2006-2021 Free Software Foundation,
;; Inc.
@@ -39,8 +39,8 @@
;;;###autoload (autoload 'erc-hecomplete-mode "erc-hecomplete" nil t)
(define-erc-module hecomplete nil
"Complete nick at point."
- ((add-hook 'erc-complete-functions 'erc-hecomplete))
- ((remove-hook 'erc-complete-functions 'erc-hecomplete)))
+ ((add-hook 'erc-complete-functions #'erc-hecomplete))
+ ((remove-hook 'erc-complete-functions #'erc-hecomplete)))
(defun erc-hecomplete ()
"Complete nick at point.
@@ -70,15 +70,13 @@ or you may use an arbitrary lisp expression."
erc-nick-completion-exclude-myself)
(repeat :tag "List" (string :tag "Nick"))
function
- sexp)
- :group 'erc-hecomplete)
+ sexp))
(defcustom erc-nick-completion-ignore-case t
"Non-nil means don't consider case significant in nick completion.
Case will be automatically corrected when non-nil.
For instance if you type \"dely TAB\" the word completes and changes to
\"delYsid\"."
- :group 'erc-hecomplete
:type 'boolean)
(defun erc-nick-completion-exclude-myself ()
@@ -95,7 +93,6 @@ typing \"f o TAB\" will directly give you foobar. Use this with
(defcustom erc-nick-completion-postfix ": "
"When `erc-complete' is used in the first word after the prompt,
add this string when a unique expansion was found."
- :group 'erc-hecomplete
:type 'string)
(defun erc-command-list ()
diff --git a/lisp/obsolete/eudcb-ph.el b/lisp/obsolete/eudcb-ph.el
index c7212e3fdb7..187879ce2f7 100644
--- a/lisp/obsolete/eudcb-ph.el
+++ b/lisp/obsolete/eudcb-ph.el
@@ -1,4 +1,4 @@
-;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend
+;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
@@ -69,7 +69,7 @@ defaulting to `eudc-default-return-attributes'."
query
" "))
(if return-fields
- (concat " return " (mapconcat 'symbol-name return-fields " ")))))
+ (concat " return " (mapconcat #'symbol-name return-fields " ")))))
(and (> (length request) 6)
(eudc-ph-do-request request)
(eudc-ph-parse-query-result return-fields))))
@@ -189,7 +189,7 @@ SERVER is either a string naming the server or a list (NAME PORT)."
(with-current-buffer (process-buffer process)
(eudc-ph-send-command process "quit")
(eudc-ph-read-response process)
- (run-at-time 2 nil 'delete-process process)))
+ (run-at-time 2 nil #'delete-process process)))
(defun eudc-ph-send-command (process command)
(goto-char (point-max))
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el
index 8848c89c62f..960233d5627 100644
--- a/lisp/obsolete/fast-lock.el
+++ b/lisp/obsolete/fast-lock.el
@@ -1,4 +1,4 @@
-;;; fast-lock.el --- automagic text properties caching for fast Font Lock mode
+;;; fast-lock.el --- automagic text properties caching for fast Font Lock mode -*- lexical-binding: t; -*-
;; Copyright (C) 1994-1998, 2001-2021 Free Software Foundation, Inc.
@@ -190,18 +190,6 @@
(defvar font-lock-face-list)
(eval-when-compile
- ;; We use this to preserve or protect things when modifying text properties.
- (defmacro save-buffer-state (varlist &rest body)
- "Bind variables according to VARLIST and eval BODY restoring buffer state."
- `(let* (,@(append varlist
- '((modified (buffer-modified-p)) (buffer-undo-list t)
- (inhibit-read-only t) (inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t)
- deactivate-mark buffer-file-name buffer-file-truename)))
- ,@body
- (when (and (not modified) (buffer-modified-p))
- (set-buffer-modified-p nil))))
- (put 'save-buffer-state 'lisp-indent-function 1)
;;
;; We use this to verify that a face should be saved.
(defmacro fast-lock-save-facep (face)
@@ -244,8 +232,7 @@ for buffers in Rmail mode, and size is irrelevant otherwise."
(symbol :tag "name"))
(radio :tag "Size"
(const :tag "none" nil)
- (integer :tag "size")))))
- :group 'fast-lock)
+ (integer :tag "size"))))))
(defcustom fast-lock-cache-directories '("~/.emacs-flc")
; - `internal', keep each file's Font Lock cache file in the same file.
@@ -271,8 +258,7 @@ to avoid the possibility of using the cache of another user."
:type '(repeat (radio (directory :tag "directory")
(cons :tag "Matching"
(regexp :tag "regexp")
- (directory :tag "directory"))))
- :group 'fast-lock)
+ (directory :tag "directory")))))
(put 'fast-lock-cache-directories 'risky-local-variable t)
(defcustom fast-lock-save-events '(kill-buffer kill-emacs)
@@ -282,23 +268,20 @@ If concurrent editing sessions use the same associated cache file for a file's
buffer, then you should add `save-buffer' to this list."
:type '(set (const :tag "buffer saving" save-buffer)
(const :tag "buffer killing" kill-buffer)
- (const :tag "emacs killing" kill-emacs))
- :group 'fast-lock)
+ (const :tag "emacs killing" kill-emacs)))
(defcustom fast-lock-save-others t
"If non-nil, save Font Lock cache files irrespective of file owner.
If nil, means only buffer files known to be owned by you can have associated
Font Lock cache files saved. Ownership may be unknown for networked files."
- :type 'boolean
- :group 'fast-lock)
+ :type 'boolean)
(defcustom fast-lock-verbose font-lock-verbose
"If non-nil, means show status messages for cache processing.
If a number, only buffers greater than this size have processing messages."
:type '(choice (const :tag "never" nil)
(other :tag "always" t)
- (integer :tag "size"))
- :group 'fast-lock)
+ (integer :tag "size")))
(defvar fast-lock-save-faces
(when (featurep 'xemacs)
@@ -455,8 +438,7 @@ See `fast-lock-mode'."
;; Flag so that a cache will be saved later even if the file is never saved.
(setq fast-lock-cache-timestamp nil))
-(defalias 'fast-lock-after-unfontify-buffer
- 'ignore)
+(defalias 'fast-lock-after-unfontify-buffer #'ignore)
;; Miscellaneous Functions:
@@ -473,7 +455,7 @@ See `fast-lock-mode'."
(defun fast-lock-save-caches-before-kill-emacs ()
;; Do `fast-lock-save-cache's if `kill-emacs' is on `fast-lock-save-events'.
(when (memq 'kill-emacs fast-lock-save-events)
- (mapcar 'fast-lock-save-cache (buffer-list))))
+ (mapcar #'fast-lock-save-cache (buffer-list))))
(defun fast-lock-cache-directory (directory create)
"Return usable directory based on DIRECTORY.
@@ -534,7 +516,7 @@ See `fast-lock-cache-directory'."
(function (lambda (c) (or (cdr (assq c chars-alist)) (list c))))))
(concat
(file-name-as-directory (expand-file-name directory))
- (mapconcat 'char-to-string (apply 'append (mapcar mapchars bufile)) "")
+ (mapconcat #'char-to-string (apply #'append (mapcar mapchars bufile)) "")
".flc"))))
;; Font Lock Cache Processing Functions:
@@ -581,7 +563,7 @@ See `fast-lock-cache-directory'."
(defun fast-lock-cache-data (version timestamp
syntactic-keywords syntactic-properties
keywords face-properties
- &rest ignored)
+ &rest _ignored)
;; Find value of syntactic keywords in case it is a symbol.
(setq font-lock-syntactic-keywords (font-lock-eval-keywords
font-lock-syntactic-keywords))
@@ -708,86 +690,26 @@ See `fast-lock-get-face-properties'."
"Add `syntax-table' and `face' text properties to the current buffer.
Any existing `syntax-table' and `face' text properties are removed first.
See `fast-lock-get-face-properties'."
- (save-buffer-state (plist regions)
- (save-restriction
- (widen)
- (font-lock-unfontify-region (point-min) (point-max))
- ;;
- ;; Set the `syntax-table' property for each start/end region.
- (while syntactic-properties
- (setq plist (list 'syntax-table (car (car syntactic-properties)))
- regions (cdr (car syntactic-properties))
- syntactic-properties (cdr syntactic-properties))
- (while regions
- (add-text-properties (nth 0 regions) (nth 1 regions) plist)
- (setq regions (nthcdr 2 regions))))
- ;;
- ;; Set the `face' property for each start/end region.
- (while face-properties
- (setq plist (list 'face (car (car face-properties)))
- regions (cdr (car face-properties))
- face-properties (cdr face-properties))
- (while regions
- (add-text-properties (nth 0 regions) (nth 1 regions) plist)
- (setq regions (nthcdr 2 regions)))))))
+ (with-silent-modifications
+ (let ((inhibit-point-motion-hooks t))
+ (save-restriction
+ (widen)
+ (font-lock-unfontify-region (point-min) (point-max))
+ ;;
+ ;; Set the `syntax-table' property for each start/end region.
+ (pcase-dolist (`(,plist . ,regions) syntactic-properties)
+ (while regions
+ (add-text-properties (nth 0 regions) (nth 1 regions) plist)
+ (setq regions (nthcdr 2 regions))))
+ ;;
+ ;; Set the `face' property for each start/end region.
+ (pcase-dolist (`(,plist . ,regions) face-properties)
+ (while regions
+ (add-text-properties (nth 0 regions) (nth 1 regions) plist)
+ (setq regions (nthcdr 2 regions))))))))
;; Functions for XEmacs:
-(when (featurep 'xemacs)
- ;;
- ;; It would be better to use XEmacs' `map-extents' over extents with a
- ;; `font-lock' property, but `face' properties are on different extents.
- (defun fast-lock-get-face-properties ()
- "Return a list of `face' text properties in the current buffer.
-Each element of the list is of the form (VALUE START1 END1 START2 END2 ...)
-where VALUE is a `face' property value and STARTx and ENDx are positions.
-Only those `face' VALUEs in `fast-lock-save-faces' are returned."
- (save-restriction
- (widen)
- (let ((properties ()) cell)
- (map-extents
- (function (lambda (extent ignore)
- (let ((value (extent-face extent)))
- ;; We're only interested if it's one of `fast-lock-save-faces'.
- (when (and value (fast-lock-save-facep value))
- (let ((start (extent-start-position extent))
- (end (extent-end-position extent)))
- ;; Make or add to existing list of regions with the same
- ;; `face' property value.
- (if (setq cell (assoc value properties))
- (setcdr cell (cons start (cons end (cdr cell))))
- (push (list value start end) properties))))
- ;; Return nil to keep `map-extents' going.
- nil))))
- properties)))
- ;;
- ;; XEmacs does not support the `syntax-table' text property.
- (defalias 'fast-lock-get-syntactic-properties
- 'ignore)
- ;;
- ;; Make extents just like XEmacs' font-lock.el does.
- (defun fast-lock-add-properties (syntactic-properties face-properties)
- "Set `face' text properties in the current buffer.
-Any existing `face' text properties are removed first.
-See `fast-lock-get-face-properties'."
- (save-restriction
- (widen)
- (font-lock-unfontify-region (point-min) (point-max))
- ;; Set the `face' property, etc., for each start/end region.
- (while face-properties
- (let ((face (car (car face-properties)))
- (regions (cdr (car face-properties))))
- (while regions
- (font-lock-set-face (nth 0 regions) (nth 1 regions) face)
- (setq regions (nthcdr 2 regions)))
- (setq face-properties (cdr face-properties))))
- ;; XEmacs does not support the `syntax-table' text property.
- ))
- ;;
- ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook.
- (add-hook 'font-lock-after-fontify-buffer-hook
- 'fast-lock-after-fontify-buffer))
-
(unless (boundp 'font-lock-syntactic-keywords)
(defvar font-lock-syntactic-keywords nil))
@@ -795,14 +717,14 @@ See `fast-lock-get-face-properties'."
(defvar font-lock-inhibit-thing-lock nil))
(unless (fboundp 'font-lock-compile-keywords)
- (defalias 'font-lock-compile-keywords 'identity))
+ (defalias 'font-lock-compile-keywords #'identity))
(unless (fboundp 'font-lock-eval-keywords)
(defun font-lock-eval-keywords (keywords)
(if (symbolp keywords)
(font-lock-eval-keywords (if (fboundp keywords)
(funcall keywords)
- (eval keywords)))
+ (eval keywords t)))
keywords)))
(unless (fboundp 'font-lock-value-in-major-mode)
@@ -817,10 +739,10 @@ See `fast-lock-get-face-properties'."
;; Install ourselves:
-(add-hook 'after-save-hook 'fast-lock-save-cache-after-save-file)
-(add-hook 'kill-buffer-hook 'fast-lock-save-cache-before-kill-buffer)
+(add-hook 'after-save-hook #'fast-lock-save-cache-after-save-file)
+(add-hook 'kill-buffer-hook #'fast-lock-save-cache-before-kill-buffer)
(unless noninteractive
- (add-hook 'kill-emacs-hook 'fast-lock-save-caches-before-kill-emacs))
+ (add-hook 'kill-emacs-hook #'fast-lock-save-caches-before-kill-emacs))
;;;###autoload
(when (fboundp 'add-minor-mode)
@@ -830,8 +752,6 @@ See `fast-lock-get-face-properties'."
(unless (assq 'fast-lock-mode minor-mode-alist)
(setq minor-mode-alist (append minor-mode-alist '((fast-lock-mode nil)))))
-;; Provide ourselves:
-
(provide 'fast-lock)
;;; fast-lock.el ends here
diff --git a/lisp/obsolete/gs.el b/lisp/obsolete/gs.el
index 6ab3fc59380..5a82c6b05f0 100644
--- a/lisp/obsolete/gs.el
+++ b/lisp/obsolete/gs.el
@@ -1,4 +1,4 @@
-;;; gs.el --- interface to Ghostscript
+;;; gs.el --- interface to Ghostscript -*- lexical-binding: t; -*-
;; Copyright (C) 1998, 2001-2021 Free Software Foundation, Inc.
@@ -205,7 +205,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful."
(gs-set-ghostview-window-prop frame spec img-width img-height)
(gs-set-ghostview-colors-window-prop frame pixel-colors)
(setenv "GHOSTVIEW" window-and-pixmap-id)
- (setq gs (apply 'start-process "gs" "*GS*" gs-program
+ (setq gs (apply #'start-process "gs" "*GS*" gs-program
(gs-options gs-device file)))
(set-process-query-on-exit-flag gs nil)
gs)
diff --git a/lisp/obsolete/gulp.el b/lisp/obsolete/gulp.el
index 0fbaa1cc4f8..6ec2f4f772c 100644
--- a/lisp/obsolete/gulp.el
+++ b/lisp/obsolete/gulp.el
@@ -1,4 +1,4 @@
-;;; gulp.el --- ask for updates for Lisp packages
+;;; gulp.el --- ask for updates for Lisp packages -*- lexical-binding: t; -*-
;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
@@ -37,18 +37,15 @@
(defcustom gulp-discard "^;+ *Maintainer: *\\(FSF\\|emacs-devel@gnu\\.org\\) *$"
"The regexp matching the packages not requiring the request for updates."
:version "24.4" ; added emacs-devel
- :type 'regexp
- :group 'gulp)
+ :type 'regexp)
(defcustom gulp-tmp-buffer "*gulp*"
"The name of the temporary buffer."
- :type 'string
- :group 'gulp)
+ :type 'string)
(defcustom gulp-max-len 2000
"Distance into a Lisp source file to scan for keywords."
- :type 'integer
- :group 'gulp)
+ :type 'integer)
(defcustom gulp-request-header
(concat
@@ -57,8 +54,7 @@ I'm going to start pretesting a new version of GNU Emacs soon, so I'd
like to ask if you have any updates for the Emacs packages you work on.
You're listed as the maintainer of the following package(s):\n\n")
"The starting text of a gulp message."
- :type 'string
- :group 'gulp)
+ :type 'string)
(defcustom gulp-request-end
(concat
@@ -75,8 +71,7 @@ of information to include.
Thanks.")
"The closing text in a gulp message."
- :type 'string
- :group 'gulp)
+ :type 'string)
(declare-function mail-subject "sendmail" ())
(declare-function mail-send "sendmail" ())
diff --git a/lisp/obsolete/html2text.el b/lisp/obsolete/html2text.el
index f01561bd12c..be0553cb3ae 100644
--- a/lisp/obsolete/html2text.el
+++ b/lisp/obsolete/html2text.el
@@ -1,4 +1,4 @@
-;;; html2text.el --- a simple html to plain text converter -*- coding: utf-8 -*-
+;;; html2text.el --- a simple html to plain text converter -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
diff --git a/lisp/obsolete/info-edit.el b/lisp/obsolete/info-edit.el
index c8a187c08ee..19958979a85 100644
--- a/lisp/obsolete/info-edit.el
+++ b/lisp/obsolete/info-edit.el
@@ -1,4 +1,4 @@
-;; info-edit.el --- Editing info files -*- lexical-binding:t -*-
+;;; info-edit.el --- Editing info files -*- lexical-binding:t -*-
;; Copyright (C) 1985-1986, 1992-2021 Free Software Foundation, Inc.
@@ -36,7 +36,7 @@
(define-obsolete-variable-alias 'Info-edit-map 'Info-edit-mode-map "24.1")
(defvar Info-edit-mode-map (let ((map (make-sparse-keymap)))
(set-keymap-parent map text-mode-map)
- (define-key map "\C-c\C-c" 'Info-cease-edit)
+ (define-key map "\C-c\C-c" #'Info-cease-edit)
map)
"Local keymap used within `e' command of Info.")
diff --git a/lisp/obsolete/inversion.el b/lisp/obsolete/inversion.el
new file mode 100644
index 00000000000..ac7749af5e8
--- /dev/null
+++ b/lisp/obsolete/inversion.el
@@ -0,0 +1,530 @@
+;;; inversion.el --- When you need something in version XX.XX -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
+
+;; Author: Eric M. Ludlam <zappo@gnu.org>
+;; Version: 1.3
+;; Keywords: OO, lisp
+;; Obsolete-since: 28.1
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Keeping track of rapidly developing software is a tough thing to
+;; do, especially if you want to have co-dependent packages which all
+;; move at different rates.
+;;
+;; This library provides a framework for specifying version numbers
+;; and (as side effect) have a flexible way of getting a desired feature set.
+;;
+;; If you would like to use this package to satisfy dependency replace this:
+;;
+;; (require 'spiffy)
+;;
+;; with this:
+;;
+;; (require 'inversion)
+;; (inversion-require 'spiffy "1.0")
+;;
+;; If you feel the need to not throw errors, you can do this instead:
+;;
+;; (let ((err (inversion-test 'spiffy "1.0")))
+;; (if err (your-stuff-here)))
+;;
+;; If you new package (2.0) needs to make sure a load file from your
+;; package is compatible, use this test:
+;;
+;; (if (not (inversion-reverse-test 'spiffy version-from-file))
+;; ;; Everything ok
+;; (do stuff)
+;; ;; Out of date
+;; (import-old-code))
+;;
+;; If you would like to make inversion optional, do this:
+;;
+;; (or (require 'inversion nil t)
+;; (defun inversion-test (p v)
+;; (string= v (symbol-value
+;; (intern-soft (concat (symbol-string p) "-version"))))))
+;;
+;; Or modify to specify `inversion-require' instead.
+;;
+;; TODO:
+;; Offer to download newer versions of a package.
+
+;;; History:
+;;
+;; Sept 3, 2002: First general publication.
+
+;;; Code:
+
+(defvar inversion-version "1.3"
+ "Current version of InVersion.")
+
+(defvar inversion-incompatible-version "0.1alpha1"
+ "An earlier release which is incompatible with this release.")
+
+(defconst inversion-decoders
+ '(
+ (alpha "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]*\\)\\s-*\\.?alpha\\([0-9]+\\)?$" 4)
+ (beta "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]*\\)\\s-*\\.?beta\\([0-9]+\\)?$" 4)
+ (beta "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]*\\)\\s-*\\.?(beta\\([0-9]+\\)?)$" 4)
+ (beta "^[^/]+/\\w+--\\w+--\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)--patch-\\([0-9]+\\)" 4)
+ (beta "^\\w+: v\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)-\\([0-9]+\\)-\\(.*\\)" 5)
+ (prerelease "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?pre\\([0-9]+\\)?$" 3)
+ (full "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?$" 3)
+ (fullsingle "^\\([0-9]+\\)$" 1)
+ (patch "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?\\s-*(patch \\([0-9]+\\))" 4)
+ (point "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$" 3)
+ (point "^\\w+: v\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)-\\(0\\)-\\(.*\\)" 5)
+ (build "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\).\\([0-9]+\\)$" 4)
+ (full "^[^/]+/\\w+--\\w+--\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)--version-\\([0-9]+\\)" 4)
+ (full "^\\w+: v\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" 5)
+ )
+ "List of decoders for version strings.
+Each decoder is of the form:
+
+ ( RELEASE-TYPE REGEXP MAX )
+
+RELEASE-TYPE is a symbol specifying something like `beta' or `alpha'.
+REGEXP is the regular expression to match a version string.
+MAX is the maximum number of match-numbers in the release number.
+Decoders must be ordered to decode least stable versions before the
+more stable ones.")
+
+;;; Version Checking
+;;
+(defun inversion-decode-version (version-string)
+ "Decode VERSION-STRING into an encoded list.
+Return value is of the form:
+ (RELEASE MAJOR MINOR ...)
+where RELEASE is a symbol such as `full', or `beta'."
+ (let ((decoders inversion-decoders)
+ (result nil))
+ (while (and decoders (not result))
+ (if (string-match (nth 1 (car decoders)) version-string)
+ (let ((ver nil)
+ (num-left (nth 2 (car decoders)))
+ (count 1))
+ (while (<= count num-left)
+ (setq ver (cons
+ (if (match-beginning count)
+ (string-to-number
+ (substring version-string
+ (match-beginning count)
+ (match-end count)))
+ 1)
+ ver)
+ count (1+ count)))
+ (setq result (cons (caar decoders) (nreverse ver))))
+ (setq decoders (cdr decoders))))
+ result))
+
+(defun inversion-package-version (package)
+ "Return the decoded version for PACKAGE."
+ (let ((ver (symbol-value
+ (intern-soft
+ (concat (symbol-name package)
+ "-version"))))
+ (code nil))
+ (unless ver
+ (error "Package %S does not define %S-version" package package))
+ ;; Decode the code
+ (setq code (inversion-decode-version ver))
+ (unless code
+ (error "%S-version value (%s) cannot be decoded" package ver))
+ code))
+
+(defun inversion-package-incompatibility-version (package)
+ "Return the decoded incompatibility version for PACKAGE.
+The incompatibility version is specified by the programmer of
+a package when a package is not backward compatible. It is
+not an indication of new features or bug fixes."
+ (let ((ver (symbol-value
+ (intern-soft
+ (concat (symbol-name package)
+ "-incompatible-version")))))
+ (if (not ver)
+ nil
+ ;; Decode the code
+ (inversion-decode-version ver))))
+
+(defun inversion-recode (code)
+ "Convert CODE into a string."
+ (let ((r (nth 0 code)) ; release-type
+ (n (nth 1 code)) ; main number
+ (i (nth 2 code)) ; first increment
+ (p (nth 3 code))) ; second increment
+ (cond
+ ((eq r 'full)
+ (setq r "" p ""))
+ ((eq r 'point)
+ (setq r ".")))
+ (format "%s.%s%s%s" n i r p)))
+
+(defun inversion-release-to-number (release-symbol)
+ "Convert RELEASE-SYMBOL into a number."
+ (let* ((ra (assoc release-symbol inversion-decoders))
+ (rn (- (length inversion-decoders)
+ (length (member ra inversion-decoders)))))
+ rn))
+
+(defun inversion-= (ver1 ver2)
+ "Return non-nil if VER1 is equal to VER2."
+ (equal ver1 ver2))
+
+(defun inversion-< (ver1 ver2)
+ "Return non-nil if VER1 is less than VER2."
+ (let ((v1-0 (inversion-release-to-number (nth 0 ver1)))
+ (v1-1 (nth 1 ver1))
+ (v1-2 (nth 2 ver1))
+ (v1-3 (nth 3 ver1))
+ (v1-4 (nth 4 ver1))
+ ;; v2
+ (v2-0 (inversion-release-to-number (nth 0 ver2)))
+ (v2-1 (nth 1 ver2))
+ (v2-2 (nth 2 ver2))
+ (v2-3 (nth 3 ver2))
+ (v2-4 (nth 4 ver2))
+ )
+
+ (cond ((and (equal (list v1-1 v1-2 v1-3 v1-4)
+ (list v2-1 v2-2 v2-3 v2-4))
+ v1-0 v2-0)
+ (< v1-0 v2-0))
+ ((and (equal v1-1 v2-1)
+ (equal v1-2 v2-2)
+ (equal v1-3 v2-3)
+ v1-4 v2-4) ; all or nothing if elt - is =
+ (< v1-4 v2-4))
+ ((and (equal v1-1 v2-1)
+ (equal v1-2 v2-2)
+ v1-3 v2-3) ; all or nothing if elt - is =
+ (< v1-3 v2-3))
+ ((and (equal v1-1 v2-1)
+ v1-2 v2-2)
+ (< v1-2 v2-2))
+ ((and v1-1 v2-1)
+ (< v1-1 v2-1))
+ )))
+
+(defun inversion-check-version (version incompatible-version
+ minimum &rest _reserved)
+ "Check that a given version meets the minimum requirement.
+VERSION, INCOMPATIBLE-VERSION and MINIMUM are of similar format to
+return entries of `inversion-decode-version', or a classic version
+string. INCOMPATIBLE-VERSION can be nil.
+RESERVED arguments are kept for a later use.
+Return:
+- nil if everything is ok.
+- `outdated' if VERSION is less than MINIMUM.
+- `incompatible' if VERSION is not backward compatible with MINIMUM.
+- t if the check failed."
+ (let ((code (if (stringp version)
+ (inversion-decode-version version)
+ version))
+ (req (if (stringp minimum)
+ (inversion-decode-version minimum)
+ minimum))
+ )
+ ;; Perform a test.
+ (cond
+ ((inversion-= code req)
+ ;; Same version.. Yay!
+ nil)
+ ((inversion-< code req)
+ ;; Version is too old!
+ 'outdated)
+ ((inversion-< req code)
+ ;; Newer is installed. What to do?
+ (let ((incompatible
+ (if (stringp incompatible-version)
+ (inversion-decode-version incompatible-version)
+ incompatible-version)))
+ (cond
+ ((not incompatible) nil)
+ ((or (inversion-= req incompatible)
+ (inversion-< req incompatible))
+ ;; The requested version is = or < than what the package
+ ;; maintainer says is incompatible.
+ 'incompatible)
+ ;; Things are ok.
+ (t nil))))
+ ;; Check failed
+ (t t))))
+
+(defun inversion-test (package minimum &rest reserved)
+ "Test that PACKAGE meets the MINIMUM version requirement.
+PACKAGE is a symbol, similar to what is passed to `require'.
+MINIMUM is of similar format to return entries of
+`inversion-decode-version', or a classic version string.
+RESERVED arguments are kept for a later user.
+This depends on the symbols `PACKAGE-version' and optionally
+`PACKAGE-incompatible-version' being defined in PACKAGE.
+Return nil if everything is ok. Return an error string otherwise."
+ (let ((check (inversion-check-version
+ (inversion-package-version package)
+ (inversion-package-incompatibility-version package)
+ minimum reserved)))
+ (cond
+ ((null check)
+ ;; Same version.. Yay!
+ nil)
+ ((eq check 'outdated)
+ ;; Version is too old!
+ (format "You need to upgrade package %s to %s" package minimum))
+ ((eq check 'incompatible)
+ ;; Newer is installed but the requested version is = or < than
+ ;; what the package maintainer says is incompatible, then throw
+ ;; that error.
+ (format "Package %s version is not backward compatible with %s"
+ package minimum))
+ ;; Check failed
+ (t "Inversion version check failed."))))
+
+(defun inversion-reverse-test (package oldversion &rest reserved)
+ "Test that PACKAGE at OLDVERSION is still compatible.
+If something like a save file is loaded at OLDVERSION, this
+test will identify if OLDVERSION is compatible with the current version
+of PACKAGE.
+PACKAGE is a symbol, similar to what is passed to `require'.
+OLDVERSION is of similar format to return entries of
+`inversion-decode-version', or a classic version string.
+RESERVED arguments are kept for a later user.
+This depends on the symbols `PACKAGE-version' and optionally
+`PACKAGE-incompatible-version' being defined in PACKAGE.
+Return nil if everything is ok. Return an error string otherwise."
+ (let ((check (inversion-check-version
+ (inversion-package-version package)
+ (inversion-package-incompatibility-version package)
+ oldversion reserved)))
+ (cond
+ ((null check)
+ ;; Same version.. Yay!
+ nil)
+ ((eq check 'outdated)
+ ;; Version is too old!
+ (format "Package %s version %s is not compatible with current version"
+ package oldversion))
+ ((eq check 'incompatible)
+ ;; Newer is installed but the requested version is = or < than
+ ;; what the package maintainer says is incompatible, then throw
+ ;; that error.
+ (format "Package %s version is not backward compatible with %s"
+ package oldversion))
+ ;; Check failed
+ (t "Inversion version check failed."))))
+
+(defun inversion-require (package version &optional file directory
+ &rest _reserved)
+ "Declare that you need PACKAGE with at least VERSION.
+PACKAGE might be found in FILE. (See `require'.)
+Throws an error if VERSION is incompatible with what is installed.
+Optional argument DIRECTORY is a location where new versions of
+this tool can be located. If there is a versioning problem and
+DIRECTORY is provided, inversion will offer to download the file.
+Optional argument RESERVED is saved for later use."
+ (require package file)
+ (let ((err (inversion-test package version)))
+ (when err
+ (if directory
+ (inversion-download-package-ask err package directory version)
+ (error err)))
+ ;; Return the package symbol that was required.
+ package))
+
+;;;###autoload
+(defun inversion-require-emacs (emacs-ver xemacs-ver sxemacs-ver)
+ "Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver.
+Only checks one based on which kind of Emacs is being run.
+
+This function is obsolete; do this instead:
+ (when (version<= \"28.1\" emacs-version) ...)"
+ (declare (obsolete nil "28.1"))
+ (let ((err (inversion-test 'emacs
+ (cond ((featurep 'sxemacs)
+ sxemacs-ver)
+ ((featurep 'xemacs)
+ xemacs-ver)
+ (t
+ emacs-ver)))))
+ (if err (error err)
+ ;; Something nice...
+ t)))
+
+(defconst inversion-find-data
+ '("(def\\(var\\|const\\)\\s-+%s-%s\\s-+\"\\([^\"]+\\)" 2)
+ "Regexp template and match data index of a version string.")
+
+(defun inversion-find-version (package)
+ "Search for the version and incompatible version of PACKAGE.
+Does not load PACKAGE nor requires that it has been previously loaded.
+Search in the directories in `load-path' for a PACKAGE.el library.
+Visit the file found and search for the declarations of variables or
+constants `PACKAGE-version' and `PACKAGE-incompatible-version'. The
+value of these variables must be a version string.
+
+Return a pair (VERSION-STRING . INCOMPATIBLE-VERSION-STRING) where
+INCOMPATIBLE-VERSION-STRING can be nil.
+Return nil when VERSION-STRING was not found."
+ (let* ((file (locate-library (format "%s.el" package) t))
+ (tag (car inversion-find-data))
+ (idx (nth 1 inversion-find-data))
+ version)
+ (when file
+ (with-temp-buffer
+ ;; The 3000 is a bit arbitrary, but should cut down on
+ ;; fileio as version info usually is at the very top
+ ;; of a file. After a long commentary could be bad.
+ (insert-file-contents-literally file nil 0 3000)
+ (goto-char (point-min))
+ (when (re-search-forward (format tag package 'version) nil t)
+ (setq version (list (match-string idx)))
+ (goto-char (point-min))
+ (when (re-search-forward
+ (format tag package 'incompatible-version) nil t)
+ (setcdr version (match-string idx))))))
+ version))
+
+(defun inversion-add-to-load-path (package minimum
+ &optional installdir
+ &rest subdirs)
+ "Add the PACKAGE path to `load-path' if necessary.
+MINIMUM is the minimum version requirement of PACKAGE.
+Optional argument INSTALLDIR is the base directory where PACKAGE is
+installed. It defaults to `default-directory'/PACKAGE.
+SUBDIRS are sub-directories to add to `load-path', following the main
+INSTALLDIR path."
+ (let ((ver (inversion-find-version package)))
+ ;; If PACKAGE not found or a bad version already in `load-path',
+ ;; prepend the new PACKAGE path, so it will be loaded first.
+ (when (or (not ver)
+ (and
+ (inversion-check-version (car ver) (cdr ver) minimum)
+ (message "Outdated %s %s shadowed to meet minimum version %s"
+ package (car ver) minimum)
+ t))
+ (let* ((default-directory
+ (or installdir
+ (expand-file-name (format "./%s" package))))
+ subdir)
+ (when (file-directory-p default-directory)
+ ;; Add SUBDIRS
+ (while subdirs
+ (setq subdir (expand-file-name (car subdirs))
+ subdirs (cdr subdirs))
+ (when (file-directory-p subdir)
+ ;;(message "%S added to `load-path'" subdir)
+ (add-to-list 'load-path subdir)))
+ ;; Add the main path
+ ;;(message "%S added to `load-path'" default-directory)
+ (add-to-list 'load-path default-directory))
+ ;; We get to this point iff we do not accept or there is no
+ ;; system file. Let's check the version of what we just
+ ;; installed... just to be safe.
+ (let ((newver (inversion-find-version package)))
+ (if (not newver)
+ (error "Failed to find version for newly installed %s"
+ package))
+ (if (inversion-check-version (car newver) (cdr newver) minimum)
+ (error "Outdated %s %s just installed" package (car newver)))
+ )))))
+
+;;; URL and downloading code
+;;
+(defun inversion-locate-package-files (package directory &optional version)
+ "Get a list of distributions of PACKAGE from DIRECTORY.
+DIRECTORY can be an ange-ftp compatible filename, such as:
+ \"/ftp@ftp1.sourceforge.net/pub/sourceforge/PACKAGE\"
+If it is a URL, wget will be used for download.
+Optional argument VERSION will restrict the list of available versions
+to the file matching VERSION exactly, or nil."
+;;DIRECTORY should also allow a URL:
+;; \"https://ftp1.sourceforge.net/PACKAGE\"
+;; but then I can get file listings easily.
+ (if (symbolp package) (setq package (symbol-name package)))
+ (directory-files directory t
+ (if version
+ (concat "^" package "-" version "\\>")
+ package)))
+
+(defvar inversion-package-common-tails '( ".tar.gz"
+ ".tar"
+ ".zip"
+ ".gz"
+ )
+ "Common distribution mechanisms for Emacs Lisp packages.")
+
+(defun inversion-locate-package-files-and-split (package directory &optional version)
+ "Use `inversion-locate-package-files' to get a list of PACKAGE files.
+DIRECTORY is the location where distributions of PACKAGE are.
+VERSION is an optional argument specifying a version to restrict to.
+The return list is an alist with the version string in the CAR,
+and the full path name in the CDR."
+ (if (symbolp package) (setq package (symbol-name package)))
+ (let ((f (inversion-locate-package-files package directory version))
+ (out nil))
+ (while f
+ (let* ((file (car f))
+ (dist (file-name-nondirectory file))
+ (tails inversion-package-common-tails)
+ (verstring nil))
+ (while (and tails (not verstring))
+ (when (string-match (concat (car tails) "$") dist)
+ (setq verstring
+ (substring dist (1+ (length package)) (match-beginning 0))))
+ (setq tails (cdr tails)))
+ (if (not verstring)
+ (error "Cannot decode version for %s" dist))
+ (setq out
+ (cons
+ (cons verstring file)
+ out))
+ (setq f (cdr f))))
+ out))
+
+(defun inversion-download-package-ask (err package directory version)
+ "Due to ERR, offer to download PACKAGE from DIRECTORY.
+The package should have VERSION available for download."
+ (if (symbolp package) (setq package (symbol-name package)))
+ (let ((files (inversion-locate-package-files-and-split
+ package directory version)))
+ (if (not files)
+ (error err)
+ (if (not (y-or-n-p (concat err ": Download update? ")))
+ (error err)
+ (let ((dest (read-directory-name (format "Download %s to: "
+ package)
+ t)))
+ (if (> (length files) 1)
+ (setq files
+ (list
+ "foo" ;; ignored
+ (read-file-name "Version to download: "
+ directory
+ files
+ t
+ (concat
+ (file-name-as-directory directory)
+ package)
+ nil))))
+
+ (copy-file (cdr (car files)) dest))))))
+
+(provide 'inversion)
+
+;;; inversion.el ends here
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el
index 58cada13747..a630baf3543 100644
--- a/lisp/obsolete/iswitchb.el
+++ b/lisp/obsolete/iswitchb.el
@@ -1,4 +1,4 @@
-;;; iswitchb.el --- switch between buffers using substrings
+;;; iswitchb.el --- switch between buffers using substrings -*- lexical-binding: t; -*-
;; Copyright (C) 1996-1997, 2000-2021 Free Software Foundation, Inc.
@@ -258,8 +258,7 @@
"Non-nil if searching of buffer names should ignore case.
If this is non-nil but the user input has any upper case letters, matching
is temporarily case sensitive."
- :type 'boolean
- :group 'iswitchb)
+ :type 'boolean)
(defcustom iswitchb-buffer-ignore
'("^ ")
@@ -267,8 +266,7 @@ is temporarily case sensitive."
For example, traditional behavior is not to list buffers whose names begin
with a space, for which the regexp is `^ '. See the source file for
example functions that filter buffer names."
- :type '(repeat (choice regexp function))
- :group 'iswitchb)
+ :type '(repeat (choice regexp function)))
(put 'iswitchb-buffer-ignore 'risky-local-variable t)
(defcustom iswitchb-max-to-show nil
@@ -277,8 +275,7 @@ If this value is N, and N is greater than the number of matching
buffers, the first N/2 and the last N/2 matching buffers are
shown. This can greatly speed up iswitchb if you have a
multitude of buffers open."
- :type '(choice (const :tag "Show all" nil) integer)
- :group 'iswitchb)
+ :type '(choice (const :tag "Show all" nil) integer))
(defcustom iswitchb-use-virtual-buffers nil
"If non-nil, refer to past buffers when none match.
@@ -289,8 +286,7 @@ enabled if this variable is configured to a non-nil value."
:set (function
(lambda (sym value)
(if value (recentf-mode 1))
- (set sym value)))
- :group 'iswitchb)
+ (set sym value))))
(defvar iswitchb-virtual-buffers nil)
@@ -299,8 +295,7 @@ enabled if this variable is configured to a non-nil value."
The most useful values are `iswitchb-completion-help', which pops up a
window with completion alternatives, or `iswitchb-next-match' or
`iswitchb-prev-match', which cycle the buffer list."
- :type 'hook
- :group 'iswitchb)
+ :type 'hook)
;; Examples for setting the value of iswitchb-buffer-ignore
;;(defun iswitchb-ignore-c-mode (name)
@@ -318,7 +313,7 @@ Possible values:
`otherwindow' Show new buffer in another window (same frame)
`display' Display buffer in another window without switching to it
`otherframe' Show new buffer in another frame
-`maybe-frame' If a buffer is visible in another frame, prompt to ask if you
+`maybe-frame' If a buffer is visible in another frame, prompt to ask if
you want to see the buffer in the same window of the current
frame or in the other frame.
`always-frame' If a buffer is visible in another frame, raise that
@@ -328,46 +323,38 @@ Possible values:
(const display)
(const otherframe)
(const maybe-frame)
- (const always-frame))
- :group 'iswitchb)
+ (const always-frame)))
(defcustom iswitchb-regexp nil
"Non-nil means that `iswitchb' will do regexp matching.
Value can be toggled within `iswitchb' using `iswitchb-toggle-regexp'."
- :type 'boolean
- :group 'iswitchb)
+ :type 'boolean)
(defcustom iswitchb-newbuffer t
"Non-nil means create new buffer if no buffer matches substring.
See also `iswitchb-prompt-newbuffer'."
- :type 'boolean
- :group 'iswitchb)
+ :type 'boolean)
(defcustom iswitchb-prompt-newbuffer t
"Non-nil means prompt user to confirm before creating new buffer.
See also `iswitchb-newbuffer'."
- :type 'boolean
- :group 'iswitchb)
+ :type 'boolean)
(defcustom iswitchb-use-faces t
"Non-nil means use font-lock faces for showing first match."
- :type 'boolean
- :group 'iswitchb)
+ :type 'boolean)
(defcustom iswitchb-use-frame-buffer-list nil
"Non-nil means use the currently selected frame's buffer list."
- :type 'boolean
- :group 'iswitchb)
+ :type 'boolean)
(defcustom iswitchb-make-buflist-hook nil
"Hook to run when list of matching buffers is created."
- :type 'hook
- :group 'iswitchb)
+ :type 'hook)
(defcustom iswitchb-delim ","
"Delimiter to put between buffer names when displaying results."
- :type 'string
- :group 'iswitchb)
+ :type 'string)
(defcustom iswitchb-all-frames 'visible
"Argument to pass to `walk-windows' when iswitchb is finding buffers.
@@ -375,8 +362,7 @@ See documentation of `walk-windows' for useful values."
:type '(choice (const :tag "Selected frame only" nil)
(const :tag "All existing frames" t)
(const :tag "All visible frames" visible)
- (const :tag "All frames on this terminal" 0))
- :group 'iswitchb)
+ (const :tag "All frames on this terminal" 0)))
(defcustom iswitchb-minibuffer-setup-hook nil
"Iswitchb-specific customization of minibuffer setup.
@@ -387,37 +373,32 @@ For instance:
\\='\(lambda () (set (make-local-variable \\='max-mini-window-height) 3)))
will constrain the minibuffer to a maximum height of 3 lines when
iswitchb is running."
- :type 'hook
- :group 'iswitchb)
+ :type 'hook)
(defface iswitchb-single-match
'((t
(:inherit font-lock-comment-face)))
"Iswitchb face for single matching buffer name."
- :version "22.1"
- :group 'iswitchb)
+ :version "22.1")
(defface iswitchb-current-match
'((t
(:inherit font-lock-function-name-face)))
"Iswitchb face for current matching buffer name."
- :version "22.1"
- :group 'iswitchb)
+ :version "22.1")
(defface iswitchb-virtual-matches
'((t
(:inherit font-lock-builtin-face)))
"Iswitchb face for matching virtual buffer names.
See also `iswitchb-use-virtual-buffers'."
- :version "22.1"
- :group 'iswitchb)
+ :version "22.1")
(defface iswitchb-invalid-regexp
'((t
(:inherit font-lock-warning-face)))
"Iswitchb face for indicating invalid regexp. "
- :version "22.1"
- :group 'iswitchb)
+ :version "22.1")
;; Do we need the variable iswitchb-use-mycompletion?
@@ -465,18 +446,18 @@ interfere with other minibuffer usage.")
(defvar iswitchb-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
- (define-key map "?" 'iswitchb-completion-help)
- (define-key map "\C-s" 'iswitchb-next-match)
- (define-key map "\C-r" 'iswitchb-prev-match)
- (define-key map [?\C-.] 'iswitchb-next-match)
- (define-key map [?\C-,] 'iswitchb-prev-match)
- (define-key map "\t" 'iswitchb-complete)
- (define-key map "\C-j" 'iswitchb-select-buffer-text)
- (define-key map "\C-t" 'iswitchb-toggle-regexp)
- (define-key map "\C-x\C-f" 'iswitchb-find-file)
- (define-key map "\C-c" 'iswitchb-toggle-case)
- (define-key map "\C-k" 'iswitchb-kill-buffer)
- (define-key map "\C-m" 'iswitchb-exit-minibuffer)
+ (define-key map "?" #'iswitchb-completion-help)
+ (define-key map "\C-s" #'iswitchb-next-match)
+ (define-key map "\C-r" #'iswitchb-prev-match)
+ (define-key map [?\C-.] #'iswitchb-next-match)
+ (define-key map [?\C-,] #'iswitchb-prev-match)
+ (define-key map "\t" #'iswitchb-complete)
+ (define-key map "\C-j" #'iswitchb-select-buffer-text)
+ (define-key map "\C-t" #'iswitchb-toggle-regexp)
+ (define-key map "\C-x\C-f" #'iswitchb-find-file)
+ (define-key map "\C-c" #'iswitchb-toggle-case)
+ (define-key map "\C-k" #'iswitchb-kill-buffer)
+ (define-key map "\C-m" #'iswitchb-exit-minibuffer)
map)
"Minibuffer keymap for `iswitchb-buffer'.")
@@ -596,17 +577,17 @@ the selection process begins. Used by isearchb.el."
(let ((map (copy-keymap minibuffer-local-map))
buf-sel iswitchb-final-text
icomplete-mode) ; prevent icomplete starting up
- (define-key map "?" 'iswitchb-completion-help)
- (define-key map "\C-s" 'iswitchb-next-match)
- (define-key map "\C-r" 'iswitchb-prev-match)
- (define-key map "\t" 'iswitchb-complete)
- (define-key map "\C-j" 'iswitchb-select-buffer-text)
- (define-key map "\C-t" 'iswitchb-toggle-regexp)
- (define-key map "\C-x\C-f" 'iswitchb-find-file)
- (define-key map "\C-n" 'iswitchb-toggle-ignore)
- (define-key map "\C-c" 'iswitchb-toggle-case)
- (define-key map "\C-k" 'iswitchb-kill-buffer)
- (define-key map "\C-m" 'iswitchb-exit-minibuffer)
+ (define-key map "?" #'iswitchb-completion-help)
+ (define-key map "\C-s" #'iswitchb-next-match)
+ (define-key map "\C-r" #'iswitchb-prev-match)
+ (define-key map "\t" #'iswitchb-complete)
+ (define-key map "\C-j" #'iswitchb-select-buffer-text)
+ (define-key map "\C-t" #'iswitchb-toggle-regexp)
+ (define-key map "\C-x\C-f" #'iswitchb-find-file)
+ (define-key map "\C-n" #'iswitchb-toggle-ignore)
+ (define-key map "\C-c" #'iswitchb-toggle-case)
+ (define-key map "\C-k" #'iswitchb-kill-buffer)
+ (define-key map "\C-m" #'iswitchb-exit-minibuffer)
(setq iswitchb-mode-map map)
(run-hooks 'iswitchb-define-mode-map-hook)
@@ -946,9 +927,9 @@ If `iswitchb-change-word-sub' cannot be found in WORD, return nil."
(if iswitchb-regexp
subs
(regexp-quote subs)))
- (setq res (mapcar 'iswitchb-word-matching-substring lis))
+ (setq res (mapcar #'iswitchb-word-matching-substring lis))
(setq res (delq nil res)) ;; remove any nil elements (shouldn't happen)
- (setq alist (mapcar 'iswitchb-makealist res)) ;; could use an OBARRAY
+ (setq alist (mapcar #'iswitchb-makealist res)) ;; could use an OBARRAY
;; try-completion returns t if there is an exact match.
(let ((completion-ignore-case (iswitchb-case)))
@@ -1148,43 +1129,6 @@ For details of keybindings, do `\\[describe-function] iswitchb'."
(setq iswitchb-method 'otherframe)
(iswitchb))
-;;; XEmacs hack for showing default buffer
-
-;; The first time we enter the minibuffer, Emacs puts up the default
-;; buffer to switch to, but XEmacs doesn't -- presumably there is a
-;; subtle difference in the two versions of post-command-hook. The
-;; default is shown for both whenever we delete all of our text
-;; though, indicating its just a problem the first time we enter the
-;; function. To solve this, we use another entry hook for emacs to
-;; show the default the first time we enter the minibuffer.
-
-(defun iswitchb-init-XEmacs-trick ()
- "Display default buffer when first entering minibuffer.
-This is a hack for XEmacs, and should really be handled by `iswitchb-exhibit'."
- (if (iswitchb-entryfn-p)
- (progn
- (iswitchb-exhibit)
- (goto-char (point-min)))))
-
-;; add this hook for XEmacs only.
-(if (featurep 'xemacs)
- (add-hook 'iswitchb-minibuffer-setup-hook
- 'iswitchb-init-XEmacs-trick))
-
-;;; XEmacs / backspace key
-;; For some reason, if the backspace key is pressed in XEmacs, the
-;; line gets confused, so I've added a simple key definition to make
-;; backspace act like the normal delete key.
-
-(defun iswitchb-xemacs-backspacekey ()
- "Bind backspace to `backward-delete-char'."
- (define-key iswitchb-mode-map '[backspace] 'backward-delete-char)
- (define-key iswitchb-mode-map '[(meta backspace)] 'backward-kill-word))
-
-(if (featurep 'xemacs)
- (add-hook 'iswitchb-define-mode-map-hook
- 'iswitchb-xemacs-backspacekey))
-
;;; ICOMPLETE TYPE CODE
(defun iswitchb-exhibit ()
@@ -1214,18 +1158,6 @@ Copied from `icomplete-exhibit' with two changes:
(insert (iswitchb-completions
contents))))))
-(defvar most-len)
-(defvar most-is-exact)
-
-(defun iswitchb-output-completion (com)
- (if (= (length com) most-len)
- ;; Most is one exact match,
- ;; note that and leave out
- ;; for later indication:
- (ignore
- (setq most-is-exact t))
- (substring com most-len)))
-
(defun iswitchb-completions (name)
"Return the string that is displayed after the user's text.
Modified from `icomplete-completions'."
@@ -1273,7 +1205,7 @@ Modified from `icomplete-completions'."
iswitchb-virtual-buffers)))
(setq head (cdr head)))
(setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers)
- comps (mapcar 'car iswitchb-virtual-buffers))
+ comps (mapcar #'car iswitchb-virtual-buffers))
(let ((comp comps))
(while comp
(put-text-property 0 (length (car comp))
@@ -1316,15 +1248,11 @@ Modified from `icomplete-completions'."
(nreverse res))
(list "...")
(nthcdr (- (length comps)
- (/ iswitchb-max-to-show 2)) comps))))
+ (/ iswitchb-max-to-show 2))
+ comps))))
(let* (
- ;;(most (try-completion name candidates predicate))
- (most nil)
- (most-len (length most))
- most-is-exact
(alternatives
- (mapconcat (if most 'iswitchb-output-completion
- 'identity) comps iswitchb-delim)))
+ (mapconcat #'identity comps iswitchb-delim)))
(concat
@@ -1338,17 +1266,9 @@ Modified from `icomplete-completions'."
close-bracket-determined))
;; end of partial matches...
- ;; think this bit can be ignored.
- (and (> most-len (length name))
- (concat open-bracket-determined
- (substring most (length name))
- close-bracket-determined))
-
;; list all alternatives
open-bracket-prospects
- (if most-is-exact
- (concat iswitchb-delim alternatives)
- alternatives)
+ alternatives
close-bracket-prospects))))))
(defun iswitchb-minibuffer-setup ()
@@ -1356,8 +1276,8 @@ Modified from `icomplete-completions'."
Copied from `icomplete-minibuffer-setup-hook'."
(when (iswitchb-entryfn-p)
(set (make-local-variable 'iswitchb-use-mycompletion) t)
- (add-hook 'pre-command-hook 'iswitchb-pre-command nil t)
- (add-hook 'post-command-hook 'iswitchb-post-command nil t)
+ (add-hook 'pre-command-hook #'iswitchb-pre-command nil t)
+ (add-hook 'post-command-hook #'iswitchb-post-command nil t)
(run-hooks 'iswitchb-minibuffer-setup-hook)))
(defun iswitchb-pre-command ()
@@ -1416,10 +1336,10 @@ See the variable `iswitchb-case' for details."
Iswitchb mode is a global minor mode that enables switching
between buffers using substrings. See `iswitchb' for details."
- nil nil iswitchb-global-map :global t :group 'iswitchb
+ :keymap iswitchb-global-map :global t
(if iswitchb-mode
- (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
- (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)))
+ (add-hook 'minibuffer-setup-hook #'iswitchb-minibuffer-setup)
+ (remove-hook 'minibuffer-setup-hook #'iswitchb-minibuffer-setup)))
(provide 'iswitchb)
diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el
index ae15109beaa..cc4fd19c389 100644
--- a/lisp/obsolete/landmark.el
+++ b/lisp/obsolete/landmark.el
@@ -163,51 +163,50 @@
(defcustom landmark-mode-hook nil
"If non-nil, its value is called on entry to Landmark mode."
- :type 'hook
- :group 'landmark)
+ :type 'hook)
(defvar landmark-mode-map
(let ((map (make-sparse-keymap)))
;; Key bindings for cursor motion.
- (define-key map "y" 'landmark-move-nw) ; y
- (define-key map "u" 'landmark-move-ne) ; u
- (define-key map "b" 'landmark-move-sw) ; b
- (define-key map "n" 'landmark-move-se) ; n
- (define-key map "h" 'backward-char) ; h
- (define-key map "l" 'forward-char) ; l
- (define-key map "j" 'landmark-move-down) ; j
- (define-key map "k" 'landmark-move-up) ; k
-
- (define-key map [kp-7] 'landmark-move-nw)
- (define-key map [kp-9] 'landmark-move-ne)
- (define-key map [kp-1] 'landmark-move-sw)
- (define-key map [kp-3] 'landmark-move-se)
- (define-key map [kp-4] 'backward-char)
- (define-key map [kp-6] 'forward-char)
- (define-key map [kp-2] 'landmark-move-down)
- (define-key map [kp-8] 'landmark-move-up)
-
- (define-key map "\C-n" 'landmark-move-down) ; C-n
- (define-key map "\C-p" 'landmark-move-up) ; C-p
+ (define-key map "y" #'landmark-move-nw) ; y
+ (define-key map "u" #'landmark-move-ne) ; u
+ (define-key map "b" #'landmark-move-sw) ; b
+ (define-key map "n" #'landmark-move-se) ; n
+ (define-key map "h" #'backward-char) ; h
+ (define-key map "l" #'forward-char) ; l
+ (define-key map "j" #'landmark-move-down) ; j
+ (define-key map "k" #'landmark-move-up) ; k
+
+ (define-key map [kp-7] #'landmark-move-nw)
+ (define-key map [kp-9] #'landmark-move-ne)
+ (define-key map [kp-1] #'landmark-move-sw)
+ (define-key map [kp-3] #'landmark-move-se)
+ (define-key map [kp-4] #'backward-char)
+ (define-key map [kp-6] #'forward-char)
+ (define-key map [kp-2] #'landmark-move-down)
+ (define-key map [kp-8] #'landmark-move-up)
+
+ (define-key map "\C-n" #'landmark-move-down) ; C-n
+ (define-key map "\C-p" #'landmark-move-up) ; C-p
;; Key bindings for entering Human moves.
- (define-key map "X" 'landmark-human-plays) ; X
- (define-key map "x" 'landmark-human-plays) ; x
-
- (define-key map " " 'landmark-start-robot) ; SPC
- (define-key map [down-mouse-1] 'landmark-start-robot)
- (define-key map [drag-mouse-1] 'landmark-click)
- (define-key map [mouse-1] 'landmark-click)
- (define-key map [down-mouse-2] 'landmark-click)
- (define-key map [mouse-2] 'landmark-mouse-play)
- (define-key map [drag-mouse-2] 'landmark-mouse-play)
-
- (define-key map [remap previous-line] 'landmark-move-up)
- (define-key map [remap next-line] 'landmark-move-down)
- (define-key map [remap beginning-of-line] 'landmark-beginning-of-line)
- (define-key map [remap end-of-line] 'landmark-end-of-line)
- (define-key map [remap undo] 'landmark-human-takes-back)
- (define-key map [remap advertised-undo] 'landmark-human-takes-back)
+ (define-key map "X" #'landmark-human-plays) ; X
+ (define-key map "x" #'landmark-human-plays) ; x
+
+ (define-key map " " #'landmark-start-robot) ; SPC
+ (define-key map [down-mouse-1] #'landmark-start-robot)
+ (define-key map [drag-mouse-1] #'landmark-click)
+ (define-key map [mouse-1] #'landmark-click)
+ (define-key map [down-mouse-2] #'landmark-click)
+ (define-key map [mouse-2] #'landmark-mouse-play)
+ (define-key map [drag-mouse-2] #'landmark-mouse-play)
+
+ (define-key map [remap previous-line] #'landmark-move-up)
+ (define-key map [remap next-line] #'landmark-move-down)
+ (define-key map [remap beginning-of-line] #'landmark-beginning-of-line)
+ (define-key map [remap end-of-line] #'landmark-end-of-line)
+ (define-key map [remap undo] #'landmark-human-takes-back)
+ (define-key map [remap advertised-undo] #'landmark-human-takes-back)
map)
"Local keymap to use in Landmark mode.")
@@ -219,14 +218,12 @@
(defface landmark-font-lock-face-O '((((class color)) :foreground "red")
(t :weight bold))
"Face to use for Emacs's O."
- :version "22.1"
- :group 'landmark)
+ :version "22.1")
(defface landmark-font-lock-face-X '((((class color)) :foreground "green")
(t :weight bold))
"Face to use for your X."
- :version "22.1"
- :group 'landmark)
+ :version "22.1")
(defvar landmark-font-lock-keywords
'(("O" . 'landmark-font-lock-face-O)
@@ -1132,12 +1129,10 @@ this program to add a random element to the way moves were made.")
"If non-nil, print \"One moment please\" when a new board is generated.
The drawback of this is you don't see how many moves the last run took
because it is overwritten by \"One moment please\"."
- :type 'boolean
- :group 'landmark)
+ :type 'boolean)
(defcustom landmark-output-moves t
"If non-nil, output number of moves so far on a move-by-move basis."
- :type 'boolean
- :group 'landmark)
+ :type 'boolean)
(defun landmark-weights-debug ()
@@ -1153,7 +1148,7 @@ because it is overwritten by \"One moment please\"."
(defun landmark-print-distance ()
(insert (format "tree: %S \n" (landmark-calc-distance-of-robot-from 'landmark-tree)))
- (mapc 'landmark-print-distance-int landmark-directions))
+ (mapc #'landmark-print-distance-int landmark-directions))
;;(setq direction 'landmark-n)
@@ -1166,10 +1161,10 @@ because it is overwritten by \"One moment please\"."
(defun landmark-nslify-wts ()
(interactive)
- (let ((l (apply 'append (mapcar 'landmark-nslify-wts-int landmark-directions))))
+ (let ((l (apply #'append (mapcar #'landmark-nslify-wts-int landmark-directions))))
(insert (format "set data_value WTS \n %s \n" l))
(insert (format "/* max: %S min: %S */"
- (eval (cons 'max l)) (eval (cons 'min l))))))
+ (apply #'max l) (apply #'min l)))))
(defun landmark-print-wts-int (direction)
(mapc (lambda (target-direction)
@@ -1184,7 +1179,7 @@ because it is overwritten by \"One moment please\"."
(interactive)
(with-current-buffer "*landmark-wts*"
(insert "==============================\n")
- (mapc 'landmark-print-wts-int landmark-directions)))
+ (mapc #'landmark-print-wts-int landmark-directions)))
(defun landmark-print-moves (moves)
(interactive)
@@ -1204,7 +1199,7 @@ because it is overwritten by \"One moment please\"."
(interactive)
(with-current-buffer "*landmark-y,s,noise*"
(insert "==============================\n")
- (mapc 'landmark-print-y-s-noise-int landmark-directions)))
+ (mapc #'landmark-print-y-s-noise-int landmark-directions)))
(defun landmark-print-smell-int (direction)
(insert (format "%S: smell: %S \n"
@@ -1216,7 +1211,7 @@ because it is overwritten by \"One moment please\"."
(with-current-buffer "*landmark-smell*"
(insert "==============================\n")
(insert (format "tree: %S \n" (get 'z 't)))
- (mapc 'landmark-print-smell-int landmark-directions)))
+ (mapc #'landmark-print-smell-int landmark-directions)))
(defun landmark-print-w0-int (direction)
(insert (format "%S: w0: %S \n"
@@ -1227,7 +1222,7 @@ because it is overwritten by \"One moment please\"."
(interactive)
(with-current-buffer "*landmark-w0*"
(insert "==============================\n")
- (mapc 'landmark-print-w0-int landmark-directions)))
+ (mapc #'landmark-print-w0-int landmark-directions)))
(defun landmark-blackbox ()
(with-current-buffer "*landmark-blackbox*"
@@ -1252,36 +1247,31 @@ because it is overwritten by \"One moment please\"."
(defun landmark-print-wts-blackbox ()
(interactive)
- (mapc 'landmark-print-wts-int landmark-directions))
+ (mapc #'landmark-print-wts-int landmark-directions))
;;;_ - learning parameters
(defcustom landmark-bound 0.005
"The maximum that w0j may be."
- :type 'number
- :group 'landmark)
+ :type 'number)
(defcustom landmark-c 1.0
"A factor applied to modulate the increase in wij.
Used in the function landmark-update-normal-weights."
- :type 'number
- :group 'landmark)
+ :type 'number)
(defcustom landmark-c-naught 0.5
"A factor applied to modulate the increase in w0j.
Used in the function landmark-update-naught-weights."
- :type 'number
- :group 'landmark)
+ :type 'number)
(defvar landmark-initial-w0 0.0)
(defvar landmark-initial-wij 0.0)
(defcustom landmark-no-payoff 0
"The amount of simulation cycles that have occurred with no movement.
Used to move the robot when he is stuck in a rut for some reason."
- :type 'integer
- :group 'landmark)
+ :type 'integer)
(defcustom landmark-max-stall-time 2
"The maximum number of cycles that the robot can remain stuck in a place.
After this limit is reached, landmark-random-move is called to
push him out of it."
- :type 'integer
- :group 'landmark)
+ :type 'integer)
;;;_ + Randomizing functions
@@ -1346,7 +1336,8 @@ push him out of it."
(put 'landmark-e 'y (/ landmark-board-height 2))
(put 'landmark-e 'sym 4)
- (mapc 'landmark-plot-internal '(landmark-n landmark-s landmark-e landmark-w landmark-tree)))
+ (mapc #'landmark-plot-internal
+ '(landmark-n landmark-s landmark-e landmark-w landmark-tree)))
@@ -1434,7 +1425,7 @@ push him out of it."
;;;_ + Functions to move robot
(defun landmark-confidence-for (target-direction)
- (apply '+
+ (apply #'+
(get target-direction 'w0)
(mapcar (lambda (direction)
(*
@@ -1494,13 +1485,13 @@ push him out of it."
(landmark-random-move)
(progn
(landmark-calc-confidences)
- (mapc 'landmark-y landmark-directions)
+ (mapc #'landmark-y landmark-directions)
(landmark-move)))
(landmark-calc-payoff)
- (mapc 'landmark-update-normal-weights landmark-directions)
- (mapc 'landmark-update-naught-weights landmark-directions)
+ (mapc #'landmark-update-normal-weights landmark-directions)
+ (mapc #'landmark-update-naught-weights landmark-directions)
(if landmark-debug
(landmark-weights-debug)))
(landmark-terminate-game nil))
@@ -1536,8 +1527,8 @@ If the game is finished, this command requests for another game."
(landmark-calc-payoff)
- (mapc 'landmark-update-normal-weights landmark-directions)
- (mapc 'landmark-update-naught-weights landmark-directions)
+ (mapc #'landmark-update-normal-weights landmark-directions)
+ (mapc #'landmark-update-naught-weights landmark-directions)
(landmark-amble-robot)
)))))))
@@ -1576,7 +1567,7 @@ If the game is finished, this command requests for another game."
(if (not save-weights)
(progn
- (mapc 'landmark-fix-weights-for landmark-directions)
+ (mapc #'landmark-fix-weights-for landmark-directions)
(dolist (direction landmark-directions)
(put direction 'w0 landmark-initial-w0)))
(message "Weights preserved for this run."))
@@ -1618,7 +1609,7 @@ If the game is finished, this command requests for another game."
;;;_ + landmark-test-run ()
;;;###autoload
-(defalias 'landmark-repeat 'landmark-test-run)
+(defalias 'landmark-repeat #'landmark-test-run)
;;;###autoload
(defun landmark-test-run ()
"Run 100 Landmark games, each time saving the weights from the previous game."
@@ -1670,13 +1661,13 @@ Use \\[describe-mode] for more info."
(if landmark-one-moment-please
(message "One moment, please..."))
(landmark-start-game landmark-n landmark-m)
- (eval (cons 'landmark-init
- (cond
- ((= parg 1) '(t nil))
- ((= parg 2) '(t t))
- ((= parg 3) '(nil t))
- ((= parg 4) '(nil nil))
- (t '(nil t))))))))
+ (apply #'landmark-init
+ (cond
+ ((= parg 1) '(t nil))
+ ((= parg 2) '(t t))
+ ((= parg 3) '(nil t))
+ ((= parg 4) '(nil nil))
+ (t '(nil t)))))))
;;;_ + Local variables
diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el
index e1a01913bea..13f14aad6d1 100644
--- a/lisp/obsolete/lazy-lock.el
+++ b/lisp/obsolete/lazy-lock.el
@@ -1,4 +1,4 @@
-;;; lazy-lock.el --- lazy demand-driven fontification for fast Font Lock mode
+;;; lazy-lock.el --- lazy demand-driven fontification for fast Font Lock mode -*- lexical-binding: t; -*-
;; Copyright (C) 1994-1998, 2001-2021 Free Software Foundation, Inc.
@@ -270,30 +270,14 @@
(eval-when-compile (require 'cl-lib))
(eval-when-compile
- ;; We use this to preserve or protect things when modifying text properties.
- (defmacro save-buffer-state (varlist &rest body)
- "Bind variables according to VARLIST and eval BODY restoring buffer state."
- `(let* (,@(append varlist
- '((modified (buffer-modified-p))
- (buffer-undo-list t)
- (inhibit-read-only t)
- (inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t)
- deactivate-mark
- buffer-file-name
- buffer-file-truename)))
- ,@body
- (when (and (not modified) (buffer-modified-p))
- (restore-buffer-modified-p nil))))
- (put 'save-buffer-state 'lisp-indent-function 1)
;;
;; We use this for clarity and speed. Naughty but nice.
(defmacro do-while (test &rest body)
"(do-while TEST BODY...): eval BODY... and repeat if TEST yields non-nil.
The order of execution is thus BODY, TEST, BODY, TEST and so on
until TEST returns nil."
- `(while (progn ,@body ,test)))
- (put 'do-while 'lisp-indent-function (get 'while 'lisp-indent-function)))
+ (declare (indent 1) (debug t))
+ `(while (progn ,@body ,test))))
(defgroup lazy-lock nil
"Font Lock support mode to fontify lazily."
@@ -326,8 +310,7 @@ The value of this variable is used when Lazy Lock mode is turned on."
(symbol :tag "name"))
(radio :tag "Size"
(const :tag "none" nil)
- (integer :tag "size")))))
- :group 'lazy-lock)
+ (integer :tag "size"))))))
(defcustom lazy-lock-defer-on-the-fly t
"If non-nil, means fontification after a change should be deferred.
@@ -346,8 +329,7 @@ The value of this variable is used when Lazy Lock mode is turned on."
(set :menu-tag "mode specific" :tag "modes"
:value (not)
(const :tag "Except" not)
- (repeat :inline t (symbol :tag "mode"))))
- :group 'lazy-lock)
+ (repeat :inline t (symbol :tag "mode")))))
(defcustom lazy-lock-defer-on-scrolling nil
"If non-nil, means fontification after a scroll should be deferred.
@@ -371,8 +353,7 @@ makes little sense if `lazy-lock-defer-contextually' is non-nil.)
The value of this variable is used when Lazy Lock mode is turned on."
:type '(choice (const :tag "never" nil)
(const :tag "always" t)
- (other :tag "eventually" eventually))
- :group 'lazy-lock)
+ (other :tag "eventually" eventually)))
(defcustom lazy-lock-defer-contextually 'syntax-driven
"If non-nil, means deferred fontification should be syntactically true.
@@ -389,8 +370,7 @@ buffer mode's syntax table, i.e., only if `font-lock-keywords-only' is nil.
The value of this variable is used when Lazy Lock mode is turned on."
:type '(choice (const :tag "never" nil)
(const :tag "always" t)
- (other :tag "syntax-driven" syntax-driven))
- :group 'lazy-lock)
+ (other :tag "syntax-driven" syntax-driven)))
(defcustom lazy-lock-defer-time 0.25
"Time in seconds to delay before beginning deferred fontification.
@@ -401,8 +381,7 @@ variables `lazy-lock-defer-on-the-fly', `lazy-lock-defer-on-scrolling' and
The value of this variable is used when Lazy Lock mode is turned on."
:type '(choice (const :tag "never" nil)
- (number :tag "seconds"))
- :group 'lazy-lock)
+ (number :tag "seconds")))
(defcustom lazy-lock-stealth-time 30
"Time in seconds to delay before beginning stealth fontification.
@@ -411,16 +390,14 @@ If nil, means stealth fontification is never performed.
The value of this variable is used when Lazy Lock mode is turned on."
:type '(choice (const :tag "never" nil)
- (number :tag "seconds"))
- :group 'lazy-lock)
+ (number :tag "seconds")))
(defcustom lazy-lock-stealth-lines (if font-lock-maximum-decoration 100 250)
"Maximum size of a chunk of stealth fontification.
Each iteration of stealth fontification can fontify this number of lines.
To speed up input response during stealth fontification, at the cost of stealth
taking longer to fontify, you could reduce the value of this variable."
- :type '(integer :tag "lines")
- :group 'lazy-lock)
+ :type '(integer :tag "lines"))
(defcustom lazy-lock-stealth-load
(if (condition-case nil (load-average) (error)) 200)
@@ -435,8 +412,7 @@ See also `lazy-lock-stealth-nice'."
:type (if (condition-case nil (load-average) (error))
'(choice (const :tag "never" nil)
(integer :tag "load"))
- '(const :format "%t: unsupported\n" nil))
- :group 'lazy-lock)
+ '(const :format "%t: unsupported\n" nil)))
(defcustom lazy-lock-stealth-nice 0.125
"Time in seconds to pause between chunks of stealth fontification.
@@ -447,14 +423,12 @@ To reduce machine load during stealth fontification, at the cost of stealth
taking longer to fontify, you could increase the value of this variable.
See also `lazy-lock-stealth-load'."
:type '(choice (const :tag "never" nil)
- (number :tag "seconds"))
- :group 'lazy-lock)
+ (number :tag "seconds")))
(defcustom lazy-lock-stealth-verbose
(and (not lazy-lock-defer-contextually) (not (null font-lock-verbose)))
"If non-nil, means stealth fontification should show status messages."
- :type 'boolean
- :group 'lazy-lock)
+ :type 'boolean)
;; User Functions:
@@ -580,30 +554,30 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
;; Add hook if lazy-lock.el is fontifying on scrolling or is deferring.
(when (or fontifying defer-change defer-scroll defer-context)
(add-hook 'window-scroll-functions (if defer-scroll
- 'lazy-lock-defer-after-scroll
- 'lazy-lock-fontify-after-scroll)
+ #'lazy-lock-defer-after-scroll
+ #'lazy-lock-fontify-after-scroll)
nil t))
;;
;; Add hook if lazy-lock.el is fontifying and is not deferring changes.
(when (and fontifying (not defer-change) (not defer-context))
- (add-hook 'before-change-functions 'lazy-lock-arrange-before-change nil t))
+ (add-hook 'before-change-functions #'lazy-lock-arrange-before-change nil t))
;;
;; Replace Font Lock mode hook.
- (remove-hook 'after-change-functions 'font-lock-after-change-function t)
+ (remove-hook 'after-change-functions #'font-lock-after-change-function t)
(add-hook 'after-change-functions
(cond ((and defer-change defer-context)
- 'lazy-lock-defer-rest-after-change)
+ #'lazy-lock-defer-rest-after-change)
(defer-change
- 'lazy-lock-defer-line-after-change)
+ #'lazy-lock-defer-line-after-change)
(defer-context
- 'lazy-lock-fontify-rest-after-change)
+ #'lazy-lock-fontify-rest-after-change)
(t
- 'lazy-lock-fontify-line-after-change))
+ #'lazy-lock-fontify-line-after-change))
nil t)
;;
;; Add package-specific hook.
- (add-hook 'outline-view-change-hook 'lazy-lock-fontify-after-visage nil t)
- (add-hook 'hs-hide-hook 'lazy-lock-fontify-after-visage nil t))
+ (add-hook 'outline-view-change-hook #'lazy-lock-fontify-after-visage nil t)
+ (add-hook 'hs-hide-hook #'lazy-lock-fontify-after-visage nil t))
(defun lazy-lock-install-timers (dtime stime)
;; Schedule or re-schedule the deferral and stealth timers.
@@ -616,13 +590,13 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
(when (cdr defer)
(cancel-timer (cdr defer)))
(setcar lazy-lock-timers (cons dtime (and dtime
- (run-with-idle-timer dtime t 'lazy-lock-fontify-after-defer))))))
+ (run-with-idle-timer dtime t #'lazy-lock-fontify-after-defer))))))
(unless (eq stime (car (cdr lazy-lock-timers)))
(let ((stealth (cdr lazy-lock-timers)))
(when (cdr stealth)
(cancel-timer (cdr stealth)))
(setcdr lazy-lock-timers (cons stime (and stime
- (run-with-idle-timer stime t 'lazy-lock-fontify-after-idle)))))))
+ (run-with-idle-timer stime t #'lazy-lock-fontify-after-idle)))))))
(defun lazy-lock-unstall ()
;;
@@ -640,21 +614,21 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
(save-restriction
(widen)
(lazy-lock-fontify-region (point-min) (point-max))))))
- (add-hook 'after-change-functions 'font-lock-after-change-function nil t))
+ (add-hook 'after-change-functions #'font-lock-after-change-function nil t))
;;
;; Remove the text properties.
(lazy-lock-after-unfontify-buffer)
;;
;; Remove the fontification hooks.
- (remove-hook 'window-scroll-functions 'lazy-lock-fontify-after-scroll t)
- (remove-hook 'window-scroll-functions 'lazy-lock-defer-after-scroll t)
- (remove-hook 'before-change-functions 'lazy-lock-arrange-before-change t)
- (remove-hook 'after-change-functions 'lazy-lock-fontify-line-after-change t)
- (remove-hook 'after-change-functions 'lazy-lock-fontify-rest-after-change t)
- (remove-hook 'after-change-functions 'lazy-lock-defer-line-after-change t)
- (remove-hook 'after-change-functions 'lazy-lock-defer-rest-after-change t)
- (remove-hook 'outline-view-change-hook 'lazy-lock-fontify-after-visage t)
- (remove-hook 'hs-hide-hook 'lazy-lock-fontify-after-visage t))
+ (remove-hook 'window-scroll-functions #'lazy-lock-fontify-after-scroll t)
+ (remove-hook 'window-scroll-functions #'lazy-lock-defer-after-scroll t)
+ (remove-hook 'before-change-functions #'lazy-lock-arrange-before-change t)
+ (remove-hook 'after-change-functions #'lazy-lock-fontify-line-after-change t)
+ (remove-hook 'after-change-functions #'lazy-lock-fontify-rest-after-change t)
+ (remove-hook 'after-change-functions #'lazy-lock-defer-line-after-change t)
+ (remove-hook 'after-change-functions #'lazy-lock-defer-rest-after-change t)
+ (remove-hook 'outline-view-change-hook #'lazy-lock-fontify-after-visage t)
+ (remove-hook 'hs-hide-hook #'lazy-lock-fontify-after-visage t))
;; Hook functions.
@@ -682,7 +656,7 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
;; result in an unnecessary trigger after this if we did not cancel it now.
(set-window-redisplay-end-trigger window nil))
-(defun lazy-lock-defer-after-scroll (window window-start)
+(defun lazy-lock-defer-after-scroll (window _window-start)
;; Called from `window-scroll-functions'.
;; Defer fontification following the scroll. Save the current buffer so that
;; we subsequently fontify in all windows showing the buffer.
@@ -750,7 +724,7 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
(defalias 'lazy-lock-fontify-line-after-change
;; Called from `after-change-functions'.
;; Fontify the current change.
- 'font-lock-after-change-function)
+ #'font-lock-after-change-function)
(defun lazy-lock-fontify-rest-after-change (beg end old-len)
;; Called from `after-change-functions'.
@@ -758,29 +732,29 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
;; buffer. Save the current buffer so that we subsequently fontify in all
;; windows showing the buffer.
(lazy-lock-fontify-line-after-change beg end old-len)
- (save-buffer-state nil
+ (with-silent-modifications
(unless (memq (current-buffer) lazy-lock-buffers)
(push (current-buffer) lazy-lock-buffers))
(save-restriction
(widen)
(remove-text-properties end (point-max) '(lazy-lock nil)))))
-(defun lazy-lock-defer-line-after-change (beg end old-len)
+(defun lazy-lock-defer-line-after-change (beg end _old-len)
;; Called from `after-change-functions'.
;; Defer fontification of the current change. Save the current buffer so
;; that we subsequently fontify in all windows showing the buffer.
- (save-buffer-state nil
+ (with-silent-modifications
(unless (memq (current-buffer) lazy-lock-buffers)
(push (current-buffer) lazy-lock-buffers))
(remove-text-properties (max (1- beg) (point-min))
(min (1+ end) (point-max))
'(lazy-lock nil))))
-(defun lazy-lock-defer-rest-after-change (beg end old-len)
+(defun lazy-lock-defer-rest-after-change (beg _end _old-len)
;; Called from `after-change-functions'.
;; Defer fontification of the rest of the buffer. Save the current buffer so
;; that we subsequently fontify in all windows showing the buffer.
- (save-buffer-state nil
+ (with-silent-modifications
(unless (memq (current-buffer) lazy-lock-buffers)
(push (current-buffer) lazy-lock-buffers))
(save-restriction
@@ -809,10 +783,10 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
(setq lazy-lock-buffers (cdr lazy-lock-buffers)))))
;; Add hook if fontification should now be defer-driven in this buffer.
(when (and lazy-lock-mode lazy-lock-defer-on-scrolling
- (memq 'lazy-lock-fontify-after-scroll window-scroll-functions)
+ (memq #'lazy-lock-fontify-after-scroll window-scroll-functions)
(not (or (input-pending-p) (lazy-lock-unfontified-p))))
- (remove-hook 'window-scroll-functions 'lazy-lock-fontify-after-scroll t)
- (add-hook 'window-scroll-functions 'lazy-lock-defer-after-scroll nil t)))
+ (remove-hook 'window-scroll-functions #'lazy-lock-fontify-after-scroll t)
+ (add-hook 'window-scroll-functions #'lazy-lock-defer-after-scroll nil t)))
(defun lazy-lock-fontify-after-idle ()
;; Called from `timer-idle-list'.
@@ -868,14 +842,14 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
;; Called from `font-lock-after-fontify-buffer'.
;; Mark the current buffer as fontified.
;; This is a conspiracy hack between lazy-lock.el and font-lock.el.
- (save-buffer-state nil
+ (with-silent-modifications
(add-text-properties (point-min) (point-max) '(lazy-lock t))))
(defun lazy-lock-after-unfontify-buffer ()
;; Called from `font-lock-after-unfontify-buffer'.
;; Mark the current buffer as unfontified.
;; This is a conspiracy hack between lazy-lock.el and font-lock.el.
- (save-buffer-state nil
+ (with-silent-modifications
(remove-text-properties (point-min) (point-max) '(lazy-lock nil))))
;; Fontification functions.
@@ -888,27 +862,27 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
(widen)
(when (setq beg (text-property-any beg end 'lazy-lock nil))
(save-excursion
- (save-match-data
- (save-buffer-state
- (next)
- ;; Find successive unfontified regions between BEG and END.
- (condition-case data
- (do-while beg
- (setq next (or (text-property-any beg end 'lazy-lock t) end))
- ;; Make sure the region end points are at beginning of line.
- (goto-char beg)
- (unless (bolp)
- (beginning-of-line)
- (setq beg (point)))
- (goto-char next)
- (unless (bolp)
- (forward-line)
- (setq next (point)))
- ;; Fontify the region, then flag it as fontified.
- (font-lock-fontify-region beg next)
- (add-text-properties beg next '(lazy-lock t))
- (setq beg (text-property-any next end 'lazy-lock nil)))
- ((error quit) (message "Fontifying region...%s" data)))))))))
+ (with-silent-modifications
+ (let ((inhibit-point-motion-hooks t))
+ ;; Find successive unfontified regions between BEG and END.
+ (condition-case data
+ (do-while beg
+ (let ((next (or (text-property-any beg end 'lazy-lock t)
+ end)))
+ ;; Make sure the region end points are at beginning of line.
+ (goto-char beg)
+ (unless (bolp)
+ (beginning-of-line)
+ (setq beg (point)))
+ (goto-char next)
+ (unless (bolp)
+ (forward-line)
+ (setq next (point)))
+ ;; Fontify the region, then flag it as fontified.
+ (font-lock-fontify-region beg next)
+ (add-text-properties beg next '(lazy-lock t))
+ (setq beg (text-property-any next end 'lazy-lock nil))))
+ ((error quit) (message "Fontifying region...%s" data)))))))))
(defun lazy-lock-fontify-chunk ()
;; Fontify the nearest chunk, for stealth, in the current buffer.
@@ -1036,14 +1010,12 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
;; Install ourselves:
-(add-hook 'window-size-change-functions 'lazy-lock-fontify-after-resize)
-(add-hook 'redisplay-end-trigger-functions 'lazy-lock-fontify-after-trigger)
+(add-hook 'window-size-change-functions #'lazy-lock-fontify-after-resize)
+(add-hook 'redisplay-end-trigger-functions #'lazy-lock-fontify-after-trigger)
(unless (assq 'lazy-lock-mode minor-mode-alist)
(setq minor-mode-alist (append minor-mode-alist '((lazy-lock-mode nil)))))
-;; Provide ourselves:
-
(provide 'lazy-lock)
;; Local Variables:
diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el
index f274dfb926d..9bf68456826 100644
--- a/lisp/obsolete/longlines.el
+++ b/lisp/obsolete/longlines.el
@@ -1,4 +1,4 @@
-;;; longlines.el --- automatically wrap long lines -*- coding:utf-8 -*-
+;;; longlines.el --- automatically wrap long lines -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2001, 2004-2021 Free Software Foundation, Inc.
@@ -48,7 +48,6 @@
Otherwise, you can perform filling using `fill-paragraph' or
`auto-fill-mode'. In any case, the soft newlines will be removed
when the file is saved to disk."
- :group 'longlines
:type 'boolean)
(defcustom longlines-wrap-follows-window-size nil
@@ -60,7 +59,6 @@ with differing widths.
If the value is an integer, that specifies the distance from the
right edge of the window at which wrapping occurs. For any other
non-nil value, wrapping occurs 2 characters from the right edge."
- :group 'longlines
:type 'boolean)
(defcustom longlines-show-hard-newlines nil
@@ -68,13 +66,11 @@ non-nil value, wrapping occurs 2 characters from the right edge."
\(The variable `longlines-show-effect' controls what they look like.)
You can also enable the display temporarily, using the command
`longlines-show-hard-newlines'."
- :group 'longlines
:type 'boolean)
(defcustom longlines-show-effect (propertize "¶\n" 'face 'escape-glyph)
"A string to display when showing hard newlines.
This is used when `longlines-show-hard-newlines' is on."
- :group 'longlines
:type 'string)
;;; Internal variables
@@ -110,23 +106,23 @@ always call `fill-paragraph' to fill individual paragraphs.
If the variable `longlines-show-hard-newlines' is non-nil, hard
newlines are indicated with a symbol."
- :group 'longlines :lighter " ll"
+ :lighter " ll"
(if longlines-mode
;; Turn on longlines mode
(progn
(use-hard-newlines 1 'never)
(set (make-local-variable 'require-final-newline) nil)
(add-to-list 'buffer-file-format 'longlines)
- (add-hook 'change-major-mode-hook 'longlines-mode-off nil t)
- (add-hook 'before-revert-hook 'longlines-before-revert-hook nil t)
+ (add-hook 'change-major-mode-hook #'longlines-mode-off nil t)
+ (add-hook 'before-revert-hook #'longlines-before-revert-hook nil t)
(make-local-variable 'buffer-substring-filters)
(make-local-variable 'longlines-auto-wrap)
(set (make-local-variable 'isearch-search-fun-function)
- 'longlines-search-function)
+ #'longlines-search-function)
(set (make-local-variable 'replace-search-function)
- 'longlines-search-forward)
+ #'longlines-search-forward)
(set (make-local-variable 'replace-re-search-function)
- 'longlines-re-search-forward)
+ #'longlines-re-search-forward)
(add-to-list 'buffer-substring-filters 'longlines-encode-string)
(when longlines-wrap-follows-window-size
(let ((dw (if (and (integerp longlines-wrap-follows-window-size)
@@ -138,7 +134,7 @@ newlines are indicated with a symbol."
(set (make-local-variable 'fill-column)
(- (window-width) dw)))
(add-hook 'window-configuration-change-hook
- 'longlines-window-change-function nil t))
+ #'longlines-window-change-function nil t))
(let ((buffer-undo-list t)
(inhibit-read-only t)
(inhibit-modification-hooks t)
@@ -160,21 +156,22 @@ newlines are indicated with a symbol."
;; Hacks to make longlines play nice with various modes.
(cond ((eq major-mode 'mail-mode)
- (add-hook 'mail-setup-hook 'longlines-decode-buffer nil t)
+ (declare-function mail-indent-citation "sendmail" ())
+ (add-hook 'mail-setup-hook #'longlines-decode-buffer nil t)
(or mail-citation-hook
- (add-hook 'mail-citation-hook 'mail-indent-citation nil t))
- (add-hook 'mail-citation-hook 'longlines-decode-region nil t))
+ (add-hook 'mail-citation-hook #'mail-indent-citation nil t))
+ (add-hook 'mail-citation-hook #'longlines-decode-region nil t))
((eq major-mode 'message-mode)
- (add-hook 'message-setup-hook 'longlines-decode-buffer nil t)
+ (add-hook 'message-setup-hook #'longlines-decode-buffer nil t)
(make-local-variable 'message-indent-citation-function)
(if (not (listp message-indent-citation-function))
(setq message-indent-citation-function
(list message-indent-citation-function)))
- (add-to-list 'message-indent-citation-function
- 'longlines-decode-region t)))
+ (add-hook 'message-indent-citation-function
+ #'longlines-decode-region t t)))
- (add-hook 'after-change-functions 'longlines-after-change-function nil t)
- (add-hook 'post-command-hook 'longlines-post-command-function nil t)
+ (add-hook 'after-change-functions #'longlines-after-change-function nil t)
+ (add-hook 'post-command-hook #'longlines-post-command-function nil t)
(when longlines-auto-wrap
(auto-fill-mode 0)))
;; Turn off longlines mode
@@ -190,12 +187,12 @@ newlines are indicated with a symbol."
(widen)
(longlines-encode-region (point-min) (point-max))
(setq longlines-decoded nil))))
- (remove-hook 'change-major-mode-hook 'longlines-mode-off t)
- (remove-hook 'after-change-functions 'longlines-after-change-function t)
- (remove-hook 'post-command-hook 'longlines-post-command-function t)
- (remove-hook 'before-revert-hook 'longlines-before-revert-hook t)
+ (remove-hook 'change-major-mode-hook #'longlines-mode-off t)
+ (remove-hook 'after-change-functions #'longlines-after-change-function t)
+ (remove-hook 'post-command-hook #'longlines-post-command-function t)
+ (remove-hook 'before-revert-hook #'longlines-before-revert-hook t)
(remove-hook 'window-configuration-change-hook
- 'longlines-window-change-function t)
+ #'longlines-window-change-function t)
(when longlines-wrap-follows-window-size
(kill-local-variable 'fill-column))
(kill-local-variable 'isearch-search-fun-function)
@@ -396,11 +393,11 @@ compatibility with `format-alist', and is ignored."
"Return a copy of STRING with each soft newline replaced by a space.
Hard newlines are left intact."
(let* ((str (copy-sequence string))
- (pos (string-match "\n" str)))
+ (pos (string-search "\n" str)))
(while pos
(if (null (get-text-property pos 'hard str))
(aset str pos ? ))
- (setq pos (string-match "\n" str (1+ pos))))
+ (setq pos (string-search "\n" str (1+ pos))))
str))
;;; Auto wrap
@@ -482,17 +479,17 @@ This is called by `window-configuration-change-hook'."
;;; Loading and saving
(defun longlines-before-revert-hook ()
- (add-hook 'after-revert-hook 'longlines-after-revert-hook nil t)
+ (add-hook 'after-revert-hook #'longlines-after-revert-hook nil t)
(longlines-mode 0))
(defun longlines-after-revert-hook ()
- (remove-hook 'after-revert-hook 'longlines-after-revert-hook t)
+ (remove-hook 'after-revert-hook #'longlines-after-revert-hook t)
(longlines-mode 1))
(add-to-list
'format-alist
(list 'longlines "Automatically wrap long lines." nil nil
- 'longlines-encode-region t nil))
+ #'longlines-encode-region t nil))
;;; Unloading
diff --git a/lisp/obsolete/mailpost.el b/lisp/obsolete/mailpost.el
index 2f74faf1d6c..5b3a76e2f79 100644
--- a/lisp/obsolete/mailpost.el
+++ b/lisp/obsolete/mailpost.el
@@ -1,4 +1,4 @@
-;;; mailpost.el --- RMAIL coupler to /usr/uci/post mailer
+;;; mailpost.el --- RMAIL coupler to /usr/uci/post mailer -*- lexical-binding: t; -*-
;; This is in the public domain
;; since Delp distributed it in 1986 without a copyright notice.
@@ -76,7 +76,7 @@ site-init."
(with-current-buffer errbuf
(erase-buffer))))
(with-file-modes 384 (setq temfile (make-temp-file ",rpost")))
- (apply 'call-process
+ (apply #'call-process
(append (list (if (boundp 'post-mail-program)
post-mail-program
"/usr/uci/lib/mh/post")
diff --git a/lisp/obsolete/mantemp.el b/lisp/obsolete/mantemp.el
index 287a5a732ca..97e70f29841 100644
--- a/lisp/obsolete/mantemp.el
+++ b/lisp/obsolete/mantemp.el
@@ -1,4 +1,4 @@
-;;; mantemp.el --- create manual template instantiations from g++ 2.7.2 output
+;;; mantemp.el --- create manual template instantiations from g++ 2.7.2 output -*- lexical-binding: t; -*-
;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
diff --git a/lisp/obsolete/meese.el b/lisp/obsolete/meese.el
index 81739dfa6cb..7443bacc8b2 100644
--- a/lisp/obsolete/meese.el
+++ b/lisp/obsolete/meese.el
@@ -1,4 +1,4 @@
-;;; meese.el --- protect the impressionable young minds of America
+;;; meese.el --- protect the impressionable young minds of America -*- lexical-binding: t; -*-
;; This is in the public domain on account of being distributed since
;; 1985 or 1986 without a copyright notice.
diff --git a/lisp/obsolete/messcompat.el b/lisp/obsolete/messcompat.el
index fa73dc7a0fd..be252395e45 100644
--- a/lisp/obsolete/messcompat.el
+++ b/lisp/obsolete/messcompat.el
@@ -1,4 +1,4 @@
-;;; messcompat.el --- making message mode compatible with mail mode
+;;; messcompat.el --- making message mode compatible with mail mode -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
diff --git a/lisp/obsolete/metamail.el b/lisp/obsolete/metamail.el
index ef97e8aa55c..72237239ddb 100644
--- a/lisp/obsolete/metamail.el
+++ b/lisp/obsolete/metamail.el
@@ -1,4 +1,4 @@
-;;; metamail.el --- Metamail interface for GNU Emacs
+;;; metamail.el --- Metamail interface for GNU Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1993, 1996, 2001-2021 Free Software Foundation, Inc.
@@ -44,13 +44,11 @@
(defcustom metamail-program-name "metamail"
"Metamail program name."
- :type 'string
- :group 'metamail)
+ :type 'string)
(defcustom metamail-mailer-name "emacs"
"Mailer name set to MM_MAILER environment variable."
- :type 'string
- :group 'metamail)
+ :type 'string)
(defvar metamail-environment '("KEYHEADS=*" "MM_QUIET=1")
"Environment variables passed to `metamail'.
@@ -65,8 +63,7 @@ It is not expected to be altered globally by `set' or `setq'.
Instead, change its value temporary using `let' or `let*' form.
`-m MAILER' argument is automatically generated from the
`metamail-mailer-name' variable."
- :type '(repeat (string :tag "Switch"))
- :group 'metamail)
+ :type '(repeat (string :tag "Switch")))
;;;###autoload
(defun metamail-interpret-header ()
@@ -193,7 +190,7 @@ redisplayed as output is inserted."
(list "-m" (or metamail-mailer-name "emacs"))
(list metafile))))
;; `metamail' may not delete the temporary file!
- (condition-case error
+ (condition-case nil
(delete-file metafile)
(error nil))
)))
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,
diff --git a/lisp/obsolete/nnir.el b/lisp/obsolete/nnir.el
index 147efed0057..9aab1e7c9f5 100644
--- a/lisp/obsolete/nnir.el
+++ b/lisp/obsolete/nnir.el
@@ -228,8 +228,7 @@ with three items unique to nnir summary buffers:
If nil this will use `gnus-summary-line-format'."
:version "24.1"
- :type '(choice (const :tag "gnus-summary-line-format" nil) string)
- :group 'nnir)
+ :type '(choice (const :tag "gnus-summary-line-format" nil) string))
(defcustom nnir-ignored-newsgroups ""
@@ -237,8 +236,7 @@ If nil this will use `gnus-summary-line-format'."
Any newsgroup in the active file matching this regexp will be
skipped when searching."
:version "24.1"
- :type '(regexp)
- :group 'nnir)
+ :type '(regexp))
(defcustom nnir-imap-default-search-key "whole message"
"The default IMAP search key for an nnir search.
@@ -246,19 +244,16 @@ Must be one of the keys in `nnir-imap-search-arguments'. To use
raw imap queries by default set this to \"imap\"."
:version "24.1"
:type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
- nnir-imap-search-arguments))
- :group 'nnir)
+ nnir-imap-search-arguments)))
(defcustom nnir-swish++-configuration-file
(expand-file-name "~/Mail/swish++.conf")
"Configuration file for swish++."
- :type '(file)
- :group 'nnir)
+ :type '(file))
(defcustom nnir-swish++-program "search"
"Name of swish++ search executable."
- :type '(string)
- :group 'nnir)
+ :type '(string))
(defcustom nnir-swish++-additional-switches '()
"A list of strings, to be given as additional arguments to swish++.
@@ -267,8 +262,7 @@ Note that this should be a list. I.e., do NOT use the following:
(setq nnir-swish++-additional-switches \"-i -w\") ; wrong
Instead, use this:
(setq nnir-swish++-additional-switches \\='(\"-i\" \"-w\"))"
- :type '(repeat (string))
- :group 'nnir)
+ :type '(repeat (string)))
(defcustom nnir-swish++-remove-prefix (concat (getenv "HOME") "/Mail/")
"The prefix to remove from swish++ file names to get group names.
@@ -277,37 +271,23 @@ expression.
This variable is very similar to `nnir-namazu-remove-prefix', except
that it is for swish++, not Namazu."
- :type '(regexp)
- :group 'nnir)
+ :type '(regexp))
;; Swish-E.
-;; URL: http://swish-e.org/
-;; Variables `nnir-swish-e-index-file', `nnir-swish-e-program' and
+;; URL: http://swish-e.org/ [dead link?]
+;; Variables `nnir-swish-e-index-files', `nnir-swish-e-program' and
;; `nnir-swish-e-additional-switches'
-(make-obsolete-variable 'nnir-swish-e-index-file
- 'nnir-swish-e-index-files "Emacs 23.1")
-(defcustom nnir-swish-e-index-file
- (expand-file-name "~/Mail/index.swish-e")
- "Index file for swish-e.
-This could be a server parameter.
-It is never consulted once `nnir-swish-e-index-files', which should be
-used instead, has been customized."
- :type '(file)
- :group 'nnir)
-
(defcustom nnir-swish-e-index-files
- (list nnir-swish-e-index-file)
+ (list (expand-file-name "~/Mail/index.swish-e"))
"List of index files for swish-e.
This could be a server parameter."
- :type '(repeat (file))
- :group 'nnir)
+ :type '(repeat (file)))
(defcustom nnir-swish-e-program "swish-e"
"Name of swish-e search executable.
This cannot be a server parameter."
- :type '(string)
- :group 'nnir)
+ :type '(string))
(defcustom nnir-swish-e-additional-switches '()
"A list of strings, to be given as additional arguments to swish-e.
@@ -318,8 +298,7 @@ Instead, use this:
(setq nnir-swish-e-additional-switches \\='(\"-i\" \"-w\"))
This could be a server parameter."
- :type '(repeat (string))
- :group 'nnir)
+ :type '(repeat (string)))
(defcustom nnir-swish-e-remove-prefix (concat (getenv "HOME") "/Mail/")
"The prefix to remove from swish-e file names to get group names.
@@ -330,15 +309,13 @@ This variable is very similar to `nnir-namazu-remove-prefix', except
that it is for swish-e, not Namazu.
This could be a server parameter."
- :type '(regexp)
- :group 'nnir)
+ :type '(regexp))
-;; HyREX engine, see <URL:http://ls6-www.cs.uni-dortmund.de/>
+;; HyREX engine, see <URL:http://ls6-www.cs.uni-dortmund.de/> [dead link?]
(defcustom nnir-hyrex-program "nnir-search"
"Name of the nnir-search executable."
- :type '(string)
- :group 'nnir)
+ :type '(string))
(defcustom nnir-hyrex-additional-switches '()
"A list of strings, to be given as additional arguments for nnir-search.
@@ -346,13 +323,11 @@ Note that this should be a list. I.e., do NOT use the following:
(setq nnir-hyrex-additional-switches \"-ddl ddl.xml -c nnir\") ; wrong !
Instead, use this:
(setq nnir-hyrex-additional-switches \\='(\"-ddl\" \"ddl.xml\" \"-c\" \"nnir\"))"
- :type '(repeat (string))
- :group 'nnir)
+ :type '(repeat (string)))
(defcustom nnir-hyrex-index-directory (getenv "HOME")
"Index directory for HyREX."
- :type '(directory)
- :group 'nnir)
+ :type '(directory))
(defcustom nnir-hyrex-remove-prefix (concat (getenv "HOME") "/Mail/")
"The prefix to remove from HyREX file names to get group names.
@@ -364,20 +339,17 @@ setting: (setq nnir-hyrex-remove-prefix \"/home/john/Mail/\")
Note the trailing slash. Removing this prefix gives \"mail/misc/42\".
`nnir' knows to remove the \"/42\" and to replace \"/\" with \".\" to
arrive at the correct group name, \"mail.misc\"."
- :type '(directory)
- :group 'nnir)
+ :type '(directory))
;; Namazu engine, see <URL:http://www.namazu.org/>
(defcustom nnir-namazu-program "namazu"
"Name of Namazu search executable."
- :type '(string)
- :group 'nnir)
+ :type '(string))
(defcustom nnir-namazu-index-directory (expand-file-name "~/Mail/namazu/")
"Index directory for Namazu."
- :type '(directory)
- :group 'nnir)
+ :type '(directory))
(defcustom nnir-namazu-additional-switches '()
"A list of strings, to be given as additional arguments to namazu.
@@ -388,8 +360,7 @@ Note that this should be a list. I.e., do NOT use the following:
(setq nnir-namazu-additional-switches \"-i -w\") ; wrong
Instead, use this:
(setq nnir-namazu-additional-switches \\='(\"-i\" \"-w\"))"
- :type '(repeat (string))
- :group 'nnir)
+ :type '(repeat (string)))
(defcustom nnir-namazu-remove-prefix (concat (getenv "HOME") "/Mail/")
"The prefix to remove from Namazu file names to get group names.
@@ -401,14 +372,12 @@ setting: (setq nnir-namazu-remove-prefix \"/home/john/Mail/\")
Note the trailing slash. Removing this prefix gives \"mail/misc/42\".
`nnir' knows to remove the \"/42\" and to replace \"/\" with \".\" to
arrive at the correct group name, \"mail.misc\"."
- :type '(directory)
- :group 'nnir)
+ :type '(directory))
(defcustom nnir-notmuch-program "notmuch"
"Name of notmuch search executable."
:version "24.1"
- :type '(string)
- :group 'nnir)
+ :type '(string))
(defcustom nnir-notmuch-additional-switches '()
"A list of strings, to be given as additional arguments to notmuch.
@@ -418,8 +387,7 @@ Note that this should be a list. I.e., do NOT use the following:
Instead, use this:
(setq nnir-notmuch-additional-switches \\='(\"-i\" \"-w\"))"
:version "24.1"
- :type '(repeat (string))
- :group 'nnir)
+ :type '(repeat (string)))
(defcustom nnir-notmuch-remove-prefix
(regexp-quote (or (getenv "MAILDIR") (expand-file-name "~/Mail")))
@@ -430,8 +398,7 @@ expression.
This variable is very similar to `nnir-namazu-remove-prefix', except
that it is for notmuch, not Namazu."
:version "27.1"
- :type '(regexp)
- :group 'nnir)
+ :type '(regexp))
(defcustom nnir-notmuch-filter-group-names-function nil
"Whether and how to use Gnus group names as \"path:\" search terms.
@@ -457,7 +424,7 @@ like so:
`((imap nnir-run-imap
((criteria
"Imap Search in" ; Prompt
- ,(mapcar 'car nnir-imap-search-arguments) ; alist for completing
+ ,(mapcar #'car nnir-imap-search-arguments) ; alist for completing
nil ; allow any user input
nil ; initial value
nnir-imap-search-argument-history ; the history to use
@@ -495,7 +462,6 @@ Add an entry here when adding a new search engine.")
(defcustom nnir-method-default-engines '((nnimap . imap))
"Alist of default search engines keyed by server method."
:version "27.1"
- :group 'nnir
:type `(repeat (cons (choice (const nnimap) (const nntp) (const nnspool)
(const nneething) (const nndir) (const nnmbox)
(const nnml) (const nnmh) (const nndraft)
@@ -543,7 +509,7 @@ construct the vector entries."
(vector (gnus-group-full-name group server)
(if (string-match "\\`nnmaildir:" (gnus-group-server server))
(nnmaildir-base-name-to-article-number
- (substring article 0 (string-match ":" article))
+ (substring article 0 (string-search ":" article))
group nil)
(string-to-number article))
(string-to-number score)))))
@@ -573,7 +539,7 @@ extensions."
(or groups (gnus-server-get-active srv nnir-ignored-newsgroups))))
(message "Opening server %s" server)
(apply
- 'vconcat
+ #'vconcat
(catch 'found
(mapcar
#'(lambda (group)
@@ -954,10 +920,10 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
;; eliminate all ".", "/", "\" from beginning. Always matches.
(string-match "^[./\\]*\\(.*\\)$" dirnam)
;; "/" -> "."
- (setq group (replace-regexp-in-string
+ (setq group (string-replace
"/" "." (match-string 1 dirnam)))
;; Windows "\\" -> "."
- (setq group (replace-regexp-in-string "\\\\" "." group))
+ (setq group (string-replace "\\" "." group))
(push (vector (gnus-group-full-name group server)
(string-to-number artno)
@@ -1030,7 +996,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
(when (string-match prefix dirnam)
(setq dirnam (replace-match "" t t dirnam)))
(push (vector (gnus-group-full-name
- (replace-regexp-in-string "/" "." dirnam) server)
+ (string-replace "/" "." dirnam) server)
(string-to-number artno)
(string-to-number score))
artlist))
@@ -1214,7 +1180,7 @@ construct path: search terms (see the variable
(error "No directory found in method specification of server %s"
server))
(apply
- 'vconcat
+ #'vconcat
(mapcar (lambda (x)
(let ((group x)
artlist)
@@ -1239,15 +1205,15 @@ construct path: search terms (see the variable
group
(if (file-directory-p
(setq group
- (replace-regexp-in-string
- "\\." "/"
- group nil t)))
+ (string-replace
+ "." "/"
+ group)))
group))))))
(unless group
(error "Cannot locate directory for group"))
(save-excursion
(apply
- 'call-process "find" nil t
+ #'call-process "find" nil t
"find" group "-maxdepth" "1" "-type" "f"
"-name" "[0-9]*" "-exec"
"grep"
@@ -1260,7 +1226,8 @@ construct path: search terms (see the variable
(let* ((path (split-string
(buffer-substring
(point)
- (line-end-position)) "/" t))
+ (line-end-position))
+ "/" t))
(art (string-to-number (car (last path)))))
(while (string= "." (car path))
(setq path (cdr path)))
@@ -1359,7 +1326,7 @@ Query for the specs, or use SPECS."
(query-spec
(or (cdr (assq 'nnir-query-spec specs))
(apply
- 'append
+ #'append
(list (cons 'query
(read-string "Query: " nil 'nnir-search-history)))
(when nnir-extra-parms
@@ -1370,9 +1337,8 @@ Query for the specs, or use SPECS."
(list (cons 'nnir-query-spec query-spec)
(cons 'nnir-group-spec group-spec))))
-(define-obsolete-function-alias 'nnir-get-active 'gnus-server-get-active "28.1")
+(define-obsolete-function-alias 'nnir-get-active #'gnus-server-get-active "28.1")
-;; The end.
(provide 'nnir)
;;; nnir.el ends here
diff --git a/lisp/obsolete/old-emacs-lock.el b/lisp/obsolete/old-emacs-lock.el
index 07bccd90711..ce4c60e6a17 100644
--- a/lisp/obsolete/old-emacs-lock.el
+++ b/lisp/obsolete/old-emacs-lock.el
@@ -1,4 +1,4 @@
-;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked
+;;; old-emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -*- lexical-binding: t; -*-
;; Copyright (C) 1994, 1997, 2001-2021 Free Software Foundation, Inc.
@@ -90,13 +90,13 @@ If the buffer is locked, signal error and display its name."
(setq emacs-lock-from-exiting t)))
(unless noninteractive
- (add-hook 'kill-emacs-hook 'check-emacs-lock))
-(add-hook 'kill-buffer-hook 'emacs-lock-check-buffer-lock)
-(add-hook 'shell-mode-hook 'emacs-lock-was-buffer-locked)
-(add-hook 'shell-mode-hook 'emacs-lock-shell-sentinel)
-(add-hook 'telnet-mode-hook 'emacs-lock-was-buffer-locked)
-(add-hook 'telnet-mode-hook 'emacs-lock-shell-sentinel)
+ (add-hook 'kill-emacs-hook #'check-emacs-lock))
+(add-hook 'kill-buffer-hook #'emacs-lock-check-buffer-lock)
+(add-hook 'shell-mode-hook #'emacs-lock-was-buffer-locked)
+(add-hook 'shell-mode-hook #'emacs-lock-shell-sentinel)
+(add-hook 'telnet-mode-hook #'emacs-lock-was-buffer-locked)
+(add-hook 'telnet-mode-hook #'emacs-lock-shell-sentinel)
(provide 'emacs-lock)
-;;; emacs-lock.el ends here
+;;; old-emacs-lock.el ends here
diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el
index 58c385adad4..47f5089452f 100644
--- a/lisp/obsolete/otodo-mode.el
+++ b/lisp/obsolete/otodo-mode.el
@@ -1,4 +1,4 @@
-;;; todo-mode.el --- major mode for editing TODO list files
+;;; otodo-mode.el --- major mode for editing TODO list files -*- lexical-binding: t; -*-
;; Copyright (C) 1997, 1999, 2001-2021 Free Software Foundation, Inc.
@@ -280,26 +280,21 @@ every day and it may also be marked on every day of the calendar.
Using \"&%%(equal (calendar-current-date) date)\" instead will only
show and mark todo entries for today, but may slow down processing of
the diary file somewhat."
- :type 'string
- :group 'todo)
+ :type 'string)
(defcustom todo-file-do (locate-user-emacs-file "todo-do" ".todo-do")
"TODO mode list file."
:version "24.4" ; added locate-user-emacs-file
- :type 'file
- :group 'todo)
+ :type 'file)
(defcustom todo-file-done (locate-user-emacs-file "todo-done" ".todo-done")
"TODO mode archive file."
:version "24.4" ; added locate-user-emacs-file
- :type 'file
- :group 'todo)
+ :type 'file)
(defcustom todo-mode-hook nil
"TODO mode hooks."
- :type 'hook
- :group 'todo)
+ :type 'hook)
(defcustom todo-edit-mode-hook nil
"TODO Edit mode hooks."
- :type 'hook
- :group 'todo)
+ :type 'hook)
(defcustom todo-insert-threshold 0
"TODO mode insertion accuracy.
@@ -314,8 +309,7 @@ your item just before that point. If you set the threshold to,
e.g. 8, it will stop as soon as the window size drops below that
amount and will insert the item in the approximate center of that
window."
- :type 'integer
- :group 'todo)
+ :type 'integer)
(defvar todo-edit-buffer " *TODO Edit*"
"TODO Edit buffer name.")
(defcustom todo-file-top (locate-user-emacs-file "todo-top" ".todo-top")
@@ -324,32 +318,26 @@ window."
Not in TODO format, but diary compatible.
Automatically generated when `todo-save-top-priorities' is non-nil."
:version "24.4" ; added locate-user-emacs-file
- :type 'string
- :group 'todo)
+ :type 'string)
(defcustom todo-print-function 'ps-print-buffer-with-faces
"Function to print the current buffer."
- :type 'symbol
- :group 'todo)
+ :type 'symbol)
(defcustom todo-show-priorities 1
"Default number of priorities to show by \\[todo-top-priorities].
0 means show all entries."
- :type 'integer
- :group 'todo)
+ :type 'integer)
(defcustom todo-print-priorities 0
"Default number of priorities to print by \\[todo-print].
0 means print all entries."
- :type 'integer
- :group 'todo)
+ :type 'integer)
(defcustom todo-remove-separator t
"Non-nil to remove category separators in\
\\[todo-top-priorities] and \\[todo-print]."
- :type 'boolean
- :group 'todo)
+ :type 'boolean)
(defcustom todo-save-top-priorities-too t
"Non-nil makes `todo-save' automatically save top-priorities in `todo-file-top'."
- :type 'boolean
- :group 'todo)
+ :type 'boolean)
;; Thanks for the ISO time stamp format go to Karl Eichwalder <ke@suse.de>
;; My format string for the appt.el package is "%3b %2d, %y, %02I:%02M%p".
@@ -358,17 +346,14 @@ Automatically generated when `todo-save-top-priorities' is non-nil."
"%:y-%02m-%02d %02H:%02M"
"TODO mode time string format for done entries.
For details see the variable `time-stamp-format'."
- :type 'string
- :group 'todo)
+ :type 'string)
(defcustom todo-entry-prefix-function 'todo-entry-timestamp-initials
"Function producing text to insert at start of todo entry."
- :type 'symbol
- :group 'todo)
+ :type 'symbol)
(defcustom todo-initials (or (getenv "INITIALS") (user-login-name))
"Initials of todo item author."
- :type 'string
- :group 'todo)
+ :type 'string)
(defun todo-entry-timestamp-initials ()
"Prepend timestamp and your initials to the head of a TODO entry."
@@ -395,25 +380,25 @@ Use `todo-categories' instead.")
(defvar todo-mode-map
(let ((map (make-keymap)))
(suppress-keymap map t)
- (define-key map "+" 'todo-forward-category)
- (define-key map "-" 'todo-backward-category)
- (define-key map "d" 'todo-file-item) ;done/delete
- (define-key map "e" 'todo-edit-item)
- (define-key map "E" 'todo-edit-multiline)
- (define-key map "f" 'todo-file-item)
- (define-key map "i" 'todo-insert-item)
- (define-key map "I" 'todo-insert-item-here)
- (define-key map "j" 'todo-jump-to-category)
- (define-key map "k" 'todo-delete-item)
- (define-key map "l" 'todo-lower-item)
- (define-key map "n" 'todo-forward-item)
- (define-key map "p" 'todo-backward-item)
- (define-key map "P" 'todo-print)
- (define-key map "q" 'todo-quit)
- (define-key map "r" 'todo-raise-item)
- (define-key map "s" 'todo-save)
- (define-key map "S" 'todo-save-top-priorities)
- (define-key map "t" 'todo-top-priorities)
+ (define-key map "+" #'todo-forward-category)
+ (define-key map "-" #'todo-backward-category)
+ (define-key map "d" #'todo-file-item) ;done/delete
+ (define-key map "e" #'todo-edit-item)
+ (define-key map "E" #'todo-edit-multiline)
+ (define-key map "f" #'todo-file-item)
+ (define-key map "i" #'todo-insert-item)
+ (define-key map "I" #'todo-insert-item-here)
+ (define-key map "j" #'todo-jump-to-category)
+ (define-key map "k" #'todo-delete-item)
+ (define-key map "l" #'todo-lower-item)
+ (define-key map "n" #'todo-forward-item)
+ (define-key map "p" #'todo-backward-item)
+ (define-key map "P" #'todo-print)
+ (define-key map "q" #'todo-quit)
+ (define-key map "r" #'todo-raise-item)
+ (define-key map "s" #'todo-save)
+ (define-key map "S" #'todo-save-top-priorities)
+ (define-key map "t" #'todo-top-priorities)
map)
"TODO mode keymap.")
@@ -451,7 +436,7 @@ Use `todo-categories' instead.")
(search-forward-regexp (concat "^" todo-category-end))
(narrow-to-region begin (line-beginning-position))
(goto-char (point-min)))))
-(defalias 'todo-cat-slct 'todo-category-select)
+(defalias 'todo-cat-slct #'todo-category-select)
(defun todo-forward-category ()
"Go forward to TODO list of next category."
@@ -459,7 +444,7 @@ Use `todo-categories' instead.")
(setq todo-category-number
(mod (1+ todo-category-number) (length todo-categories)))
(todo-category-select))
-(defalias 'todo-cmd-forw 'todo-forward-category)
+(defalias 'todo-cmd-forw #'todo-forward-category)
(defun todo-backward-category ()
"Go back to TODO list of previous category."
@@ -467,14 +452,14 @@ Use `todo-categories' instead.")
(setq todo-category-number
(mod (1- todo-category-number) (length todo-categories)))
(todo-category-select))
-(defalias 'todo-cmd-back 'todo-backward-category)
+(defalias 'todo-cmd-back #'todo-backward-category)
(defun todo-backward-item ()
"Select previous entry of TODO list."
(interactive)
(search-backward-regexp (concat "^" (regexp-quote todo-prefix)) nil t)
(message ""))
-(defalias 'todo-cmd-prev 'todo-backward-item)
+(defalias 'todo-cmd-prev #'todo-backward-item)
(defun todo-forward-item (&optional count)
"Select COUNT-th next entry of TODO list."
@@ -485,7 +470,7 @@ Use `todo-categories' instead.")
nil 'goto-end count)
(beginning-of-line)
(message ""))
-(defalias 'todo-cmd-next 'todo-forward-item)
+(defalias 'todo-cmd-next #'todo-forward-item)
(defun todo-save ()
"Save the TODO list."
@@ -494,7 +479,7 @@ Use `todo-categories' instead.")
(save-restriction
(save-buffer)))
(if todo-save-top-priorities-too (todo-save-top-priorities)))
-(defalias 'todo-cmd-save 'todo-save)
+(defalias 'todo-cmd-save #'todo-save)
(defun todo-quit ()
"Done with TODO list for now."
@@ -503,7 +488,7 @@ Use `todo-categories' instead.")
(todo-save)
(message "")
(bury-buffer))
-(defalias 'todo-cmd-done 'todo-quit)
+(defalias 'todo-cmd-done #'todo-quit)
(defun todo-edit-item ()
"Edit current TODO list entry."
@@ -518,7 +503,7 @@ Use `todo-categories' instead.")
(todo-backward-item)
(message ""))))
(error "No TODO list entry to edit")))
-(defalias 'todo-cmd-edit 'todo-edit-item)
+(defalias 'todo-cmd-edit #'todo-edit-item)
(defun todo-edit-multiline ()
"Set up a buffer for editing a multiline TODO list entry."
@@ -622,7 +607,7 @@ category."
(category (if arg (todo-completing-read) current-category)))
(todo-add-item-non-interactively new-item category))))
-(defalias 'todo-cmd-inst 'todo-insert-item)
+(defalias 'todo-cmd-inst #'todo-insert-item)
(defun todo-insert-item-here ()
"Insert a new TODO list entry directly above the entry at point.
@@ -650,7 +635,7 @@ If point is on an empty line, insert the entry there."
(setq todo-previous-answer
(y-or-n-p (format-message "More important than `%s'? " item)))))
todo-previous-answer)
-(defalias 'todo-ask-p 'todo-more-important-p)
+(defalias 'todo-ask-p #'todo-more-important-p)
(defun todo-delete-item ()
"Delete current TODO list entry."
@@ -664,7 +649,7 @@ If point is on an empty line, insert the entry there."
(todo-backward-item))
(message ""))
(error "No TODO list entry to delete")))
-(defalias 'todo-cmd-kill 'todo-delete-item)
+(defalias 'todo-cmd-kill #'todo-delete-item)
(defun todo-raise-item ()
"Raise priority of current entry."
@@ -677,7 +662,7 @@ If point is on an empty line, insert the entry there."
(insert item "\n"))
(message ""))
(error "No TODO list entry to raise")))
-(defalias 'todo-cmd-rais 'todo-raise-item)
+(defalias 'todo-cmd-rais #'todo-raise-item)
(defun todo-lower-item ()
"Lower priority of current entry."
@@ -691,7 +676,7 @@ If point is on an empty line, insert the entry there."
(insert item "\n"))
(message ""))
(error "No TODO list entry to lower")))
-(defalias 'todo-cmd-lowr 'todo-lower-item)
+(defalias 'todo-cmd-lowr #'todo-lower-item)
(defun todo-file-item (&optional comment)
"File the current TODO list entry away, annotated with an optional COMMENT."
@@ -978,4 +963,4 @@ If INCLUDE-SEP is non-nil, return point after the separator."
(provide 'todo-mode)
-;;; todo-mode.el ends here
+;;; otodo-mode.el ends here
diff --git a/lisp/obsolete/patcomp.el b/lisp/obsolete/patcomp.el
index 8545f0721fa..2c35cb07007 100644
--- a/lisp/obsolete/patcomp.el
+++ b/lisp/obsolete/patcomp.el
@@ -1,4 +1,4 @@
-;;; patcomp.el --- used by patch files to update Emacs releases
+;;; patcomp.el --- used by patch files to update Emacs releases -*- lexical-binding: t; -*-
;; This file is part of GNU Emacs.
diff --git a/lisp/obsolete/pc-mode.el b/lisp/obsolete/pc-mode.el
index d4c90c2b298..cf0bc28b110 100644
--- a/lisp/obsolete/pc-mode.el
+++ b/lisp/obsolete/pc-mode.el
@@ -1,4 +1,4 @@
-;;; pc-mode.el --- emulate certain key bindings used on PCs
+;;; pc-mode.el --- emulate certain key bindings used on PCs -*- lexical-binding: t; -*-
;; Copyright (C) 1995, 2001-2021 Free Software Foundation, Inc.
@@ -40,16 +40,16 @@ C-Escape does list-buffers."
(define-key function-key-map [delete] "\C-d")
(define-key function-key-map [M-delete] [?\M-d])
(define-key function-key-map [C-delete] [?\M-d])
- (global-set-key [C-M-delete] 'kill-sexp)
- (global-set-key [C-backspace] 'backward-kill-word)
- (global-set-key [M-backspace] 'undo)
+ (global-set-key [C-M-delete] #'kill-sexp)
+ (global-set-key [C-backspace] #'backward-kill-word)
+ (global-set-key [M-backspace] #'undo)
- (global-set-key [C-escape] 'list-buffers)
+ (global-set-key [C-escape] #'list-buffers)
- (global-set-key [home] 'beginning-of-line)
- (global-set-key [end] 'end-of-line)
- (global-set-key [C-home] 'beginning-of-buffer)
- (global-set-key [C-end] 'end-of-buffer))
+ (global-set-key [home] #'beginning-of-line)
+ (global-set-key [end] #'end-of-line)
+ (global-set-key [C-home] #'beginning-of-buffer)
+ (global-set-key [C-end] #'end-of-buffer))
(provide 'pc-mode)
diff --git a/lisp/obsolete/pc-select.el b/lisp/obsolete/pc-select.el
index 3f184881096..f999f507972 100644
--- a/lisp/obsolete/pc-select.el
+++ b/lisp/obsolete/pc-select.el
@@ -1,4 +1,4 @@
-;;; pc-select.el --- emulate mark, cut, copy and paste from Motif
+;;; pc-select.el --- emulate mark, cut, copy and paste from Motif -*- lexical-binding: t; -*-
;;; (or MAC GUI or MS-windoze (bah)) look-and-feel
;;; including key bindings.
@@ -94,25 +94,21 @@ The scroll commands normally generate an error if you try to scroll
past the top or bottom of the buffer. This is annoying when selecting
text with these commands. If you set this variable to non-nil, these
errors are suppressed."
- :type 'boolean
- :group 'pc-select)
+ :type 'boolean)
(defcustom pc-select-selection-keys-only nil
"Non-nil means only bind the basic selection keys when started.
Other keys that emulate pc-behavior will be untouched.
This gives mostly Emacs-like behavior with only the selection keys enabled."
- :type 'boolean
- :group 'pc-select)
+ :type 'boolean)
(defcustom pc-select-meta-moves-sexps nil
"Non-nil means move sexp-wise with Meta key, otherwise move word-wise."
- :type 'boolean
- :group 'pc-select)
+ :type 'boolean)
(defcustom pc-selection-mode-hook nil
"The hook to run when PC Selection mode is toggled."
- :type 'hook
- :group 'pc-select)
+ :type 'hook)
(defvar pc-select-saved-settings-alist nil
"The values of the variables before PC Selection mode was toggled on.
@@ -318,9 +314,6 @@ but before calling PC Selection mode):
C-BACKSPACE backward-kill-word
M-BACKSPACE undo"
;; FIXME: bring pc-bindings-mode here ?
- nil nil nil
-
- :group 'pc-select
:global t
(if pc-selection-mode
diff --git a/lisp/obsolete/pgg-def.el b/lisp/obsolete/pgg-def.el
index 425093832f8..4d30e326148 100644
--- a/lisp/obsolete/pgg-def.el
+++ b/lisp/obsolete/pgg-def.el
@@ -1,4 +1,4 @@
-;;; pgg-def.el --- functions/macros for defining PGG functions
+;;; pgg-def.el --- functions/macros for defining PGG functions -*- lexical-binding: t; -*-
;; Copyright (C) 1999, 2002-2021 Free Software Foundation, Inc.
@@ -32,47 +32,39 @@
(defcustom pgg-default-scheme 'gpg
"Default PGP scheme."
- :group 'pgg
:type '(choice (const :tag "GnuPG" gpg)
(const :tag "PGP 5" pgp5)
(const :tag "PGP" pgp)))
(defcustom pgg-default-user-id (user-login-name)
"User ID of your default identity."
- :group 'pgg
:type 'string)
(defcustom pgg-default-keyserver-address "subkeys.pgp.net"
"Host name of keyserver."
- :group 'pgg
:type 'string)
(defcustom pgg-query-keyserver nil
"Whether PGG queries keyservers for missing keys when verifying messages."
:version "22.1"
- :group 'pgg
:type 'boolean)
(defcustom pgg-encrypt-for-me t
"If t, encrypt all outgoing messages with user's public key."
- :group 'pgg
:type 'boolean)
(defcustom pgg-cache-passphrase t
"If t, cache passphrase."
- :group 'pgg
:type 'boolean)
(defcustom pgg-passphrase-cache-expiry 16
"How many seconds the passphrase is cached.
Whether the passphrase is cached at all is controlled by
`pgg-cache-passphrase'."
- :group 'pgg
:type 'integer)
(defcustom pgg-passphrase-coding-system nil
"Coding system to encode passphrase."
- :group 'pgg
:type 'coding-system)
(defvar pgg-messages-coding-system nil
diff --git a/lisp/obsolete/pgg-gpg.el b/lisp/obsolete/pgg-gpg.el
index 90255fe2f7d..d06a485b975 100644
--- a/lisp/obsolete/pgg-gpg.el
+++ b/lisp/obsolete/pgg-gpg.el
@@ -1,4 +1,4 @@
-;;; pgg-gpg.el --- GnuPG support for PGG.
+;;; pgg-gpg.el --- GnuPG support for PGG. -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2000, 2002-2021 Free Software Foundation, Inc.
@@ -37,23 +37,19 @@
(defcustom pgg-gpg-program "gpg"
"The GnuPG executable."
- :group 'pgg-gpg
:type 'string)
(defcustom pgg-gpg-extra-args nil
"Extra arguments for every GnuPG invocation."
- :group 'pgg-gpg
:type '(repeat (string :tag "Argument")))
(defcustom pgg-gpg-recipient-argument "--recipient"
"GnuPG option to specify recipient."
- :group 'pgg-gpg
:type '(choice (const :tag "New `--recipient' option" "--recipient")
(const :tag "Old `--remote-user' option" "--remote-user")))
(defcustom pgg-gpg-use-agent t
"Whether to use gnupg agent for key caching."
- :group 'pgg-gpg
:type 'boolean)
(defvar pgg-gpg-user-id nil
@@ -97,7 +93,7 @@
passphrase-with-newline
(coding-system-change-eol-conversion
pgg-passphrase-coding-system 'unix)))
- (pgg-clear-string passphrase-with-newline))
+ (clear-string passphrase-with-newline))
(setq encoded-passphrase-with-new-line passphrase-with-newline
passphrase-with-newline nil))
(process-send-string process encoded-passphrase-with-new-line))
@@ -125,9 +121,9 @@
(if (= 127 exit-status)
(error "%s could not be found" program))))
(if passphrase-with-newline
- (pgg-clear-string passphrase-with-newline))
+ (clear-string passphrase-with-newline))
(if encoded-passphrase-with-new-line
- (pgg-clear-string encoded-passphrase-with-new-line))
+ (clear-string encoded-passphrase-with-new-line))
(if (and process (eq 'run (process-status process)))
(interrupt-process process))
(if (file-exists-p output-file-name)
diff --git a/lisp/obsolete/pgg-parse.el b/lisp/obsolete/pgg-parse.el
index edb5d4f6775..2c76365a415 100644
--- a/lisp/obsolete/pgg-parse.el
+++ b/lisp/obsolete/pgg-parse.el
@@ -1,4 +1,4 @@
-;;; pgg-parse.el --- OpenPGP packet parsing
+;;; pgg-parse.el --- OpenPGP packet parsing -*- lexical-binding: t; -*-
;; Copyright (C) 1999, 2002-2021 Free Software Foundation, Inc.
@@ -44,14 +44,12 @@
(defcustom pgg-parse-public-key-algorithm-alist
'((1 . RSA) (2 . RSA-E) (3 . RSA-S) (16 . ELG-E) (17 . DSA) (20 . ELG))
"Alist of the assigned number to the public key algorithm."
- :group 'pgg-parse
:type '(repeat
(cons (sexp :tag "Number") (sexp :tag "Type"))))
(defcustom pgg-parse-symmetric-key-algorithm-alist
'((1 . IDEA) (2 . 3DES) (4 . CAST5) (5 . SAFER-SK128))
"Alist of the assigned number to the symmetric key algorithm."
- :group 'pgg-parse
:type '(repeat
(cons (sexp :tag "Number") (sexp :tag "Type"))))
@@ -59,7 +57,6 @@
'((1 . MD5) (2 . SHA1) (3 . RIPEMD160) (5 . MD2) (8 . SHA256) (9 . SHA384)
(10 . SHA512))
"Alist of the assigned number to the cryptographic hash algorithm."
- :group 'pgg-parse
:type '(repeat
(cons (sexp :tag "Number") (sexp :tag "Type"))))
@@ -68,7 +65,6 @@
(1 . ZIP)
(2 . ZLIB))
"Alist of the assigned number to the compression algorithm."
- :group 'pgg-parse
:type '(repeat
(cons (sexp :tag "Number") (sexp :tag "Type"))))
@@ -87,13 +83,11 @@
(48 . "Certification revocation signature")
(64 . "Timestamp signature."))
"Alist of the assigned number to the signature type."
- :group 'pgg-parse
:type '(repeat
(cons (sexp :tag "Number") (sexp :tag "Type"))))
(defcustom pgg-ignore-packet-checksum t; XXX
"If non-nil checksum of each ascii armored packet will be ignored."
- :group 'pgg-parse
:type 'boolean)
(defvar pgg-armor-header-lines
@@ -148,7 +142,7 @@
;; `(string-to-number-list (pgg-read-body-string ,ptag))
)
-(defalias 'pgg-skip-bytes 'forward-char)
+(defalias 'pgg-skip-bytes #'forward-char)
(defmacro pgg-skip-header (ptag)
`(pgg-skip-bytes (nth 2 ,ptag)))
@@ -345,7 +339,7 @@
;; 100 to 110 = internal or user-defined
))
-(defun pgg-parse-signature-packet (ptag)
+(defun pgg-parse-signature-packet (_ptag)
(let* ((signature-version (pgg-byte-after))
(result (list (cons 'version signature-version)))
hashed-material field n)
@@ -411,7 +405,7 @@
pgg-parse-hash-algorithm-alist)))
result))
-(defun pgg-parse-public-key-encrypted-session-key-packet (ptag)
+(defun pgg-parse-public-key-encrypted-session-key-packet (_ptag)
(let (result)
(pgg-set-alist result
'version (pgg-read-byte))
@@ -425,7 +419,7 @@
pgg-parse-public-key-algorithm-alist)))
result))
-(defun pgg-parse-symmetric-key-encrypted-session-key-packet (ptag)
+(defun pgg-parse-symmetric-key-encrypted-session-key-packet (_ptag)
(let (result)
(pgg-set-alist result
'version
@@ -436,7 +430,7 @@
pgg-parse-symmetric-key-algorithm-alist)))
result))
-(defun pgg-parse-public-key-packet (ptag)
+(defun pgg-parse-public-key-packet (_ptag)
(let* ((key-version (pgg-read-byte))
(result (list (cons 'version key-version)))
field)
diff --git a/lisp/obsolete/pgg-pgp.el b/lisp/obsolete/pgg-pgp.el
index e02032a6a57..665be0b2e2c 100644
--- a/lisp/obsolete/pgg-pgp.el
+++ b/lisp/obsolete/pgg-pgp.el
@@ -1,4 +1,4 @@
-;;; pgg-pgp.el --- PGP 2.* and 6.* support for PGG.
+;;; pgg-pgp.el --- PGP 2.* and 6.* support for PGG. -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2000, 2002-2021 Free Software Foundation, Inc.
@@ -35,23 +35,19 @@
(defcustom pgg-pgp-program "pgp"
"PGP 2.* and 6.* executable."
- :group 'pgg-pgp
:type 'string)
(defcustom pgg-pgp-shell-file-name "/bin/sh"
"File name to load inferior shells from.
Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
- :group 'pgg-pgp
:type 'string)
(defcustom pgg-pgp-shell-command-switch "-c"
"Switch used to have the shell execute its command line argument."
- :group 'pgg-pgp
:type 'string)
(defcustom pgg-pgp-extra-args nil
"Extra arguments for every PGP invocation."
- :group 'pgg-pgp
:type '(choice
(const :tag "None" nil)
(string :tag "Arguments")))
@@ -112,7 +108,7 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
(delete-file errors-file-name)
(file-error nil)))))
-(defun pgg-pgp-lookup-key (string &optional type)
+(defun pgg-pgp-lookup-key (string &optional _type)
"Search keys associated with STRING."
(let ((args (list "+batchmode" "+language=en" "-kv" string)))
(with-current-buffer (get-buffer-create pgg-output-buffer)
@@ -133,7 +129,7 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
(defun pgg-pgp-encrypt-region (start end recipients &optional sign passphrase)
"Encrypt the current region between START and END."
(let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
- (passphrase (or passphrase
+ (_passphrase (or passphrase
(when sign
(pgg-read-passphrase
(format "PGP passphrase for %s: "
@@ -143,10 +139,11 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
(concat
"+encrypttoself=off +verbose=1 +batchmode +language=us -fate "
(if (or recipients pgg-encrypt-for-me)
- (mapconcat 'shell-quote-argument
+ (mapconcat #'shell-quote-argument
(append recipients
(if pgg-encrypt-for-me
- (list pgg-pgp-user-id))) " "))
+ (list pgg-pgp-user-id)))
+ " "))
(if sign (concat " -s -u " (shell-quote-argument pgg-pgp-user-id))))))
(pgg-pgp-process-region start end nil pgg-pgp-program args)
(pgg-process-when-success nil)))
@@ -203,6 +200,7 @@ passphrase cache or user."
(let* ((orig-file (pgg-make-temp-file "pgg"))
(args "+verbose=1 +batchmode +language=us"))
(with-file-modes 448
+ (defvar jam-zcat-filename-list)
(let ((coding-system-for-write 'binary)
jka-compr-compression-info-list jam-zcat-filename-list)
(write-region start end orig-file)))
diff --git a/lisp/obsolete/pgg-pgp5.el b/lisp/obsolete/pgg-pgp5.el
index 42ff1ca2bd6..d9523172418 100644
--- a/lisp/obsolete/pgg-pgp5.el
+++ b/lisp/obsolete/pgg-pgp5.el
@@ -1,4 +1,4 @@
-;;; pgg-pgp5.el --- PGP 5.* support for PGG.
+;;; pgg-pgp5.el --- PGP 5.* support for PGG. -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2000, 2002-2021 Free Software Foundation, Inc.
@@ -35,38 +35,31 @@
(defcustom pgg-pgp5-pgpe-program "pgpe"
"PGP 5.* `pgpe' executable."
- :group 'pgg-pgp5
:type 'string)
(defcustom pgg-pgp5-pgps-program "pgps"
"PGP 5.* `pgps' executable."
- :group 'pgg-pgp5
:type 'string)
(defcustom pgg-pgp5-pgpk-program "pgpk"
"PGP 5.* `pgpk' executable."
- :group 'pgg-pgp5
:type 'string)
(defcustom pgg-pgp5-pgpv-program "pgpv"
"PGP 5.* `pgpv' executable."
- :group 'pgg-pgp5
:type 'string)
(defcustom pgg-pgp5-shell-file-name "/bin/sh"
"File name to load inferior shells from.
Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
- :group 'pgg-pgp5
:type 'string)
(defcustom pgg-pgp5-shell-command-switch "-c"
"Switch used to have the shell execute its command line argument."
- :group 'pgg-pgp5
:type 'string)
(defcustom pgg-pgp5-extra-args nil
"Extra arguments for every PGP 5.* invocation."
- :group 'pgg-pgp5
:type '(choice
(const :tag "None" nil)
(string :tag "Arguments")))
@@ -128,7 +121,7 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
(delete-file errors-file-name)
(file-error nil)))))
-(defun pgg-pgp5-lookup-key (string &optional type)
+(defun pgg-pgp5-lookup-key (string &optional _type)
"Search keys associated with STRING."
(let ((args (list "+language=en" "-l" string)))
(with-current-buffer (get-buffer-create pgg-output-buffer)
@@ -145,7 +138,7 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
(defun pgg-pgp5-encrypt-region (start end recipients &optional sign passphrase)
"Encrypt the current region between START and END."
(let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
- (passphrase (or passphrase
+ (_passphrase (or passphrase
(when sign
(pgg-read-passphrase
(format "PGP passphrase for %s: "
@@ -209,6 +202,7 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
(let ((orig-file (pgg-make-temp-file "pgg"))
(args '("+verbose=1" "+batchmode=1" "+language=us")))
(with-file-modes 448
+ (defvar jam-zcat-filename-list) ;Not sure where this comes from.
(let ((coding-system-for-write 'binary)
jka-compr-compression-info-list jam-zcat-filename-list)
(write-region start end orig-file)))
diff --git a/lisp/obsolete/pgg.el b/lisp/obsolete/pgg.el
index ec93eeb93f8..5ed59933f23 100644
--- a/lisp/obsolete/pgg.el
+++ b/lisp/obsolete/pgg.el
@@ -1,4 +1,4 @@
-;;; pgg.el --- glue for the various PGP implementations.
+;;; pgg.el --- glue for the various PGP implementations. -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2000, 2002-2021 Free Software Foundation, Inc.
@@ -27,99 +27,19 @@
(require 'pgg-def)
(require 'pgg-parse)
-(autoload 'run-at-time "timer")
(eval-when-compile (require 'cl-lib))
;;; @ utility functions
;;;
-(eval-when-compile
- (when (featurep 'xemacs)
- (defmacro pgg-run-at-time-1 (time repeat function args)
- (if (condition-case nil
- (let ((delete-itimer 'delete-itimer)
- (itimer-driver-start 'itimer-driver-start)
- (itimer-value 'itimer-value)
- (start-itimer 'start-itimer))
- (unless (or (symbol-value 'itimer-process)
- (symbol-value 'itimer-timer))
- (funcall itimer-driver-start))
- ;; Check whether there is a bug to which the difference of
- ;; the present time and the time when the itimer driver was
- ;; woken up is subtracted from the initial itimer value.
- (let* ((inhibit-quit t)
- (ctime (current-time))
- (itimer-timer-last-wakeup
- (prog1
- ctime
- (setcar ctime (1- (car ctime)))))
- (itimer-list nil)
- (itimer (funcall start-itimer "pgg-run-at-time"
- 'ignore 5)))
- (sleep-for 0.1) ;; Accept the timeout interrupt.
- (prog1
- (> (funcall itimer-value itimer) 0)
- (funcall delete-itimer itimer))))
- (error nil))
- `(let ((time ,time))
- (apply #'start-itimer "pgg-run-at-time"
- ,function (if time (max time 1e-9) 1e-9)
- ,repeat nil t ,args))
- `(let ((time ,time)
- (itimers (list nil)))
- (setcar
- itimers
- (apply #'start-itimer "pgg-run-at-time"
- (lambda (itimers repeat function &rest args)
- (let ((itimer (car itimers)))
- (if repeat
- (progn
- (set-itimer-function
- itimer
- (lambda (itimer repeat function &rest args)
- (set-itimer-restart itimer repeat)
- (set-itimer-function itimer function)
- (set-itimer-function-arguments itimer args)
- (apply function args)))
- (set-itimer-function-arguments
- itimer
- (append (list itimer repeat function) args)))
- (set-itimer-function
- itimer
- (lambda (itimer function &rest args)
- (delete-itimer itimer)
- (apply function args)))
- (set-itimer-function-arguments
- itimer
- (append (list itimer function) args)))))
- 1e-9 (if time (max time 1e-9) 1e-9)
- nil t itimers ,repeat ,function ,args)))))))
-
-(eval-and-compile
- (if (featurep 'xemacs)
- (progn
- (defun pgg-run-at-time (time repeat function &rest args)
- "Emulating function run as `run-at-time'.
-TIME should be nil meaning now, or a number of seconds from now.
-Return an itimer object which can be used in either `delete-itimer'
-or `cancel-timer'."
- (pgg-run-at-time-1 time repeat function args))
- (defun pgg-cancel-timer (timer)
- "Emulate cancel-timer for xemacs."
- (let ((delete-itimer 'delete-itimer))
- (funcall delete-itimer timer))))
- (defalias 'pgg-run-at-time 'run-at-time)
- (defalias 'pgg-cancel-timer 'cancel-timer)))
-
(defun pgg-invoke (func scheme &rest args)
(progn
(require (intern (format "pgg-%s" scheme)))
- (apply 'funcall (intern (format "pgg-%s-%s" scheme func)) args)))
-
-(put 'pgg-save-coding-system 'lisp-indent-function 2)
+ (apply #'funcall (intern (format "pgg-%s-%s" scheme func)) args)))
(defmacro pgg-save-coding-system (start end &rest body)
+ (declare (indent 2) (debug t))
`(if (called-interactively-p 'interactive)
(let ((buffer (current-buffer)))
(with-temp-buffer
@@ -209,23 +129,16 @@ regulate cache behavior."
(let* ((key (if notruncate key (pgg-truncate-key-identifier key)))
(interned-timer-key (intern-soft key pgg-pending-timers))
(old-timer (symbol-value interned-timer-key))
- new-timer)
+ ) ;; new-timer
(when old-timer
(cancel-timer old-timer)
(unintern interned-timer-key pgg-pending-timers))
(set (intern key pgg-passphrase-cache)
passphrase)
(set (intern key pgg-pending-timers)
- (pgg-run-at-time pgg-passphrase-cache-expiry nil
- #'pgg-remove-passphrase-from-cache
- key notruncate))))
-
-(if (fboundp 'clear-string)
- (defalias 'pgg-clear-string 'clear-string)
- (defun pgg-clear-string (string)
- (fillarray string ?_)))
-
-(declare-function pgg-clear-string "pgg" (string))
+ (run-at-time pgg-passphrase-cache-expiry nil
+ #'pgg-remove-passphrase-from-cache
+ key notruncate))))
(defun pgg-remove-passphrase-from-cache (key &optional notruncate)
"Omit passphrase associated with KEY in time-limited passphrase cache.
@@ -245,10 +158,10 @@ regulate cache behavior."
(interned-timer-key (intern-soft key pgg-pending-timers))
(old-timer (symbol-value interned-timer-key)))
(when passphrase
- (pgg-clear-string passphrase)
+ (clear-string passphrase)
(unintern key pgg-passphrase-cache))
(when old-timer
- (pgg-cancel-timer old-timer)
+ (cancel-timer old-timer)
(unintern interned-timer-key pgg-pending-timers))))
(defmacro pgg-convert-lbt-region (start end lbt)
@@ -265,9 +178,8 @@ regulate cache behavior."
(while (re-search-forward "\r$" pgg-conversion-end t)
(replace-match ""))))))
-(put 'pgg-as-lbt 'lisp-indent-function 3)
-
(defmacro pgg-as-lbt (start end lbt &rest body)
+ (declare (indent 3) (debug t))
`(let ((inhibit-read-only t)
buffer-read-only
buffer-undo-list)
@@ -277,9 +189,8 @@ regulate cache behavior."
(push nil buffer-undo-list)
(ignore-errors (undo))))
-(put 'pgg-process-when-success 'lisp-indent-function 0)
-
(defmacro pgg-process-when-success (&rest body)
+ (declare (indent 0) (debug t))
`(with-current-buffer pgg-output-buffer
(if (zerop (buffer-size)) nil ,@body t)))
@@ -377,7 +288,7 @@ passphrase cache or user."
If optional PASSPHRASE is not specified, it will be obtained from the
passphrase cache or user."
(interactive "r")
- (let* ((buf (current-buffer))
+ (let* (;; (buf (current-buffer))
(status
(pgg-save-coding-system start end
(pgg-invoke "decrypt-region" (or pgg-scheme pgg-default-scheme)
diff --git a/lisp/obsolete/rcompile.el b/lisp/obsolete/rcompile.el
index 29931d9bda4..d7020f0d074 100644
--- a/lisp/obsolete/rcompile.el
+++ b/lisp/obsolete/rcompile.el
@@ -1,4 +1,4 @@
-;;; rcompile.el --- run a compilation on a remote machine
+;;; rcompile.el --- run a compilation on a remote machine -*- lexical-binding: t; -*-
;; Copyright (C) 1993-1994, 2001-2021 Free Software Foundation, Inc.
@@ -76,14 +76,12 @@
(defcustom remote-compile-host nil
"Host for remote compilations."
- :type '(choice string (const nil))
- :group 'remote-compile)
+ :type '(choice string (const nil)))
(defcustom remote-compile-user nil
"User for remote compilations.
nil means use the value returned by \\[user-login-name]."
- :type '(choice string (const nil))
- :group 'remote-compile)
+ :type '(choice string (const nil)))
(defcustom remote-compile-run-before nil
"Command to run before compilation.
@@ -91,18 +89,15 @@ This can be used for setting up environment variables,
since rsh does not invoke the shell as a login shell and files like .login
\(tcsh) and .bash_profile \(bash) are not run.
nil means run no commands."
- :type '(choice string (const nil))
- :group 'remote-compile)
+ :type '(choice string (const nil)))
(defcustom remote-compile-prompt-for-host nil
"Non-nil means prompt for host if not available from filename."
- :type 'boolean
- :group 'remote-compile)
+ :type 'boolean)
(defcustom remote-compile-prompt-for-user nil
"Non-nil means prompt for user if not available from filename."
- :type 'boolean
- :group 'remote-compile)
+ :type 'boolean)
;;;; internal variables
@@ -123,7 +118,7 @@ nil means run no commands."
"Compile the current buffer's directory on HOST. Log in as USER.
See \\[compile]."
(interactive
- (let (host user command prompt l l-host l-user)
+ (let (host user command prompt) ;; l l-host l-user
(setq prompt (if (stringp remote-compile-host)
(format "Compile on host (default %s): "
remote-compile-host)
@@ -153,7 +148,7 @@ See \\[compile]."
(setq remote-compile-user user))
((null remote-compile-user)
(setq remote-compile-user (user-login-name))))
- (let* (localname ;; Pacify byte-compiler.
+ (let* (;; localname ;; Pacify byte-compiler.
(compile-command
(format "%s %s -l %s \"(%scd %s; %s)\""
remote-shell-program
diff --git a/lisp/obsolete/s-region.el b/lisp/obsolete/s-region.el
index bcb5279d115..4d4c39e9b11 100644
--- a/lisp/obsolete/s-region.el
+++ b/lisp/obsolete/s-region.el
@@ -1,4 +1,4 @@
-;;; s-region.el --- set region using shift key
+;;; s-region.el --- set region using shift key -*- lexical-binding: t; -*-
;; Copyright (C) 1994-1995, 2001-2021 Free Software Foundation, Inc.
@@ -112,11 +112,11 @@ to global keymap."
[M-next] [M-previous] [M-home] [M-end]))
(or (global-key-binding [C-insert])
- (global-set-key [C-insert] 'copy-region-as-kill))
+ (global-set-key [C-insert] #'copy-region-as-kill))
(or (global-key-binding [S-delete])
- (global-set-key [S-delete] 'kill-region))
+ (global-set-key [S-delete] #'kill-region))
(or (global-key-binding [S-insert])
- (global-set-key [S-insert] 'yank))
+ (global-set-key [S-insert] #'yank))
(provide 's-region)
diff --git a/lisp/obsolete/sb-image.el b/lisp/obsolete/sb-image.el
index 53ecfb7f268..fc9e03eae6e 100644
--- a/lisp/obsolete/sb-image.el
+++ b/lisp/obsolete/sb-image.el
@@ -1,4 +1,4 @@
-;;; sb-image --- Image management for speedbar
+;;; sb-image.el --- Image management for speedbar -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2003, 2005-2019, 2021 Free Software Foundation,
;; Inc.
diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el
index ac5f62dd67e..371dcbf8498 100644
--- a/lisp/obsolete/sregex.el
+++ b/lisp/obsolete/sregex.el
@@ -1,4 +1,4 @@
-;;; sregex.el --- symbolic regular expressions
+;;; sregex.el --- symbolic regular expressions -*- lexical-binding: t; -*-
;; Copyright (C) 1997-1998, 2000-2021 Free Software Foundation, Inc.
@@ -208,7 +208,7 @@
;; This is a "trapdoor" for including ordinary regular expression
;; strings in the result. Some regular expressions are clearer when
;; written the old way: "[a-z]" vs. (sregexq (char (?a . ?z))), for
-;; instance. However, see the note under "Bugs," below.
+;; instance.
;; Each CHAR-CLAUSE that is passed to (char ...) and (not-char ...)
;; has one of the following forms:
@@ -236,8 +236,6 @@
;; - add support for non-greedy operators *? and +?
;; - bug: (sregexq (opt (opt ?a))) returns "a??" which is a non-greedy "a?"
-;;; Bugs:
-
;;; Code:
(eval-when-compile (require 'cl-lib))
@@ -246,15 +244,15 @@
(defvar sregex--current-sregex nil)
(defun sregex-info () nil)
(defmacro sregex-save-match-data (&rest forms) (cons 'save-match-data forms))
-(defun sregex-replace-match (r &optional f l str subexp x)
+(defun sregex-replace-match (r &optional f l str subexp _x)
(replace-match r f l str subexp))
-(defun sregex-match-string (c &optional i x) (match-string c i))
-(defun sregex-match-string-no-properties (count &optional in-string sregex)
+(defun sregex-match-string (c &optional i _x) (match-string c i))
+(defun sregex-match-string-no-properties (count &optional in-string _sregex)
(match-string-no-properties count in-string))
-(defun sregex-match-beginning (count &optional sregex) (match-beginning count))
-(defun sregex-match-end (count &optional sregex) (match-end count))
-(defun sregex-match-data (&optional sregex) (match-data))
-(defun sregex-backref-num (n &optional sregex) n)
+(defun sregex-match-beginning (count &optional _sregex) (match-beginning count))
+(defun sregex-match-end (count &optional _sregex) (match-end count))
+(defun sregex-match-data (&optional _sregex) (match-data))
+(defun sregex-backref-num (n &optional _sregex) n)
(defun sregex (&rest exps)
@@ -525,23 +523,23 @@ has one of the following forms:
(concat "\\(?:" re "\\)")
re))))
-(defun sregex--group (exps combine) (concat "\\(" (sregex--sequence exps nil) "\\)"))
+(defun sregex--group (exps _combine) (concat "\\(" (sregex--sequence exps nil) "\\)"))
-(defun sregex--backref (exps combine) (concat "\\" (int-to-string (car exps))))
-(defun sregex--opt (exps combine) (concat (sregex--sequence exps 'suffix) "?"))
-(defun sregex--0+ (exps combine) (concat (sregex--sequence exps 'suffix) "*"))
-(defun sregex--1+ (exps combine) (concat (sregex--sequence exps 'suffix) "+"))
+(defun sregex--backref (exps _combine) (concat "\\" (int-to-string (car exps))))
+(defun sregex--opt (exps _combine) (concat (sregex--sequence exps 'suffix) "?"))
+(defun sregex--0+ (exps _combine) (concat (sregex--sequence exps 'suffix) "*"))
+(defun sregex--1+ (exps _combine) (concat (sregex--sequence exps 'suffix) "+"))
-(defun sregex--char (exps combine) (sregex--char-aux nil exps))
-(defun sregex--not-char (exps combine) (sregex--char-aux t exps))
+(defun sregex--char (exps _combine) (sregex--char-aux nil exps))
+(defun sregex--not-char (exps _combine) (sregex--char-aux t exps))
-(defun sregex--syntax (exps combine) (format "\\s%c" (car exps)))
-(defun sregex--not-syntax (exps combine) (format "\\S%c" (car exps)))
+(defun sregex--syntax (exps _combine) (format "\\s%c" (car exps)))
+(defun sregex--not-syntax (exps _combine) (format "\\S%c" (car exps)))
(defun sregex--regex (exps combine)
(if combine (concat "\\(?:" (car exps) "\\)") (car exps)))
-(defun sregex--repeat (exps combine)
+(defun sregex--repeat (exps _combine)
(let* ((min (or (pop exps) 0))
(minstr (number-to-string min))
(max (pop exps)))
diff --git a/lisp/obsolete/starttls.el b/lisp/obsolete/starttls.el
index 451c7eb2ffc..926248db9af 100644
--- a/lisp/obsolete/starttls.el
+++ b/lisp/obsolete/starttls.el
@@ -1,4 +1,4 @@
-;;; starttls.el --- STARTTLS functions
+;;; starttls.el --- STARTTLS functions -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
@@ -126,28 +126,24 @@
This program is used when GnuTLS is used, i.e. when
`starttls-use-gnutls' is non-nil."
:version "22.1"
- :type 'string
- :group 'starttls)
+ :type 'string)
(defcustom starttls-program "starttls"
"The program to run in a subprocess to open an TLSv1 connection.
This program is used when the `starttls' command is used,
i.e. when `starttls-use-gnutls' is nil."
- :type 'string
- :group 'starttls)
+ :type 'string)
(defcustom starttls-use-gnutls (not (executable-find starttls-program))
"Whether to use GnuTLS instead of the `starttls' command."
:version "22.1"
- :type 'boolean
- :group 'starttls)
+ :type 'boolean)
(defcustom starttls-extra-args nil
"Extra arguments to `starttls-program'.
These apply when the `starttls' command is used, i.e. when
`starttls-use-gnutls' is nil."
- :type '(repeat string)
- :group 'starttls)
+ :type '(repeat string))
(defcustom starttls-extra-arguments nil
"Extra arguments to `starttls-gnutls-program'.
@@ -157,14 +153,12 @@ For example, non-TLS compliant servers may require
\(\"--protocols\" \"ssl3\"). Invoke \"gnutls-cli --help\" to
find out which parameters are available."
:version "22.1"
- :type '(repeat string)
- :group 'starttls)
+ :type '(repeat string))
(defcustom starttls-process-connection-type nil
"Value for `process-connection-type' to use when starting STARTTLS process."
:version "22.1"
- :type 'boolean
- :group 'starttls)
+ :type 'boolean)
(defcustom starttls-connect "- Simple Client Mode:\n\n"
"Regular expression indicating successful connection.
@@ -173,8 +167,7 @@ The default is what GnuTLS's \"gnutls-cli\" outputs."
;; in the application read/write phase. If the logic, or the string
;; itself, is modified, this must be updated.
:version "22.1"
- :type 'regexp
- :group 'starttls)
+ :type 'regexp)
(defcustom starttls-failure "\\*\\*\\* Handshake has failed"
"Regular expression indicating failed TLS handshake.
@@ -182,8 +175,7 @@ The default is what GnuTLS's \"gnutls-cli\" outputs."
;; GnuTLS cli.c:do_handshake() prints this string on failure. If the
;; logic, or the string itself, is modified, this must be updated.
:version "22.1"
- :type 'regexp
- :group 'starttls)
+ :type 'regexp)
(defcustom starttls-success "- Compression: "
"Regular expression indicating completed TLS handshakes.
@@ -193,8 +185,7 @@ The default is what GnuTLS's \"gnutls-cli\" outputs."
;; last. If that logic, or the string itself, is modified, this
;; must be updated.
:version "22.1"
- :type 'regexp
- :group 'starttls)
+ :type 'regexp)
(defun starttls-negotiate-gnutls (process)
"Negotiate TLS on PROCESS opened by `open-starttls-stream'.
@@ -296,9 +287,8 @@ GnuTLS requires a port number."
starttls-gnutls-program
starttls-program))))
-(defalias 'starttls-any-program-available 'starttls-available-p)
-(make-obsolete 'starttls-any-program-available 'starttls-available-p
- "2011-08-02")
+(define-obsolete-function-alias 'starttls-any-program-available
+ #'starttls-available-p "24.1")
(provide 'starttls)
diff --git a/lisp/obsolete/sup-mouse.el b/lisp/obsolete/sup-mouse.el
index f3db27f567e..4e312e968b3 100644
--- a/lisp/obsolete/sup-mouse.el
+++ b/lisp/obsolete/sup-mouse.el
@@ -1,4 +1,4 @@
-;;; sup-mouse.el --- supdup mouse support for lisp machines
+;;; sup-mouse.el --- supdup mouse support for lisp machines -*- lexical-binding: t; -*-
;; Copyright (C) 1985-1986, 2001-2021 Free Software Foundation, Inc.
diff --git a/lisp/obsolete/terminal.el b/lisp/obsolete/terminal.el
index bde656dfa6a..0167a00066b 100644
--- a/lisp/obsolete/terminal.el
+++ b/lisp/obsolete/terminal.el
@@ -1,4 +1,4 @@
-;;; terminal.el --- terminal emulator for GNU Emacs
+;;; terminal.el --- terminal emulator for GNU Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1986-1989, 1993-1994, 2001-2021 Free Software
;; Foundation, Inc.
@@ -32,7 +32,7 @@
;; For information on US government censorship of the Internet, and
;; what you can do to bring back freedom of the press, see the web
-;; site http://www.vtw.org/
+;; site https://www.eff.org/ [used to be vtw.org but that link is dead]
;;; Code:
@@ -58,22 +58,19 @@ to the emulator program itself. Type this character twice to send
it through the emulator. Type ? after typing it for a list of
possible commands.
This variable is local to each terminal-emulator buffer."
- :type 'character
- :group 'terminal)
+ :type 'character)
(defcustom terminal-scrolling t ;;>> Setting this to t sort-of defeats my whole aim in writing this package...
"If non-nil, the terminal-emulator will losingly `scroll' when output occurs
past the bottom of the screen. If nil, output will win and `wrap' to the top
of the screen.
This variable is local to each terminal-emulator buffer."
- :type 'boolean
- :group 'terminal)
+ :type 'boolean)
(defcustom terminal-more-processing t
"If non-nil, do more-processing.
This variable is local to each terminal-emulator buffer."
- :type 'boolean
- :group 'terminal)
+ :type 'boolean)
;; If you are the sort of loser who uses scrolling without more breaks
;; and expects to actually see anything, you should probably set this to
@@ -84,8 +81,7 @@ terminal-emulator before a screen redisplay is forced.
Set this to a large value for greater throughput,
set it smaller for more frequent updates but overall slower
performance."
- :type 'integer
- :group 'terminal)
+ :type 'integer)
(defvar terminal-more-break-insertion
"*** More break -- Press space to continue ***")
@@ -94,7 +90,7 @@ performance."
(if terminal-meta-map
nil
(let ((map (make-sparse-keymap)))
- (define-key map [t] 'te-pass-through)
+ (define-key map [t] #'te-pass-through)
(setq terminal-meta-map map)))
(defvar terminal-map nil)
@@ -104,8 +100,8 @@ performance."
;; Prevent defining [menu-bar] as te-pass-through
;; so we allow the global menu bar to be visible.
(define-key map [menu-bar] (make-sparse-keymap))
- (define-key map [t] 'te-pass-through)
- (define-key map [switch-frame] 'handle-switch-frame)
+ (define-key map [t] #'te-pass-through)
+ (define-key map [switch-frame] #'handle-switch-frame)
(define-key map "\e" terminal-meta-map)
;;(define-key map "\C-l"
;; (lambda () (interactive) (te-pass-through) (redraw-display)))
@@ -115,22 +111,22 @@ performance."
(if terminal-escape-map
nil
(let ((map (make-sparse-keymap)))
- (define-key map [t] 'undefined)
+ (define-key map [t] #'undefined)
(let ((s "0"))
(while (<= (aref s 0) ?9)
- (define-key map s 'digit-argument)
+ (define-key map s #'digit-argument)
(aset s 0 (1+ (aref s 0)))))
- (define-key map "b" 'switch-to-buffer)
- (define-key map "o" 'other-window)
- (define-key map "e" 'te-set-escape-char)
- (define-key map "\C-l" 'redraw-display)
- (define-key map "\C-o" 'te-flush-pending-output)
- (define-key map "m" 'te-toggle-more-processing)
- (define-key map "x" 'te-escape-extended-command)
+ (define-key map "b" #'switch-to-buffer)
+ (define-key map "o" #'other-window)
+ (define-key map "e" #'te-set-escape-char)
+ (define-key map "\C-l" #'redraw-display)
+ (define-key map "\C-o" #'te-flush-pending-output)
+ (define-key map "m" #'te-toggle-more-processing)
+ (define-key map "x" #'te-escape-extended-command)
;;>> What use is this? Why is it in the default terminal-emulator map?
- (define-key map "w" 'te-edit)
- (define-key map "?" 'te-escape-help)
- (define-key map (char-to-string help-char) 'te-escape-help)
+ (define-key map "w" #'te-edit)
+ (define-key map "?" #'te-escape-help)
+ (define-key map (char-to-string help-char) #'te-escape-help)
(setq terminal-escape-map map)))
(defvar te-escape-command-alist nil)
@@ -161,14 +157,14 @@ performance."
(if terminal-more-break-map
nil
(let ((map (make-sparse-keymap)))
- (define-key map [t] 'te-more-break-unread)
- (define-key map (char-to-string help-char) 'te-more-break-help)
- (define-key map " " 'te-more-break-resume)
- (define-key map "\C-l" 'redraw-display)
- (define-key map "\C-o" 'te-more-break-flush-pending-output)
+ (define-key map [t] #'te-more-break-unread)
+ (define-key map (char-to-string help-char) #'te-more-break-help)
+ (define-key map " " #'te-more-break-resume)
+ (define-key map "\C-l" #'redraw-display)
+ (define-key map "\C-o" #'te-more-break-flush-pending-output)
;;>>> this isn't right
- ;(define-key map "\^?" 'te-more-break-flush-pending-output) ;DEL
- (define-key map "\r" 'te-more-break-advance-one-line)
+ ;(define-key map "\^?" #'te-more-break-flush-pending-output) ;DEL
+ (define-key map "\r" #'te-more-break-advance-one-line)
(setq terminal-more-break-map map)))
@@ -525,7 +521,7 @@ lets you type a terminal emulator command."
(if terminal-edit-map
nil
(setq terminal-edit-map (make-sparse-keymap))
- (define-key terminal-edit-map "\C-c\C-c" 'terminal-cease-edit))
+ (define-key terminal-edit-map "\C-c\C-c" #'terminal-cease-edit))
;; Terminal Edit mode is suitable only for specially formatted data.
(put 'terminal-edit-mode 'mode-class 'special)
@@ -1140,10 +1136,10 @@ subprocess started."
;; Then finally start the program we wanted.
(format "%s; exec %s"
te-stty-string
- (mapconcat 'te-quote-arg-for-sh
+ (mapconcat #'te-quote-arg-for-sh
(cons program args) " "))))
- (set-process-filter te-process 'te-filter)
- (set-process-sentinel te-process 'te-sentinel))
+ (set-process-filter te-process #'te-filter)
+ (set-process-sentinel te-process #'te-sentinel))
(error (fundamental-mode)
(signal (car err) (cdr err))))
(setq inhibit-quit t) ;sport death
@@ -1151,8 +1147,8 @@ subprocess started."
(run-hooks 'terminal-mode-hook)
(message "Entering Emacs terminal-emulator... Type %s %s for help"
(single-key-description terminal-escape-char)
- (mapconcat 'single-key-description
- (where-is-internal 'te-escape-help terminal-escape-map t)
+ (mapconcat #'single-key-description
+ (where-is-internal #'te-escape-help terminal-escape-map t)
" ")))
@@ -1226,7 +1222,7 @@ of the terminal-emulator"
(cond ((string-match "\\`[-a-zA-Z0-9+=_.@/:]+\\'"
string)
string)
- ((not (string-match "[$]" string))
+ ((not (string-search "$" string))
;; "[\"\\]" are special to sh and the lisp reader in the same way
(prin1-to-string string))
(t
@@ -1292,7 +1288,7 @@ in the directory specified by `te-terminfo-directory'."
(directory-file-name te-terminfo-directory))
process-environment)))
(set-process-sentinel (start-process "tic" nil "tic" file-name)
- 'te-tic-sentinel))))
+ #'te-tic-sentinel))))
(directory-file-name te-terminfo-directory))
(defun te-create-termcap ()
diff --git a/lisp/obsolete/tls.el b/lisp/obsolete/tls.el
index 67a497f9412..5cba18d7897 100644
--- a/lisp/obsolete/tls.el
+++ b/lisp/obsolete/tls.el
@@ -1,4 +1,4 @@
-;;; tls.el --- TLS/SSL support via wrapper around GnuTLS
+;;; tls.el --- TLS/SSL support via wrapper around GnuTLS -*- lexical-binding: t; -*-
;; Copyright (C) 1996-1999, 2002-2021 Free Software Foundation, Inc.
@@ -70,8 +70,7 @@
Client data stream begins after the last character this matches.
The default matches the output of \"gnutls-cli\" (version 2.0.1)."
:version "22.2"
- :type 'regexp
- :group 'tls)
+ :type 'regexp)
(defcustom tls-program
'("gnutls-cli --x509cafile %t -p %p %h"
@@ -104,22 +103,19 @@ successful negotiation."
(repeat :inline t :tag "Other" (string)))
(list :tag "List of commands"
(repeat :tag "Command" (string))))
- :version "26.1" ; remove s_client
- :group 'tls)
+ :version "26.1")
(defcustom tls-process-connection-type nil
"Value for `process-connection-type' to use when starting TLS process."
:version "22.1"
- :type 'boolean
- :group 'tls)
+ :type 'boolean)
(defcustom tls-success "- Handshake was completed\\|SSL handshake has read "
"Regular expression indicating completed TLS handshakes.
The default is what GnuTLS's \"gnutls-cli\" outputs."
;; or OpenSSL's \"openssl s_client\"
:version "22.1"
- :type 'regexp
- :group 'tls)
+ :type 'regexp)
(defcustom tls-checktrust nil
"Indicate if certificates should be checked against trusted root certs.
@@ -137,8 +133,7 @@ consider trustworthy, e.g.:
:type '(choice (const :tag "Always" t)
(const :tag "Never" nil)
(const :tag "Ask" ask))
- :version "23.1" ;; No Gnus
- :group 'tls)
+ :version "23.1")
(defcustom tls-untrusted
"- Peer's certificate is NOT trusted\\|Verify return code: \\([^0] \\|.[^ ]\\)"
@@ -147,8 +142,7 @@ The default is what GnuTLS's \"gnutls-cli\" returns in the event of
unsuccessful verification."
;; or OpenSSL's \"openssl s_client\"
:type 'regexp
- :version "23.1" ;; No Gnus
- :group 'tls)
+ :version "23.1")
(defcustom tls-hostmismatch
"# The hostname in the certificate does NOT match"
@@ -158,20 +152,13 @@ name of the host you are connecting to, gnutls-cli issues a
warning to this effect. There is no such feature in openssl. Set
this to nil if you want to ignore host name mismatches."
:type 'regexp
- :version "23.1" ;; No Gnus
- :group 'tls)
+ :version "23.1")
(defcustom tls-certtool-program "certtool"
"Name of GnuTLS certtool.
Used by `tls-certificate-information'."
:version "22.1"
- :type 'string
- :group 'tls)
-
-(defalias 'tls-format-message
- (if (fboundp 'format-message) 'format-message
- ;; for Emacs < 25, and XEmacs, don't worry about quote translation.
- 'format))
+ :type 'string)
(defun tls-certificate-information (der)
"Parse X.509 certificate in DER format into an assoc list."
@@ -272,7 +259,7 @@ Fourth arg PORT is an integer specifying a port to connect to."
(message "The certificate presented by `%s' is \
NOT trusted." host))
(not (yes-or-no-p
- (tls-format-message "\
+ (format-message "\
The certificate presented by `%s' is NOT trusted. Accept anyway? " host)))))
(and tls-hostmismatch
(save-excursion
diff --git a/lisp/obsolete/tpu-edt.el b/lisp/obsolete/tpu-edt.el
index 78d88cf3774..e0e89c390ea 100644
--- a/lisp/obsolete/tpu-edt.el
+++ b/lisp/obsolete/tpu-edt.el
@@ -1,4 +1,4 @@
-;;; tpu-edt.el --- Emacs emulating TPU emulating EDT
+;;; tpu-edt.el --- Emacs emulating TPU emulating EDT -*- lexical-binding: t; -*-
;; Copyright (C) 1993-1995, 2000-2021 Free Software Foundation, Inc.
@@ -289,18 +289,15 @@
;;;
(defcustom tpu-kill-buffers-silently nil
"If non-nil, TPU-edt kills modified buffers without asking."
- :type 'boolean
- :group 'tpu)
+ :type 'boolean)
(defcustom tpu-percent-scroll 75
"Percentage of the screen to scroll for next/previous screen commands."
- :type 'integer
- :group 'tpu)
+ :type 'integer)
(defcustom tpu-pan-columns 16
"Number of columns the tpu-pan functions scroll left or right."
- :type 'integer
- :group 'tpu)
+ :type 'integer)
;;;
@@ -313,17 +310,17 @@
;; that term/*.el does its job to map the escape sequence to the right
;; key-symbol.
- (define-key map [up] 'tpu-move-to-beginning) ; up-arrow
- (define-key map [down] 'tpu-move-to-end) ; down-arrow
- (define-key map [right] 'end-of-line) ; right-arrow
- (define-key map [left] 'beginning-of-line) ; left-arrow
+ (define-key map [up] #'tpu-move-to-beginning) ; up-arrow
+ (define-key map [down] #'tpu-move-to-end) ; down-arrow
+ (define-key map [right] #'end-of-line) ; right-arrow
+ (define-key map [left] #'beginning-of-line) ; left-arrow
;; (define-key map [find] nil) ; Find
;; (define-key map [insert] nil) ; Insert Here
- (define-key map [delete] 'tpu-store-text) ; Remove
- (define-key map [select] 'tpu-unselect) ; Select
- (define-key map [prior] 'tpu-previous-window) ; Prev Screen
- (define-key map [next] 'tpu-next-window) ; Next Screen
+ (define-key map [delete] #'tpu-store-text) ; Remove
+ (define-key map [select] #'tpu-unselect) ; Select
+ (define-key map [prior] #'tpu-previous-window) ; Prev Screen
+ (define-key map [next] #'tpu-next-window) ; Next Screen
;; (define-key map [f1] nil) ; F1
;; (define-key map [f2] nil) ; F2
@@ -339,45 +336,45 @@
;; (define-key map [f12] nil) ; F12
;; (define-key map [f13] nil) ; F13
;; (define-key map [f14] nil) ; F14
- (define-key map [help] 'describe-bindings) ; HELP
+ (define-key map [help] #'describe-bindings) ; HELP
;; (define-key map [menu] nil) ; DO
- (define-key map [f17] 'tpu-drop-breadcrumb) ; F17
+ (define-key map [f17] #'tpu-drop-breadcrumb) ; F17
;; (define-key map [f18] nil) ; F18
;; (define-key map [f19] nil) ; F19
;; (define-key map [f20] nil) ; F20
- (define-key map [kp-f1] 'keyboard-quit) ; PF1
- (define-key map [kp-f2] 'help-for-help) ; PF2
- (define-key map [kp-f3] 'tpu-search) ; PF3
- (define-key map [kp-f4] 'tpu-undelete-lines) ; PF4
- (define-key map [kp-0] 'open-line) ; KP0
- (define-key map [kp-1] 'tpu-change-case) ; KP1
- (define-key map [kp-2] 'tpu-delete-to-eol) ; KP2
- (define-key map [kp-3] 'tpu-special-insert) ; KP3
- (define-key map [kp-4] 'tpu-move-to-end) ; KP4
- (define-key map [kp-5] 'tpu-move-to-beginning) ; KP5
- (define-key map [kp-6] 'tpu-paste) ; KP6
- (define-key map [kp-7] 'execute-extended-command) ; KP7
- (define-key map [kp-8] 'tpu-fill) ; KP8
- (define-key map [kp-9] 'tpu-replace) ; KP9
- (define-key map [kp-subtract] 'tpu-undelete-words) ; KP-
- (define-key map [kp-separator] 'tpu-undelete-char) ; KP,
- (define-key map [kp-decimal] 'tpu-unselect) ; KP.
- (define-key map [kp-enter] 'tpu-substitute) ; KPenter
+ (define-key map [kp-f1] #'keyboard-quit) ; PF1
+ (define-key map [kp-f2] #'help-for-help) ; PF2
+ (define-key map [kp-f3] #'tpu-search) ; PF3
+ (define-key map [kp-f4] #'tpu-undelete-lines) ; PF4
+ (define-key map [kp-0] #'open-line) ; KP0
+ (define-key map [kp-1] #'tpu-change-case) ; KP1
+ (define-key map [kp-2] #'tpu-delete-to-eol) ; KP2
+ (define-key map [kp-3] #'tpu-special-insert) ; KP3
+ (define-key map [kp-4] #'tpu-move-to-end) ; KP4
+ (define-key map [kp-5] #'tpu-move-to-beginning) ; KP5
+ (define-key map [kp-6] #'tpu-paste) ; KP6
+ (define-key map [kp-7] #'execute-extended-command) ; KP7
+ (define-key map [kp-8] #'tpu-fill) ; KP8
+ (define-key map [kp-9] #'tpu-replace) ; KP9
+ (define-key map [kp-subtract] #'tpu-undelete-words) ; KP-
+ (define-key map [kp-separator] #'tpu-undelete-char) ; KP,
+ (define-key map [kp-decimal] #'tpu-unselect) ; KP.
+ (define-key map [kp-enter] #'tpu-substitute) ; KPenter
;;
- (define-key map "\C-A" 'tpu-toggle-overwrite-mode) ; ^A
+ (define-key map "\C-A" #'tpu-toggle-overwrite-mode) ; ^A
;; (define-key map "\C-B" nil) ; ^B
;; (define-key map "\C-C" nil) ; ^C
;; (define-key map "\C-D" nil) ; ^D
;; (define-key map "\C-E" nil) ; ^E
- (define-key map "\C-F" 'set-visited-file-name) ; ^F
- (define-key map "\C-g" 'keyboard-quit) ; safety first
- (define-key map "\C-h" 'delete-other-windows) ; BS
- (define-key map "\C-i" 'other-window) ; TAB
+ (define-key map "\C-F" #'set-visited-file-name) ; ^F
+ (define-key map "\C-g" #'keyboard-quit) ; safety first
+ (define-key map "\C-h" #'delete-other-windows) ; BS
+ (define-key map "\C-i" #'other-window) ; TAB
;; (define-key map "\C-J" nil) ; ^J
- (define-key map "\C-K" 'tpu-define-macro-key) ; ^K
- (define-key map "\C-l" 'downcase-region) ; ^L
+ (define-key map "\C-K" #'tpu-define-macro-key) ; ^K
+ (define-key map "\C-l" #'downcase-region) ; ^L
;; (define-key map "\C-M" nil) ; ^M
;; (define-key map "\C-N" nil) ; ^N
;; (define-key map "\C-O" nil) ; ^O
@@ -385,104 +382,104 @@
;; (define-key map "\C-Q" nil) ; ^Q
;; (define-key map "\C-R" nil) ; ^R
;; (define-key map "\C-S" nil) ; ^S
- (define-key map "\C-T" 'tpu-toggle-control-keys) ; ^T
- (define-key map "\C-u" 'upcase-region) ; ^U
+ (define-key map "\C-T" #'tpu-toggle-control-keys) ; ^T
+ (define-key map "\C-u" #'upcase-region) ; ^U
;; (define-key map "\C-V" nil) ; ^V
- (define-key map "\C-w" 'tpu-write-current-buffers) ; ^W
+ (define-key map "\C-w" #'tpu-write-current-buffers) ; ^W
;; (define-key map "\C-X" nil) ; ^X
;; (define-key map "\C-Y" nil) ; ^Y
;; (define-key map "\C-Z" nil) ; ^Z
- (define-key map " " 'undo) ; SPC
+ (define-key map " " #'undo) ; SPC
;; (define-key map "!" nil) ; !
;; (define-key map "#" nil) ; #
- (define-key map "$" 'tpu-add-at-eol) ; $
- (define-key map "%" 'tpu-goto-percent) ; %
+ (define-key map "$" #'tpu-add-at-eol) ; $
+ (define-key map "%" #'tpu-goto-percent) ; %
;; (define-key map "&" nil) ; &
;; (define-key map "(" nil) ; (
;; (define-key map ")" nil) ; )
- (define-key map "*" 'tpu-toggle-regexp) ; *
+ (define-key map "*" #'tpu-toggle-regexp) ; *
;; (define-key map "+" nil) ; +
- (define-key map "," 'tpu-goto-breadcrumb) ; ,
- (define-key map "-" 'negative-argument) ; -
- (define-key map "." 'tpu-drop-breadcrumb) ; .
- (define-key map "/" 'tpu-emacs-replace) ; /
- (define-key map "0" 'digit-argument) ; 0
- (define-key map "1" 'digit-argument) ; 1
- (define-key map "2" 'digit-argument) ; 2
- (define-key map "3" 'digit-argument) ; 3
- (define-key map "4" 'digit-argument) ; 4
- (define-key map "5" 'digit-argument) ; 5
- (define-key map "6" 'digit-argument) ; 6
- (define-key map "7" 'digit-argument) ; 7
- (define-key map "8" 'digit-argument) ; 8
- (define-key map "9" 'digit-argument) ; 9
+ (define-key map "," #'tpu-goto-breadcrumb) ; ,
+ (define-key map "-" #'negative-argument) ; -
+ (define-key map "." #'tpu-drop-breadcrumb) ; .
+ (define-key map "/" #'tpu-emacs-replace) ; /
+ (define-key map "0" #'digit-argument) ; 0
+ (define-key map "1" #'digit-argument) ; 1
+ (define-key map "2" #'digit-argument) ; 2
+ (define-key map "3" #'digit-argument) ; 3
+ (define-key map "4" #'digit-argument) ; 4
+ (define-key map "5" #'digit-argument) ; 5
+ (define-key map "6" #'digit-argument) ; 6
+ (define-key map "7" #'digit-argument) ; 7
+ (define-key map "8" #'digit-argument) ; 8
+ (define-key map "9" #'digit-argument) ; 9
;; (define-key map ":" nil) ; :
- (define-key map ";" 'tpu-trim-line-ends) ; ;
+ (define-key map ";" #'tpu-trim-line-ends) ; ;
;; (define-key map "<" nil) ; <
;; (define-key map "=" nil) ; =
;; (define-key map ">" nil) ; >
- (define-key map "?" 'tpu-spell-check) ; ?
- ;; (define-key map "A" 'tpu-toggle-newline-and-indent) ; A
- ;; (define-key map "B" 'tpu-next-buffer) ; B
- ;; (define-key map "C" 'repeat-complex-command) ; C
- ;; (define-key map "D" 'shell-command) ; D
- ;; (define-key map "E" 'tpu-exit) ; E
- ;; (define-key map "F" 'tpu-cursor-free-mode) ; F
- ;; (define-key map "G" 'tpu-get) ; G
+ (define-key map "?" #'tpu-spell-check) ; ?
+ ;; (define-key map "A" #'tpu-toggle-newline-and-indent) ; A
+ ;; (define-key map "B" #'tpu-next-buffer) ; B
+ ;; (define-key map "C" #'repeat-complex-command) ; C
+ ;; (define-key map "D" #'shell-command) ; D
+ ;; (define-key map "E" #'tpu-exit) ; E
+ ;; (define-key map "F" #'tpu-cursor-free-mode) ; F
+ ;; (define-key map "G" #'tpu-get) ; G
;; (define-key map "H" nil) ; H
- ;; (define-key map "I" 'tpu-include) ; I
- ;; (define-key map "K" 'tpu-kill-buffer) ; K
- (define-key map "L" 'tpu-what-line) ; L
- ;; (define-key map "M" 'buffer-menu) ; M
- ;; (define-key map "N" 'tpu-next-file-buffer) ; N
- ;; (define-key map "O" 'occur) ; O
- (define-key map "P" 'lpr-buffer) ; P
- ;; (define-key map "Q" 'tpu-quit) ; Q
- ;; (define-key map "R" 'tpu-toggle-rectangle) ; R
- ;; (define-key map "S" 'replace) ; S
- ;; (define-key map "T" 'tpu-line-to-top-of-window) ; T
- ;; (define-key map "U" 'undo) ; U
- ;; (define-key map "V" 'tpu-version) ; V
- ;; (define-key map "W" 'save-buffer) ; W
- ;; (define-key map "X" 'tpu-save-all-buffers-kill-emacs) ; X
- ;; (define-key map "Y" 'copy-region-as-kill) ; Y
- ;; (define-key map "Z" 'suspend-emacs) ; Z
- (define-key map "[" 'blink-matching-open) ; [
+ ;; (define-key map "I" #'tpu-include) ; I
+ ;; (define-key map "K" #'tpu-kill-buffer) ; K
+ (define-key map "L" #'tpu-what-line) ; L
+ ;; (define-key map "M" #'buffer-menu) ; M
+ ;; (define-key map "N" #'tpu-next-file-buffer) ; N
+ ;; (define-key map "O" #'occur) ; O
+ (define-key map "P" #'lpr-buffer) ; P
+ ;; (define-key map "Q" #'tpu-quit) ; Q
+ ;; (define-key map "R" #'tpu-toggle-rectangle) ; R
+ ;; (define-key map "S" #'replace) ; S
+ ;; (define-key map "T" #'tpu-line-to-top-of-window) ; T
+ ;; (define-key map "U" #'undo) ; U
+ ;; (define-key map "V" #'tpu-version) ; V
+ ;; (define-key map "W" #'save-buffer) ; W
+ ;; (define-key map "X" #'tpu-save-all-buffers-kill-emacs) ; X
+ ;; (define-key map "Y" #'copy-region-as-kill) ; Y
+ ;; (define-key map "Z" #'suspend-emacs) ; Z
+ (define-key map "[" #'blink-matching-open) ; [
;; (define-key map "\\" nil) ; \
- (define-key map "]" 'blink-matching-open) ; ]
- (define-key map "^" 'tpu-add-at-bol) ; ^
- (define-key map "_" 'split-window-below) ; -
- (define-key map "`" 'what-line) ; `
- (define-key map "a" 'tpu-toggle-newline-and-indent) ; a
- (define-key map "b" 'tpu-next-buffer) ; b
- (define-key map "c" 'repeat-complex-command) ; c
- (define-key map "d" 'shell-command) ; d
- (define-key map "e" 'tpu-exit) ; e
- (define-key map "f" 'tpu-cursor-free-mode) ; f
- (define-key map "g" 'tpu-get) ; g
+ (define-key map "]" #'blink-matching-open) ; ]
+ (define-key map "^" #'tpu-add-at-bol) ; ^
+ (define-key map "_" #'split-window-below) ; -
+ (define-key map "`" #'what-line) ; `
+ (define-key map "a" #'tpu-toggle-newline-and-indent) ; a
+ (define-key map "b" #'tpu-next-buffer) ; b
+ (define-key map "c" #'repeat-complex-command) ; c
+ (define-key map "d" #'shell-command) ; d
+ (define-key map "e" #'tpu-exit) ; e
+ (define-key map "f" #'tpu-cursor-free-mode) ; f
+ (define-key map "g" #'tpu-get) ; g
;; (define-key map "h" nil) ; h
- (define-key map "i" 'tpu-include) ; i
- (define-key map "k" 'tpu-kill-buffer) ; k
- (define-key map "l" 'goto-line) ; l
- (define-key map "m" 'buffer-menu) ; m
- (define-key map "n" 'tpu-next-file-buffer) ; n
- (define-key map "o" 'occur) ; o
- (define-key map "p" 'lpr-region) ; p
- (define-key map "q" 'tpu-quit) ; q
- (define-key map "r" 'tpu-toggle-rectangle) ; r
- (define-key map "s" 'replace) ; s
- (define-key map "t" 'tpu-line-to-top-of-window) ; t
- (define-key map "u" 'undo) ; u
- (define-key map "v" 'tpu-version) ; v
- (define-key map "w" 'save-buffer) ; w
- (define-key map "x" 'tpu-save-all-buffers-kill-emacs) ; x
- (define-key map "y" 'copy-region-as-kill) ; y
- (define-key map "z" 'suspend-emacs) ; z
+ (define-key map "i" #'tpu-include) ; i
+ (define-key map "k" #'tpu-kill-buffer) ; k
+ (define-key map "l" #'goto-line) ; l
+ (define-key map "m" #'buffer-menu) ; m
+ (define-key map "n" #'tpu-next-file-buffer) ; n
+ (define-key map "o" #'occur) ; o
+ (define-key map "p" #'lpr-region) ; p
+ (define-key map "q" #'tpu-quit) ; q
+ (define-key map "r" #'tpu-toggle-rectangle) ; r
+ (define-key map "s" #'replace) ; s
+ (define-key map "t" #'tpu-line-to-top-of-window) ; t
+ (define-key map "u" #'undo) ; u
+ (define-key map "v" #'tpu-version) ; v
+ (define-key map "w" #'save-buffer) ; w
+ (define-key map "x" #'tpu-save-all-buffers-kill-emacs) ; x
+ (define-key map "y" #'copy-region-as-kill) ; y
+ (define-key map "z" #'suspend-emacs) ; z
;; (define-key map "{" nil) ; {
- (define-key map "|" 'split-window-right) ; |
+ (define-key map "|" #'split-window-right) ; |
;; (define-key map "}" nil) ; }
- (define-key map "~" 'exchange-point-and-mark) ; ~
- (define-key map "\177" 'delete-window) ; <X]
+ (define-key map "~" #'exchange-point-and-mark) ; ~
+ (define-key map "\177" #'delete-window) ; <X]
map)
"Maps the function keys on the VT100 keyboard preceded by PF1.
GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
@@ -492,12 +489,12 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
;; Previously defined in CSI-map. We now presume that term/*.el does
;; its job to map the escape sequence to the right key-symbol.
- (define-key map [find] 'tpu-search) ; Find
- (define-key map [insert] 'tpu-paste) ; Insert Here
- (define-key map [delete] 'tpu-cut) ; Remove
- (define-key map [select] 'tpu-select) ; Select
- (define-key map [prior] 'tpu-scroll-window-down) ; Prev Screen
- (define-key map [next] 'tpu-scroll-window-up) ; Next Screen
+ (define-key map [find] #'tpu-search) ; Find
+ (define-key map [insert] #'tpu-paste) ; Insert Here
+ (define-key map [delete] #'tpu-cut) ; Remove
+ (define-key map [select] #'tpu-select) ; Select
+ (define-key map [prior] #'tpu-scroll-window-down) ; Prev Screen
+ (define-key map [next] #'tpu-scroll-window-up) ; Next Screen
;; (define-key map [f1] nil) ; F1
;; (define-key map [f2] nil) ; F2
@@ -508,14 +505,14 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
;; (define-key map [f7] nil) ; F7
;; (define-key map [f8] nil) ; F8
;; (define-key map [f9] nil) ; F9
- (define-key map [f10] 'tpu-exit) ; F10
- (define-key map [f11] 'tpu-insert-escape) ; F11 (ESC)
- (define-key map [f12] 'tpu-next-beginning-of-line) ; F12 (BS)
- (define-key map [f13] 'tpu-delete-previous-word) ; F13 (LF)
- (define-key map [f14] 'tpu-toggle-overwrite-mode) ; F14
- (define-key map [help] 'tpu-help) ; HELP
- (define-key map [menu] 'execute-extended-command) ; DO
- (define-key map [f17] 'tpu-goto-breadcrumb) ; F17
+ (define-key map [f10] #'tpu-exit) ; F10
+ (define-key map [f11] #'tpu-insert-escape) ; F11 (ESC)
+ (define-key map [f12] #'tpu-next-beginning-of-line) ; F12 (BS)
+ (define-key map [f13] #'tpu-delete-previous-word) ; F13 (LF)
+ (define-key map [f14] #'tpu-toggle-overwrite-mode) ; F14
+ (define-key map [help] #'tpu-help) ; HELP
+ (define-key map [menu] #'execute-extended-command) ; DO
+ (define-key map [f17] #'tpu-goto-breadcrumb) ; F17
;; (define-key map [f18] nil) ; F18
;; (define-key map [f19] nil) ; F19
;; (define-key map [f20] nil) ; F20
@@ -525,28 +522,28 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
;; its job to map the escape sequence to the right key-symbol.
(define-key map [kp-f1] tpu-gold-map) ; GOLD map
;;
- (define-key map [up] 'tpu-previous-line) ; up
- (define-key map [down] 'tpu-next-line) ; down
- (define-key map [right] 'tpu-forward-char) ; right
- (define-key map [left] 'tpu-backward-char) ; left
-
- (define-key map [kp-f2] 'tpu-help) ; PF2
- (define-key map [kp-f3] 'tpu-search-again) ; PF3
- (define-key map [kp-f4] 'tpu-delete-current-line) ; PF4
- (define-key map [kp-0] 'tpu-line) ; KP0
- (define-key map [kp-1] 'tpu-word) ; KP1
- (define-key map [kp-2] 'tpu-end-of-line) ; KP2
- (define-key map [kp-3] 'tpu-char) ; KP3
- (define-key map [kp-4] 'tpu-advance-direction) ; KP4
- (define-key map [kp-5] 'tpu-backup-direction) ; KP5
- (define-key map [kp-6] 'tpu-cut) ; KP6
- (define-key map [kp-7] 'tpu-page) ; KP7
- (define-key map [kp-8] 'tpu-scroll-window) ; KP8
- (define-key map [kp-9] 'tpu-append-region) ; KP9
- (define-key map [kp-subtract] 'tpu-delete-current-word) ; KP-
- (define-key map [kp-separator] 'tpu-delete-current-char) ; KP,
- (define-key map [kp-decimal] 'tpu-select) ; KP.
- (define-key map [kp-enter] 'newline) ; KPenter
+ (define-key map [up] #'tpu-previous-line) ; up
+ (define-key map [down] #'tpu-next-line) ; down
+ (define-key map [right] #'tpu-forward-char) ; right
+ (define-key map [left] #'tpu-backward-char) ; left
+
+ (define-key map [kp-f2] #'tpu-help) ; PF2
+ (define-key map [kp-f3] #'tpu-search-again) ; PF3
+ (define-key map [kp-f4] #'tpu-delete-current-line) ; PF4
+ (define-key map [kp-0] #'tpu-line) ; KP0
+ (define-key map [kp-1] #'tpu-word) ; KP1
+ (define-key map [kp-2] #'tpu-end-of-line) ; KP2
+ (define-key map [kp-3] #'tpu-char) ; KP3
+ (define-key map [kp-4] #'tpu-advance-direction) ; KP4
+ (define-key map [kp-5] #'tpu-backup-direction) ; KP5
+ (define-key map [kp-6] #'tpu-cut) ; KP6
+ (define-key map [kp-7] #'tpu-page) ; KP7
+ (define-key map [kp-8] #'tpu-scroll-window) ; KP8
+ (define-key map [kp-9] #'tpu-append-region) ; KP9
+ (define-key map [kp-subtract] #'tpu-delete-current-word) ; KP-
+ (define-key map [kp-separator] #'tpu-delete-current-char) ; KP,
+ (define-key map [kp-decimal] #'tpu-select) ; KP.
+ (define-key map [kp-enter] #'newline) ; KPenter
map)
"TPU-edt global keymap.")
@@ -883,7 +880,7 @@ With argument, fill and justify."
if no region is selected."
(interactive)
(let ((m (tpu-mark)))
- (apply 'ispell-region
+ (apply #'ispell-region
(if m
(if (> m (point)) (list (point) m)
(list m (point)))
@@ -970,14 +967,14 @@ and the total number of lines in the buffer."
;;;###autoload
(define-minor-mode tpu-edt-mode
"Toggle TPU/edt emulation on or off."
- :global t :group 'tpu
+ :global t
(if tpu-edt-mode (tpu-edt-on) (tpu-edt-off)))
-(defalias 'TPU-EDT-MODE 'tpu-edt-mode)
+(defalias 'TPU-EDT-MODE #'tpu-edt-mode)
;;;###autoload
-(defalias 'tpu-edt 'tpu-edt-on)
-(defalias 'TPU-EDT 'tpu-edt-on)
+(defalias 'tpu-edt #'tpu-edt-on)
+(defalias 'TPU-EDT #'tpu-edt-on)
;; Note: The following functions have no `tpu-' prefix. This is unavoidable.
;; The real TPU/edt editor has interactive commands with these names,
@@ -985,42 +982,42 @@ and the total number of lines in the buffer."
;; to work. Therefore it really is necessary to define these functions,
;; even in cases where they redefine existing Emacs functions.
-(defalias 'exit 'tpu-exit)
-(defalias 'EXIT 'tpu-exit)
+(defalias 'exit #'tpu-exit)
+(defalias 'EXIT #'tpu-exit)
-(defalias 'Get 'tpu-get)
-(defalias 'GET 'tpu-get)
+(defalias 'Get #'tpu-get)
+(defalias 'GET #'tpu-get)
-(defalias 'include 'tpu-include)
-(defalias 'INCLUDE 'tpu-include)
+(defalias 'include #'tpu-include)
+(defalias 'INCLUDE #'tpu-include)
-(defalias 'quit 'tpu-quit)
-(defalias 'QUIT 'tpu-quit)
+(defalias 'quit #'tpu-quit)
+(defalias 'QUIT #'tpu-quit)
-(defalias 'spell 'tpu-spell-check)
-(defalias 'SPELL 'tpu-spell-check)
+(defalias 'spell #'tpu-spell-check)
+(defalias 'SPELL #'tpu-spell-check)
-(defalias 'what\ line 'tpu-what-line)
-(defalias 'WHAT\ LINE 'tpu-what-line)
+(defalias 'what\ line #'tpu-what-line)
+(defalias 'WHAT\ LINE #'tpu-what-line)
-(defalias 'replace 'tpu-lm-replace)
-(defalias 'REPLACE 'tpu-lm-replace)
+(defalias 'replace #'tpu-lm-replace)
+(defalias 'REPLACE #'tpu-lm-replace)
-(defalias 'help 'tpu-help)
-(defalias 'HELP 'tpu-help)
+(defalias 'help #'tpu-help)
+(defalias 'HELP #'tpu-help)
-(defalias 'set\ cursor\ free 'tpu-set-cursor-free)
-(defalias 'SET\ CURSOR\ FREE 'tpu-set-cursor-free)
+(defalias 'set\ cursor\ free #'tpu-set-cursor-free)
+(defalias 'SET\ CURSOR\ FREE #'tpu-set-cursor-free)
-(defalias 'set\ cursor\ bound 'tpu-set-cursor-bound)
-(defalias 'SET\ CURSOR\ BOUND 'tpu-set-cursor-bound)
+(defalias 'set\ cursor\ bound #'tpu-set-cursor-bound)
+(defalias 'SET\ CURSOR\ BOUND #'tpu-set-cursor-bound)
-(defalias 'set\ scroll\ margins 'tpu-set-scroll-margins)
-(defalias 'SET\ SCROLL\ MARGINS 'tpu-set-scroll-margins)
+(defalias 'set\ scroll\ margins #'tpu-set-scroll-margins)
+(defalias 'SET\ SCROLL\ MARGINS #'tpu-set-scroll-margins)
;; Real TPU error messages end in periods.
;; Define this to avoid openly flouting Emacs coding standards.
-(defalias 'tpu-error 'error)
+(defalias 'tpu-error #'error)
;;;
@@ -1227,7 +1224,7 @@ and the total number of lines in the buffer."
"Bind a set of keystrokes to a single key, or key combination."
(interactive)
(setq tpu-saved-control-r (global-key-binding "\C-r"))
- (global-set-key "\C-r" 'tpu-end-define-macro-key)
+ (global-set-key "\C-r" #'tpu-end-define-macro-key)
(start-kbd-macro nil))
@@ -1361,18 +1358,18 @@ If an argument is specified, don't set the search direction."
(if (not arg) (setq tpu-searching-forward tpu-advance))
(cond (tpu-searching-forward
(cond (tpu-regexp-p
- (fset 'tpu-emacs-search 're-search-forward)
- (fset 'tpu-emacs-rev-search 're-search-backward))
+ (fset 'tpu-emacs-search #'re-search-forward)
+ (fset 'tpu-emacs-rev-search #'re-search-backward))
(t
- (fset 'tpu-emacs-search 'search-forward)
- (fset 'tpu-emacs-rev-search 'search-backward))))
+ (fset 'tpu-emacs-search #'search-forward)
+ (fset 'tpu-emacs-rev-search #'search-backward))))
(t
(cond (tpu-regexp-p
- (fset 'tpu-emacs-search 're-search-backward)
- (fset 'tpu-emacs-rev-search 're-search-forward))
+ (fset 'tpu-emacs-search #'re-search-backward)
+ (fset 'tpu-emacs-rev-search #'re-search-forward))
(t
- (fset 'tpu-emacs-search 'search-backward)
- (fset 'tpu-emacs-rev-search 'search-forward))))))
+ (fset 'tpu-emacs-search #'search-backward)
+ (fset 'tpu-emacs-rev-search #'search-forward))))))
(defun tpu-search-internal (pat &optional quiet)
"Search for a string or regular expression."
@@ -1418,9 +1415,9 @@ If an argument is specified, don't set the search direction."
;; if using regexp, eliminate upper case forms (\B \W \S.)
(if tpu-regexp-p
(let ((pat (copy-sequence string)) (case-fold-search nil) (pos 0))
- (while (setq pos (string-match "\\\\\\\\" pat)) (aset pat (+ 1 pos) ?.))
- (while (setq pos (string-match "\\\\B" pat)) (aset pat (+ 1 pos) ?.))
- (while (setq pos (string-match "\\\\W" pat)) (aset pat (+ 1 pos) ?.))
+ (while (setq pos (string-search "\\\\" pat)) (aset pat (+ 1 pos) ?.))
+ (while (setq pos (string-search "\\B" pat)) (aset pat (+ 1 pos) ?.))
+ (while (setq pos (string-search "\\W" pat)) (aset pat (+ 1 pos) ?.))
(while (setq pos (string-match "\\\\S." pat))
(aset pat (+ 1 pos) ?.) (aset pat (+ 2 pos) ?.))
(string-equal pat (downcase pat)))
@@ -2203,18 +2200,18 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
;; Standard Emacs settings under xterm in function-key-map map
;; "\eOM" to [kp-enter] and [kp-enter] to RET, but since the output of the map
;; is not fed back into the map, the key stays as kp-enter :-(.
-(define-key minibuffer-local-map [kp-enter] 'exit-minibuffer)
+(define-key minibuffer-local-map [kp-enter] #'exit-minibuffer)
;; These are not necessary because they are inherited.
;; (define-key minibuffer-local-ns-map [kp-enter] 'exit-minibuffer)
;; (define-key minibuffer-local-completion-map [kp-enter] 'exit-minibuffer)
-(define-key minibuffer-local-must-match-map [kp-enter] 'minibuffer-complete-and-exit)
+(define-key minibuffer-local-must-match-map [kp-enter] #'minibuffer-complete-and-exit)
;;;
;;; Minibuffer map additions to set search direction
;;;
-(define-key minibuffer-local-map [kp-4] 'tpu-search-forward-exit) ;KP4
-(define-key minibuffer-local-map [kp-5] 'tpu-search-backward-exit) ;KP5
+(define-key minibuffer-local-map [kp-4] #'tpu-search-forward-exit) ;KP4
+(define-key minibuffer-local-map [kp-5] #'tpu-search-backward-exit) ;KP5
;;;
@@ -2223,19 +2220,19 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
(defvar tpu-control-keys-map
(let ((map (make-sparse-keymap)))
- (define-key map "\C-\\" 'quoted-insert) ; ^\
- (define-key map "\C-a" 'tpu-toggle-overwrite-mode) ; ^A
- (define-key map "\C-b" 'repeat-complex-command) ; ^B
- (define-key map "\C-e" 'tpu-current-end-of-line) ; ^E
- (define-key map "\C-h" 'tpu-next-beginning-of-line) ; ^H (BS)
- (define-key map "\C-j" 'tpu-delete-previous-word) ; ^J (LF)
- (define-key map "\C-k" 'tpu-define-macro-key) ; ^K
- (define-key map "\C-l" 'tpu-insert-formfeed) ; ^L (FF)
- (define-key map "\C-r" 'recenter) ; ^R
- (define-key map "\C-u" 'tpu-delete-to-bol) ; ^U
- (define-key map "\C-v" 'tpu-quoted-insert) ; ^V
- (define-key map "\C-w" 'redraw-display) ; ^W
- (define-key map "\C-z" 'tpu-exit) ; ^Z
+ (define-key map "\C-\\" #'quoted-insert) ; ^\
+ (define-key map "\C-a" #'tpu-toggle-overwrite-mode) ; ^A
+ (define-key map "\C-b" #'repeat-complex-command) ; ^B
+ (define-key map "\C-e" #'tpu-current-end-of-line) ; ^E
+ (define-key map "\C-h" #'tpu-next-beginning-of-line) ; ^H (BS)
+ (define-key map "\C-j" #'tpu-delete-previous-word) ; ^J (LF)
+ (define-key map "\C-k" #'tpu-define-macro-key) ; ^K
+ (define-key map "\C-l" #'tpu-insert-formfeed) ; ^L (FF)
+ (define-key map "\C-r" #'recenter) ; ^R
+ (define-key map "\C-u" #'tpu-delete-to-bol) ; ^U
+ (define-key map "\C-v" #'tpu-quoted-insert) ; ^V
+ (define-key map "\C-w" #'redraw-display) ; ^W
+ (define-key map "\C-z" #'tpu-exit) ; ^Z
map))
(defun tpu-set-control-keys ()
@@ -2285,18 +2282,18 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
(defun tpu-arrow-history nil
"Modify minibuffer maps to use arrows for history recall."
(interactive)
- (dolist (cur (where-is-internal 'tpu-previous-line))
- (define-key read-expression-map cur 'tpu-previous-history-element)
- (define-key minibuffer-local-map cur 'tpu-previous-history-element)
+ (dolist (cur (where-is-internal #'tpu-previous-line))
+ (define-key read-expression-map cur #'tpu-previous-history-element)
+ (define-key minibuffer-local-map cur #'tpu-previous-history-element)
;; These are inherited anyway. --Stef
;; (define-key minibuffer-local-ns-map cur 'tpu-previous-history-element)
;; (define-key minibuffer-local-completion-map cur 'tpu-previous-history-element)
;; (define-key minibuffer-local-must-match-map cur 'tpu-previous-history-element)
)
- (dolist (cur (where-is-internal 'tpu-next-line))
- (define-key read-expression-map cur 'tpu-next-history-element)
- (define-key minibuffer-local-map cur 'tpu-next-history-element)
+ (dolist (cur (where-is-internal #'tpu-next-line))
+ (define-key read-expression-map cur #'tpu-next-history-element)
+ (define-key minibuffer-local-map cur #'tpu-next-history-element)
;; These are inherited anyway. --Stef
;; (define-key minibuffer-local-ns-map cur 'tpu-next-history-element)
;; (define-key minibuffer-local-completion-map cur 'tpu-next-history-element)
@@ -2382,7 +2379,7 @@ If FILE is nil, try to load a default file. The default file names are
(use-global-map global-map)
;; Then do the normal TPU setup.
(transient-mark-mode t)
- (add-hook 'post-command-hook 'tpu-search-highlight)
+ (add-hook 'post-command-hook #'tpu-search-highlight)
(tpu-set-mode-line t)
(tpu-advance-direction)
;; set page delimiter, display line truncation, and scrolling like TPU
@@ -2406,7 +2403,7 @@ If FILE is nil, try to load a default file. The default file names are
"Turn off TPU/edt emulation. Note that the keypad is left on."
(interactive)
(tpu-reset-control-keys nil)
- (remove-hook 'post-command-hook 'tpu-search-highlight)
+ (remove-hook 'post-command-hook #'tpu-search-highlight)
(tpu-set-mode-line nil)
(while tpu-edt-old-global-values
(let ((varval (pop tpu-edt-old-global-values)))
diff --git a/lisp/obsolete/tpu-extras.el b/lisp/obsolete/tpu-extras.el
index 10b9c893721..f375e05d8ac 100644
--- a/lisp/obsolete/tpu-extras.el
+++ b/lisp/obsolete/tpu-extras.el
@@ -1,4 +1,4 @@
-;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt
+;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt -*- lexical-binding: t; -*-
;; Copyright (C) 1993-1995, 2000-2021 Free Software Foundation, Inc.
@@ -144,12 +144,12 @@ the previous line when starting from a line beginning."
;;; Hooks -- Set cursor free in picture mode.
;;; Clean up when writing a file from cursor free mode.
-(add-hook 'picture-mode-hook 'tpu-set-cursor-free)
+(add-hook 'picture-mode-hook #'tpu-set-cursor-free)
(defun tpu-trim-line-ends-if-needed ()
"Eliminate whitespace at ends of lines, if the cursor is free."
(if (and (buffer-modified-p) tpu-cursor-free-mode) (tpu-trim-line-ends)))
-(add-hook 'before-save-hook 'tpu-trim-line-ends-if-needed)
+(add-hook 'before-save-hook #'tpu-trim-line-ends-if-needed)
;;; Utility routines for implementing scroll margins
@@ -368,34 +368,22 @@ A repeat count means scroll that many sections."
(and (< (point) top) (recenter (min beg top-margin))))))
;; Advise the newline, newline-and-indent, and do-auto-fill functions.
-(defadvice newline (around tpu-respect-bottom-scroll-margin activate disable)
+(defun tpu--respect-bottom-scroll-margin (orig-fun &optional &rest args)
"Respect `tpu-bottom-scroll-margin'."
(let ((beg (tpu-current-line))
- (num (prefix-numeric-value (ad-get-arg 0))))
- ad-do-it
+ (num (prefix-numeric-value (car args))))
+ (apply orig-fun args)
(tpu-bottom-check beg num)))
-(defadvice newline-and-indent (around tpu-respect-bottom-scroll-margin)
- "Respect `tpu-bottom-scroll-margin'."
- (let ((beg (tpu-current-line)))
- ad-do-it
- (tpu-bottom-check beg 1)))
-
-(defadvice do-auto-fill (around tpu-respect-bottom-scroll-margin)
- "Respect `tpu-bottom-scroll-margin'."
- (let ((beg (tpu-current-line)))
- ad-do-it
- (tpu-bottom-check beg 1)))
-
-
;;; Function to set scroll margins
;;;###autoload
-(defun tpu-set-scroll-margins (top bottom)
+(defun tpu-set-scroll-margins (top bottom &optional emit-msg)
"Set scroll margins."
(interactive
"sEnter top scroll margin (N lines or N%% or RETURN for current value): \
-\nsEnter bottom scroll margin (N lines or N%% or RETURN for current value): ")
+\nsEnter bottom scroll margin (N lines or N%% or RETURN for current value): \
+\np")
;; set top scroll margin
(or (string= top "")
(setq tpu-top-scroll-margin
@@ -411,10 +399,9 @@ A repeat count means scroll that many sections."
(/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
(window-height)))))
(dolist (f '(newline newline-and-indent do-auto-fill))
- (ad-enable-advice f 'around 'tpu-respect-bottom-scroll-margin)
- (ad-activate f))
+ (advice-add f :around #'tpu--respect-bottom-scroll-margin))
;; report scroll margin settings if running interactively
- (and (called-interactively-p 'interactive)
+ (and emit-msg
(message "Scroll margins set. Top = %s%%, Bottom = %s%%"
tpu-top-scroll-margin tpu-bottom-scroll-margin)))
diff --git a/lisp/obsolete/tpu-mapper.el b/lisp/obsolete/tpu-mapper.el
index 2735820ae49..5ae0a6558d5 100644
--- a/lisp/obsolete/tpu-mapper.el
+++ b/lisp/obsolete/tpu-mapper.el
@@ -1,4 +1,4 @@
-;;; tpu-mapper.el --- create a TPU-edt X-windows keymap file
+;;; tpu-mapper.el --- create a TPU-edt X-windows keymap file -*- lexical-binding: t; -*-
;; Copyright (C) 1993-1995, 2001-2021 Free Software Foundation, Inc.
@@ -69,7 +69,7 @@
;;;###autoload
(defun tpu-mapper ()
- "Create an Emacs lisp file defining the TPU-edt keypad for X-windows.
+ "Create an Emacs Lisp file defining the TPU-edt keypad for X-windows.
This command displays an instruction screen showing the TPU-edt keypad
and asks you to press the TPU-edt editing keys. It uses the keys you
diff --git a/lisp/obsolete/url-ns.el b/lisp/obsolete/url-ns.el
index fff3be95453..6cd6693fc43 100644
--- a/lisp/obsolete/url-ns.el
+++ b/lisp/obsolete/url-ns.el
@@ -1,4 +1,4 @@
-;;; url-ns.el --- Various netscape-ish functions for proxy definitions
+;;; url-ns.el --- Various netscape-ish functions for proxy definitions -*- lexical-binding: t; -*-
;; Copyright (C) 1997-1999, 2004-2021 Free Software Foundation, Inc.
@@ -31,7 +31,7 @@
;;;###autoload
(defun isPlainHostName (host)
- (not (string-match "\\." host)))
+ (not (string-search "." host)))
;;;###autoload
(defun dnsDomainIs (host dom)
@@ -55,9 +55,9 @@
(if (or (/= (length netc) (length ipc))
(/= (length ipc) (length maskc)))
nil
- (setq netc (mapcar 'string-to-number netc)
- ipc (mapcar 'string-to-number ipc)
- maskc (mapcar 'string-to-number maskc))
+ (setq netc (mapcar #'string-to-number netc)
+ ipc (mapcar #'string-to-number ipc)
+ maskc (mapcar #'string-to-number maskc))
(and
(= (logand (nth 0 netc) (nth 0 maskc))
(logand (nth 0 ipc) (nth 0 maskc)))
@@ -79,24 +79,23 @@
(if (not (and (file-exists-p file)
(file-readable-p file)))
(message "Could not open %s for reading" file)
- (save-excursion
- (let ((false nil)
- (true t))
- (setq url-ns-user-prefs (make-hash-table :size 13 :test 'equal))
- (set-buffer (get-buffer-create " *ns-parse*"))
- (erase-buffer)
- (insert-file-contents file)
- (goto-char (point-min))
- (while (re-search-forward "^//" nil t)
- (replace-match ";;"))
- (goto-char (point-min))
- (while (re-search-forward "^user_pref(" nil t)
- (replace-match "(url-ns-set-user-pref "))
- (goto-char (point-min))
- (while (re-search-forward "\"," nil t)
- (replace-match "\""))
- (goto-char (point-min))
- (eval-buffer)))))
+ (setq url-ns-user-prefs (make-hash-table :size 13 :test 'equal))
+ (with-current-buffer (get-buffer-create " *ns-parse*")
+ (erase-buffer)
+ (insert-file-contents file)
+ (goto-char (point-min))
+ (while (re-search-forward "^//" nil t)
+ (replace-match ";;"))
+ (goto-char (point-min))
+ (while (re-search-forward "^user_pref(" nil t)
+ (replace-match "(url-ns-set-user-pref "))
+ (goto-char (point-min))
+ (while (re-search-forward "\"," nil t)
+ (replace-match "\""))
+ (goto-char (point-min))
+ (with-suppressed-warnings ((lexical true false))
+ (dlet ((false nil) (true t))
+ (eval-buffer))))))
(defun url-ns-set-user-pref (key val)
(puthash key val url-ns-user-prefs))
diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el
index 80a2094d804..cfbf981d3c8 100644
--- a/lisp/obsolete/vc-arch.el
+++ b/lisp/obsolete/vc-arch.el
@@ -26,7 +26,7 @@
;; The home page of the Arch version control system is at
;;
-;; http://www.gnuarch.org/
+;; https://www.gnu.org/software/gnu-arch/
;;
;; This is derived from vc-mcvs.el as follows:
;; - cp vc-mcvs.el vc-arch.el and then M-% mcvs RET arch RET
@@ -81,8 +81,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "23.1"
- :group 'vc-arch)
+ :version "23.1")
(define-obsolete-variable-alias 'vc-arch-command 'vc-arch-program "23.1")
@@ -92,8 +91,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(setq candidates (cdr candidates)))
(or (car candidates) "tla"))
"Name of the Arch executable."
- :type 'string
- :group 'vc-arch)
+ :type 'string)
;; Clear up the cache to force vc-call to check again and discover
;; new functions when we reload this file.
@@ -341,7 +339,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
("--" . permissions-changed)
("-/" . permissions-changed) ;directory
))
- (state-map-regexp (regexp-opt (mapcar 'car state-map) t))
+ (state-map-regexp (regexp-opt (mapcar #'car state-map) t))
(entry-regexp (concat "^" state-map-regexp " \\(.*\\)$"))
result)
(goto-char (point-min))
@@ -387,8 +385,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
(defcustom vc-arch-mode-line-rewrite
'(("\\`.*--\\(.*--.*\\)--\\(v?\\).*-\\([0-9]+\\)\\'" . "\\2\\3[\\1]"))
"Rewrite rules to shorten Arch's revision names on the mode-line."
- :type '(repeat (cons regexp string))
- :group 'vc-arch)
+ :type '(repeat (cons regexp string)))
(defun vc-arch-mode-line-string (file)
"Return a string for `vc-mode-line' to put in the mode line for FILE."
@@ -420,7 +417,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
;; The .rej file is obsolete.
(condition-case nil (delete-file rej) (error nil))
;; Remove the hook so that it is not called multiple times.
- (remove-hook 'after-save-hook 'vc-arch-delete-rej-if-obsolete t))))))
+ (remove-hook 'after-save-hook #'vc-arch-delete-rej-if-obsolete t))))))
(defun vc-arch-find-file-hook ()
(let ((rej (concat buffer-file-name ".rej")))
@@ -433,7 +430,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
(condition-case nil (delete-file rej) (error nil))
(smerge-mode 1)
(add-hook 'after-save-hook
- 'vc-arch-delete-rej-if-obsolete nil t)
+ #'vc-arch-delete-rej-if-obsolete nil t)
(message "There are unresolved conflicts in this file")))
(message "There are unresolved conflicts in %s"
(file-name-nondirectory rej))))))
@@ -488,11 +485,11 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
(defun vc-arch-rename-file (old new)
(vc-arch-command nil 0 new "mv" (file-relative-name old)))
-(defalias 'vc-arch-responsible-p 'vc-arch-root)
+(defalias 'vc-arch-responsible-p #'vc-arch-root)
(defun vc-arch-command (buffer okstatus file &rest flags)
"A wrapper around `vc-do-command' for use in vc-arch.el."
- (apply 'vc-do-command (or buffer "*vc*") okstatus vc-arch-program file flags))
+ (apply #'vc-do-command (or buffer "*vc*") okstatus vc-arch-program file flags))
;;; Completion of versions and revisions.
@@ -571,7 +568,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
(when (string-match "-\\([0-9]+\\)\\'" f)
(cons (string-to-number (match-string 1 f)) f)))
(directory-files dir nil nil 'nosort)))
- 'car-less-than-car))
+ #'car-less-than-car))
(subdirs nil))
(when (cddr revs)
(dotimes (_i (/ (length revs) 2))
@@ -600,26 +597,26 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
(let* ((archives (directory-files rl-dir 'full
directory-files-no-dot-files-regexp))
(categories
- (apply 'append
+ (apply #'append
(mapcar (lambda (dir)
(when (file-directory-p dir)
(directory-files
dir 'full directory-files-no-dot-files-regexp)))
archives)))
(branches
- (apply 'append
+ (apply #'append
(mapcar (lambda (dir)
(when (file-directory-p dir)
(directory-files
dir 'full directory-files-no-dot-files-regexp)))
categories)))
(versions
- (apply 'append
+ (apply #'append
(mapcar (lambda (dir)
(when (file-directory-p dir)
(directory-files dir 'full "--.*--")))
branches))))
- (mapc 'vc-arch-trim-one-revlib versions))
+ (mapc #'vc-arch-trim-one-revlib versions))
))
(defvar vc-arch-extra-menu-map
diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el
index eee00b43a26..91baa4d28ef 100644
--- a/lisp/obsolete/vi.el
+++ b/lisp/obsolete/vi.el
@@ -1,4 +1,4 @@
-;;; vi.el --- major mode for emulating "vi" editor under GNU Emacs
+;;; vi.el --- major mode for emulating "vi" editor under GNU Emacs -*- lexical-binding: t; -*-
;; This file is in the public domain because the authors distributed it
;; without a copyright notice before the US signed the Bern Convention.
@@ -48,7 +48,7 @@
(defvar vi-mode-old-case-fold)
(if (null (where-is-internal 'vi-switch-mode (current-local-map)))
- (define-key ctl-x-map "~" 'vi-switch-mode))
+ (define-key ctl-x-map "~" #'vi-switch-mode))
(defvar vi-tilde-map nil
"Keymap used for \\[vi-switch-mode] prefix key. Link to various major modes.")
@@ -56,24 +56,24 @@
(if vi-tilde-map
nil
(setq vi-tilde-map (make-keymap))
- (define-key vi-tilde-map "a" 'abbrev-mode)
- (define-key vi-tilde-map "c" 'c-mode)
- (define-key vi-tilde-map "d" 'vi-debugging)
- (define-key vi-tilde-map "e" 'emacs-lisp-mode)
- (define-key vi-tilde-map "f" 'auto-fill-mode)
- (define-key vi-tilde-map "g" 'prolog-mode)
- (define-key vi-tilde-map "h" 'hanoi)
- (define-key vi-tilde-map "i" 'info-mode)
- (define-key vi-tilde-map "l" 'lisp-mode)
- (define-key vi-tilde-map "n" 'nroff-mode)
- (define-key vi-tilde-map "o" 'overwrite-mode)
- (define-key vi-tilde-map "O" 'outline-mode)
- (define-key vi-tilde-map "P" 'picture-mode)
- (define-key vi-tilde-map "r" 'vi-readonly-mode)
- (define-key vi-tilde-map "t" 'text-mode)
- (define-key vi-tilde-map "v" 'vi-mode)
- (define-key vi-tilde-map "x" 'tex-mode)
- (define-key vi-tilde-map "~" 'vi-back-to-old-mode))
+ (define-key vi-tilde-map "a" #'abbrev-mode)
+ (define-key vi-tilde-map "c" #'c-mode)
+ (define-key vi-tilde-map "d" #'vi-debugging)
+ (define-key vi-tilde-map "e" #'emacs-lisp-mode)
+ (define-key vi-tilde-map "f" #'auto-fill-mode)
+ (define-key vi-tilde-map "g" #'prolog-mode)
+ (define-key vi-tilde-map "h" #'hanoi)
+ ;; (define-key vi-tilde-map "i" #'info-mode)
+ (define-key vi-tilde-map "l" #'lisp-mode)
+ (define-key vi-tilde-map "n" #'nroff-mode)
+ (define-key vi-tilde-map "o" #'overwrite-mode)
+ (define-key vi-tilde-map "O" #'outline-mode)
+ (define-key vi-tilde-map "P" #'picture-mode)
+ (define-key vi-tilde-map "r" #'vi-readonly-mode)
+ (define-key vi-tilde-map "t" #'text-mode)
+ (define-key vi-tilde-map "v" #'vi-mode)
+ (define-key vi-tilde-map "x" #'tex-mode)
+ (define-key vi-tilde-map "~" #'vi-back-to-old-mode))
(defun vi-switch-mode (arg mode-char)
"Switch the major mode of current buffer as specified by the following char \\{vi-tilde-map}"
@@ -123,143 +123,143 @@ command extensions.")
(put 'vi-undefined 'suppress-keymap t)
(if vi-com-map nil
(setq vi-com-map (make-keymap))
-;;(fillarray vi-com-map 'vi-undefined)
- (define-key vi-com-map "\C-@" 'vi-mark-region) ; extension
- (define-key vi-com-map "\C-a" 'vi-ask-for-info) ; extension
- (define-key vi-com-map "\C-b" 'vi-backward-windowful)
- (define-key vi-com-map "\C-c" 'vi-do-old-mode-C-c-command) ; extension
- (define-key vi-com-map "\C-d" 'vi-scroll-down-window)
- (define-key vi-com-map "\C-e" 'vi-expose-line-below)
- (define-key vi-com-map "\C-f" 'vi-forward-windowful)
- (define-key vi-com-map "\C-g" 'keyboard-quit)
- (define-key vi-com-map "\C-i" 'indent-relative-first-indent-point) ; TAB
- (define-key vi-com-map "\C-j" 'vi-next-line) ; LFD
- (define-key vi-com-map "\C-k" 'vi-kill-line) ; extension
- (define-key vi-com-map "\C-l" 'recenter)
- (define-key vi-com-map "\C-m" 'vi-next-line-first-nonwhite) ; RET
- (define-key vi-com-map "\C-n" 'vi-next-line)
- (define-key vi-com-map "\C-o" 'vi-split-open-line)
- (define-key vi-com-map "\C-p" 'previous-line)
- (define-key vi-com-map "\C-q" 'vi-query-replace) ; extension
- (define-key vi-com-map "\C-r" 'vi-isearch-backward) ; modification
- (define-key vi-com-map "\C-s" 'vi-isearch-forward) ; extension
- (define-key vi-com-map "\C-t" 'vi-transpose-objects) ; extension
- (define-key vi-com-map "\C-u" 'vi-scroll-up-window)
- (define-key vi-com-map "\C-v" 'scroll-up-command) ; extension
- (define-key vi-com-map "\C-w" 'vi-kill-region) ; extension
+;;(fillarray vi-com-map #'vi-undefined)
+ (define-key vi-com-map "\C-@" #'vi-mark-region) ; extension
+ (define-key vi-com-map "\C-a" #'vi-ask-for-info) ; extension
+ (define-key vi-com-map "\C-b" #'vi-backward-windowful)
+ (define-key vi-com-map "\C-c" #'vi-do-old-mode-C-c-command) ; extension
+ (define-key vi-com-map "\C-d" #'vi-scroll-down-window)
+ (define-key vi-com-map "\C-e" #'vi-expose-line-below)
+ (define-key vi-com-map "\C-f" #'vi-forward-windowful)
+ (define-key vi-com-map "\C-g" #'keyboard-quit)
+ (define-key vi-com-map "\C-i" #'indent-relative-first-indent-point) ; TAB
+ (define-key vi-com-map "\C-j" #'vi-next-line) ; LFD
+ (define-key vi-com-map "\C-k" #'vi-kill-line) ; extension
+ (define-key vi-com-map "\C-l" #'recenter)
+ (define-key vi-com-map "\C-m" #'vi-next-line-first-nonwhite) ; RET
+ (define-key vi-com-map "\C-n" #'vi-next-line)
+ (define-key vi-com-map "\C-o" #'vi-split-open-line)
+ (define-key vi-com-map "\C-p" #'previous-line)
+ (define-key vi-com-map "\C-q" #'vi-query-replace) ; extension
+ (define-key vi-com-map "\C-r" #'vi-isearch-backward) ; modification
+ (define-key vi-com-map "\C-s" #'vi-isearch-forward) ; extension
+ (define-key vi-com-map "\C-t" #'vi-transpose-objects) ; extension
+ (define-key vi-com-map "\C-u" #'vi-scroll-up-window)
+ (define-key vi-com-map "\C-v" #'scroll-up-command) ; extension
+ (define-key vi-com-map "\C-w" #'vi-kill-region) ; extension
(define-key vi-com-map "\C-x" 'Control-X-prefix) ; extension
- (define-key vi-com-map "\C-y" 'vi-expose-line-above)
- (define-key vi-com-map "\C-z" 'suspend-emacs)
+ (define-key vi-com-map "\C-y" #'vi-expose-line-above)
+ (define-key vi-com-map "\C-z" #'suspend-emacs)
(define-key vi-com-map "\e" 'ESC-prefix); C-[ (ESC)
- (define-key vi-com-map "\C-\\" 'vi-unimplemented)
- (define-key vi-com-map "\C-]" 'find-tag)
- (define-key vi-com-map "\C-^" 'vi-locate-def) ; extension
- (define-key vi-com-map "\C-_" 'vi-undefined)
-
- (define-key vi-com-map " " 'forward-char)
- (define-key vi-com-map "!" 'vi-operator)
- (define-key vi-com-map "\"" 'vi-char-argument)
- (define-key vi-com-map "#" 'universal-argument) ; extension
- (define-key vi-com-map "$" 'end-of-line)
- (define-key vi-com-map "%" 'vi-find-matching-paren)
- (define-key vi-com-map "&" 'vi-unimplemented)
- (define-key vi-com-map "'" 'vi-goto-line-mark)
- (define-key vi-com-map "(" 'backward-sexp)
- (define-key vi-com-map ")" 'forward-sexp)
- (define-key vi-com-map "*" 'vi-name-last-change-or-macro) ; extension
- (define-key vi-com-map "+" 'vi-next-line-first-nonwhite)
- (define-key vi-com-map "," 'vi-reverse-last-find-char)
- (define-key vi-com-map "-" 'vi-previous-line-first-nonwhite)
- (define-key vi-com-map "." 'vi-redo-last-change-command)
- (define-key vi-com-map "/" 'vi-search-forward)
- (define-key vi-com-map "0" 'beginning-of-line)
-
- (define-key vi-com-map "1" 'vi-digit-argument)
- (define-key vi-com-map "2" 'vi-digit-argument)
- (define-key vi-com-map "3" 'vi-digit-argument)
- (define-key vi-com-map "4" 'vi-digit-argument)
- (define-key vi-com-map "5" 'vi-digit-argument)
- (define-key vi-com-map "6" 'vi-digit-argument)
- (define-key vi-com-map "7" 'vi-digit-argument)
- (define-key vi-com-map "8" 'vi-digit-argument)
- (define-key vi-com-map "9" 'vi-digit-argument)
-
- (define-key vi-com-map ":" 'vi-ex-cmd)
- (define-key vi-com-map ";" 'vi-repeat-last-find-char)
- (define-key vi-com-map "<" 'vi-operator)
- (define-key vi-com-map "=" 'vi-operator)
- (define-key vi-com-map ">" 'vi-operator)
- (define-key vi-com-map "?" 'vi-search-backward)
- (define-key vi-com-map "@" 'vi-call-named-change-or-macro) ; extension
-
- (define-key vi-com-map "A" 'vi-append-at-end-of-line)
- (define-key vi-com-map "B" 'vi-backward-blank-delimited-word)
- (define-key vi-com-map "C" 'vi-change-rest-of-line)
- (define-key vi-com-map "D" 'vi-kill-line)
- (define-key vi-com-map "E" 'vi-end-of-blank-delimited-word)
- (define-key vi-com-map "F" 'vi-backward-find-char)
- (define-key vi-com-map "G" 'vi-goto-line)
- (define-key vi-com-map "H" 'vi-home-window-line)
- (define-key vi-com-map "I" 'vi-insert-before-first-nonwhite)
- (define-key vi-com-map "J" 'vi-join-lines)
- (define-key vi-com-map "K" 'vi-undefined)
- (define-key vi-com-map "L" 'vi-last-window-line)
- (define-key vi-com-map "M" 'vi-middle-window-line)
- (define-key vi-com-map "N" 'vi-reverse-last-search)
- (define-key vi-com-map "O" 'vi-open-above)
- (define-key vi-com-map "P" 'vi-put-before)
- (define-key vi-com-map "Q" 'vi-quote-words) ; extension
- (define-key vi-com-map "R" 'vi-replace-chars)
- (define-key vi-com-map "S" 'vi-substitute-lines)
- (define-key vi-com-map "T" 'vi-backward-upto-char)
- (define-key vi-com-map "U" 'vi-unimplemented)
- (define-key vi-com-map "V" 'vi-undefined)
- (define-key vi-com-map "W" 'vi-forward-blank-delimited-word)
- (define-key vi-com-map "X" 'call-last-kbd-macro) ; modification/extension
- (define-key vi-com-map "Y" 'vi-yank-line)
+ (define-key vi-com-map "\C-\\" #'vi-unimplemented)
+ (define-key vi-com-map "\C-]" #'xref-find-definitions)
+ (define-key vi-com-map "\C-^" #'vi-locate-def) ; extension
+ (define-key vi-com-map "\C-_" #'vi-undefined)
+
+ (define-key vi-com-map " " #'forward-char)
+ (define-key vi-com-map "!" #'vi-operator)
+ (define-key vi-com-map "\"" #'vi-char-argument)
+ (define-key vi-com-map "#" #'universal-argument) ; extension
+ (define-key vi-com-map "$" #'end-of-line)
+ (define-key vi-com-map "%" #'vi-find-matching-paren)
+ (define-key vi-com-map "&" #'vi-unimplemented)
+ (define-key vi-com-map "'" #'vi-goto-line-mark)
+ (define-key vi-com-map "(" #'backward-sexp)
+ (define-key vi-com-map ")" #'forward-sexp)
+ (define-key vi-com-map "*" #'vi-name-last-change-or-macro) ; extension
+ (define-key vi-com-map "+" #'vi-next-line-first-nonwhite)
+ (define-key vi-com-map "," #'vi-reverse-last-find-char)
+ (define-key vi-com-map "-" #'vi-previous-line-first-nonwhite)
+ (define-key vi-com-map "." #'vi-redo-last-change-command)
+ (define-key vi-com-map "/" #'vi-search-forward)
+ (define-key vi-com-map "0" #'beginning-of-line)
+
+ (define-key vi-com-map "1" #'vi-digit-argument)
+ (define-key vi-com-map "2" #'vi-digit-argument)
+ (define-key vi-com-map "3" #'vi-digit-argument)
+ (define-key vi-com-map "4" #'vi-digit-argument)
+ (define-key vi-com-map "5" #'vi-digit-argument)
+ (define-key vi-com-map "6" #'vi-digit-argument)
+ (define-key vi-com-map "7" #'vi-digit-argument)
+ (define-key vi-com-map "8" #'vi-digit-argument)
+ (define-key vi-com-map "9" #'vi-digit-argument)
+
+ (define-key vi-com-map ":" #'vi-ex-cmd)
+ (define-key vi-com-map ";" #'vi-repeat-last-find-char)
+ (define-key vi-com-map "<" #'vi-operator)
+ (define-key vi-com-map "=" #'vi-operator)
+ (define-key vi-com-map ">" #'vi-operator)
+ (define-key vi-com-map "?" #'vi-search-backward)
+ (define-key vi-com-map "@" #'vi-call-named-change-or-macro) ; extension
+
+ (define-key vi-com-map "A" #'vi-append-at-end-of-line)
+ (define-key vi-com-map "B" #'vi-backward-blank-delimited-word)
+ (define-key vi-com-map "C" #'vi-change-rest-of-line)
+ (define-key vi-com-map "D" #'vi-kill-line)
+ (define-key vi-com-map "E" #'vi-end-of-blank-delimited-word)
+ (define-key vi-com-map "F" #'vi-backward-find-char)
+ (define-key vi-com-map "G" #'vi-goto-line)
+ (define-key vi-com-map "H" #'vi-home-window-line)
+ (define-key vi-com-map "I" #'vi-insert-before-first-nonwhite)
+ (define-key vi-com-map "J" #'vi-join-lines)
+ (define-key vi-com-map "K" #'vi-undefined)
+ (define-key vi-com-map "L" #'vi-last-window-line)
+ (define-key vi-com-map "M" #'vi-middle-window-line)
+ (define-key vi-com-map "N" #'vi-reverse-last-search)
+ (define-key vi-com-map "O" #'vi-open-above)
+ (define-key vi-com-map "P" #'vi-put-before)
+ (define-key vi-com-map "Q" #'vi-quote-words) ; extension
+ (define-key vi-com-map "R" #'vi-replace-chars)
+ (define-key vi-com-map "S" #'vi-substitute-lines)
+ (define-key vi-com-map "T" #'vi-backward-upto-char)
+ (define-key vi-com-map "U" #'vi-unimplemented)
+ (define-key vi-com-map "V" #'vi-undefined)
+ (define-key vi-com-map "W" #'vi-forward-blank-delimited-word)
+ (define-key vi-com-map "X" #'call-last-kbd-macro) ; modification/extension
+ (define-key vi-com-map "Y" #'vi-yank-line)
(define-key vi-com-map "Z" (make-sparse-keymap)) ;allow below prefix command
- (define-key vi-com-map "ZZ" 'vi-save-all-and-exit)
-
- (define-key vi-com-map "[" 'vi-unimplemented)
- (define-key vi-com-map "\\" 'vi-operator) ; extension for vi-narrow-op
- (define-key vi-com-map "]" 'vi-unimplemented)
- (define-key vi-com-map "^" 'back-to-indentation)
- (define-key vi-com-map "_" 'vi-undefined)
- (define-key vi-com-map "`" 'vi-goto-char-mark)
-
- (define-key vi-com-map "a" 'vi-insert-after)
- (define-key vi-com-map "b" 'backward-word)
- (define-key vi-com-map "c" 'vi-operator)
- (define-key vi-com-map "d" 'vi-operator)
- (define-key vi-com-map "e" 'vi-end-of-word)
- (define-key vi-com-map "f" 'vi-forward-find-char)
- (define-key vi-com-map "g" 'vi-beginning-of-buffer) ; extension
- (define-key vi-com-map "h" 'backward-char)
- (define-key vi-com-map "i" 'vi-insert-before)
- (define-key vi-com-map "j" 'vi-next-line)
- (define-key vi-com-map "k" 'previous-line)
- (define-key vi-com-map "l" 'forward-char)
- (define-key vi-com-map "m" 'vi-set-mark)
- (define-key vi-com-map "n" 'vi-repeat-last-search)
- (define-key vi-com-map "o" 'vi-open-below)
- (define-key vi-com-map "p" 'vi-put-after)
- (define-key vi-com-map "q" 'vi-replace)
- (define-key vi-com-map "r" 'vi-replace-1-char)
- (define-key vi-com-map "s" 'vi-substitute-chars)
- (define-key vi-com-map "t" 'vi-forward-upto-char)
- (define-key vi-com-map "u" 'undo)
- (define-key vi-com-map "v" 'vi-verify-spelling)
- (define-key vi-com-map "w" 'vi-forward-word)
- (define-key vi-com-map "x" 'vi-kill-char)
- (define-key vi-com-map "y" 'vi-operator)
- (define-key vi-com-map "z" 'vi-adjust-window)
-
- (define-key vi-com-map "{" 'backward-paragraph)
- (define-key vi-com-map "|" 'vi-goto-column)
- (define-key vi-com-map "}" 'forward-paragraph)
- (define-key vi-com-map "~" 'vi-change-case)
- (define-key vi-com-map "\177" 'delete-backward-char))
+ (define-key vi-com-map "ZZ" #'vi-save-all-and-exit)
+
+ (define-key vi-com-map "[" #'vi-unimplemented)
+ (define-key vi-com-map "\\" #'vi-operator) ; extension for vi-narrow-op
+ (define-key vi-com-map "]" #'vi-unimplemented)
+ (define-key vi-com-map "^" #'back-to-indentation)
+ (define-key vi-com-map "_" #'vi-undefined)
+ (define-key vi-com-map "`" #'vi-goto-char-mark)
+
+ (define-key vi-com-map "a" #'vi-insert-after)
+ (define-key vi-com-map "b" #'backward-word)
+ (define-key vi-com-map "c" #'vi-operator)
+ (define-key vi-com-map "d" #'vi-operator)
+ (define-key vi-com-map "e" #'vi-end-of-word)
+ (define-key vi-com-map "f" #'vi-forward-find-char)
+ (define-key vi-com-map "g" #'vi-beginning-of-buffer) ; extension
+ (define-key vi-com-map "h" #'backward-char)
+ (define-key vi-com-map "i" #'vi-insert-before)
+ (define-key vi-com-map "j" #'vi-next-line)
+ (define-key vi-com-map "k" #'previous-line)
+ (define-key vi-com-map "l" #'forward-char)
+ (define-key vi-com-map "m" #'vi-set-mark)
+ (define-key vi-com-map "n" #'vi-repeat-last-search)
+ (define-key vi-com-map "o" #'vi-open-below)
+ (define-key vi-com-map "p" #'vi-put-after)
+ (define-key vi-com-map "q" #'vi-replace)
+ (define-key vi-com-map "r" #'vi-replace-1-char)
+ (define-key vi-com-map "s" #'vi-substitute-chars)
+ (define-key vi-com-map "t" #'vi-forward-upto-char)
+ (define-key vi-com-map "u" #'undo)
+ (define-key vi-com-map "v" #'vi-verify-spelling)
+ (define-key vi-com-map "w" #'vi-forward-word)
+ (define-key vi-com-map "x" #'vi-kill-char)
+ (define-key vi-com-map "y" #'vi-operator)
+ (define-key vi-com-map "z" #'vi-adjust-window)
+
+ (define-key vi-com-map "{" #'backward-paragraph)
+ (define-key vi-com-map "|" #'vi-goto-column)
+ (define-key vi-com-map "}" #'forward-paragraph)
+ (define-key vi-com-map "~" #'vi-change-case)
+ (define-key vi-com-map "\177" #'delete-backward-char))
(put 'backward-char 'point-moving-unit 'char)
(put 'vi-next-line 'point-moving-unit 'line)
@@ -1182,7 +1182,7 @@ SPECIAL FEATURE: char argument can be used to specify shift amount(1-9)."
(defun vi-narrow-op (motion-command arg)
"Narrow to region specified by MOTION-COMMAND with ARG."
(let* ((range (vi-effective-range motion-command arg))
- (begin (car range)) (end (cdr range)) reg)
+ (begin (car range)) (end (cdr range)))
(if (= begin end)
nil ; point not moved, abort op
(narrow-to-region begin end))))
diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el
index 08085e51d74..16906b68a67 100644
--- a/lisp/obsolete/vip.el
+++ b/lisp/obsolete/vip.el
@@ -1,4 +1,4 @@
-;;; vip.el --- a VI Package for GNU Emacs
+;;; vip.el --- a VI Package for GNU Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2021 Free Software
;; Foundation, Inc.
@@ -95,13 +95,11 @@
(defcustom vip-shift-width 8
"The number of columns shifted by > and < command."
- :type 'integer
- :group 'vip)
+ :type 'integer)
(defcustom vip-re-replace nil
"If t then do regexp replace, if nil then do string replace."
- :type 'boolean
- :group 'vip)
+ :type 'boolean)
(defvar vip-d-char nil
"The character remembered by the vi \"r\" command.")
@@ -120,13 +118,11 @@
(defcustom vip-search-wrap-around t
"If t, search wraps around."
- :type 'boolean
- :group 'vip)
+ :type 'boolean)
(defcustom vip-re-search nil
"If t, search is reg-exp search, otherwise vanilla search."
- :type 'boolean
- :group 'vip)
+ :type 'boolean)
(defvar vip-s-string nil
"Last vip search string.")
@@ -136,24 +132,20 @@
(defcustom vip-case-fold-search nil
"If t, search ignores cases."
- :type 'boolean
- :group 'vip)
+ :type 'boolean)
(defcustom vip-re-query-replace nil
"If t then do regexp replace, if nil then do string replace."
- :type 'boolean
- :group 'vip)
+ :type 'boolean)
(defcustom vip-open-with-indent nil
"If t, indent when open a new line."
- :type 'boolean
- :group 'vip)
+ :type 'boolean)
(defcustom vip-help-in-insert-mode nil
"If t then C-h is bound to help-command in insert mode.
If nil then it is bound to `delete-backward-char'."
- :type 'boolean
- :group 'vip)
+ :type 'boolean)
(defvar vip-quote-string "> "
"String inserted at the beginning of region.")
@@ -169,131 +161,131 @@ If nil then it is bound to `delete-backward-char'."
(defvar vip-mode-map
(let ((map (make-keymap)))
- (define-key map "\C-a" 'beginning-of-line)
- (define-key map "\C-b" 'vip-scroll-back)
- (define-key map "\C-c" 'vip-ctl-c)
- (define-key map "\C-d" 'vip-scroll-up)
- (define-key map "\C-e" 'vip-scroll-up-one)
- (define-key map "\C-f" 'vip-scroll)
- (define-key map "\C-g" 'vip-keyboard-quit)
- (define-key map "\C-h" 'help-command)
- (define-key map "\C-m" 'vip-scroll-back)
- (define-key map "\C-n" 'vip-other-window)
- (define-key map "\C-o" 'vip-open-line-at-point)
- (define-key map "\C-u" 'vip-scroll-down)
- (define-key map "\C-x" 'vip-ctl-x)
- (define-key map "\C-y" 'vip-scroll-down-one)
- (define-key map "\C-z" 'vip-change-mode-to-emacs)
- (define-key map "\e" 'vip-ESC)
-
- (define-key map [?\S-\ ] 'vip-scroll-back)
- (define-key map " " 'vip-scroll)
- (define-key map "!" 'vip-command-argument)
- (define-key map "\"" 'vip-command-argument)
- (define-key map "#" 'vip-command-argument)
- (define-key map "$" 'vip-goto-eol)
- (define-key map "%" 'vip-paren-match)
- (define-key map "&" 'vip-nil)
- (define-key map "'" 'vip-goto-mark-and-skip-white)
- (define-key map "(" 'vip-backward-sentence)
- (define-key map ")" 'vip-forward-sentence)
- (define-key map "*" 'call-last-kbd-macro)
- (define-key map "+" 'vip-next-line-at-bol)
- (define-key map "," 'vip-repeat-find-opposite)
- (define-key map "-" 'vip-previous-line-at-bol)
- (define-key map "." 'vip-repeat)
- (define-key map "/" 'vip-search-forward)
-
- (define-key map "0" 'vip-beginning-of-line)
- (define-key map "1" 'vip-digit-argument)
- (define-key map "2" 'vip-digit-argument)
- (define-key map "3" 'vip-digit-argument)
- (define-key map "4" 'vip-digit-argument)
- (define-key map "5" 'vip-digit-argument)
- (define-key map "6" 'vip-digit-argument)
- (define-key map "7" 'vip-digit-argument)
- (define-key map "8" 'vip-digit-argument)
- (define-key map "9" 'vip-digit-argument)
-
- (define-key map ":" 'vip-ex)
- (define-key map ";" 'vip-repeat-find)
- (define-key map "<" 'vip-command-argument)
- (define-key map "=" 'vip-command-argument)
- (define-key map ">" 'vip-command-argument)
- (define-key map "?" 'vip-search-backward)
- (define-key map "@" 'vip-nil)
-
- (define-key map "A" 'vip-Append)
- (define-key map "B" 'vip-backward-Word)
- (define-key map "C" 'vip-ctl-c-equivalent)
- (define-key map "D" 'vip-kill-line)
- (define-key map "E" 'vip-end-of-Word)
- (define-key map "F" 'vip-find-char-backward)
- (define-key map "G" 'vip-goto-line)
- (define-key map "H" 'vip-window-top)
- (define-key map "I" 'vip-Insert)
- (define-key map "J" 'vip-join-lines)
- (define-key map "K" 'vip-kill-buffer)
- (define-key map "L" 'vip-window-bottom)
- (define-key map "M" 'vip-window-middle)
- (define-key map "N" 'vip-search-Next)
- (define-key map "O" 'vip-Open-line)
- (define-key map "P" 'vip-Put-back)
- (define-key map "Q" 'vip-query-replace)
- (define-key map "R" 'vip-replace-string)
- (define-key map "S" 'vip-switch-to-buffer-other-window)
- (define-key map "T" 'vip-goto-char-backward)
- (define-key map "U" 'vip-nil)
- (define-key map "V" 'vip-find-file-other-window)
- (define-key map "W" 'vip-forward-Word)
- (define-key map "X" 'vip-ctl-x-equivalent)
- (define-key map "Y" 'vip-yank-line)
- (define-key map "ZZ" 'save-buffers-kill-emacs)
-
- (define-key map "[" 'vip-nil)
- (define-key map "\\" 'vip-escape-to-emacs)
- (define-key map "]" 'vip-nil)
- (define-key map "^" 'vip-bol-and-skip-white)
- (define-key map "_" 'vip-nil)
- (define-key map "`" 'vip-goto-mark)
-
- (define-key map "a" 'vip-append)
- (define-key map "b" 'vip-backward-word)
- (define-key map "c" 'vip-command-argument)
- (define-key map "d" 'vip-command-argument)
- (define-key map "e" 'vip-end-of-word)
- (define-key map "f" 'vip-find-char-forward)
- (define-key map "g" 'vip-info-on-file)
- (define-key map "h" 'vip-backward-char)
- (define-key map "i" 'vip-insert)
- (define-key map "j" 'vip-next-line)
- (define-key map "k" 'vip-previous-line)
- (define-key map "l" 'vip-forward-char)
- (define-key map "m" 'vip-mark-point)
- (define-key map "n" 'vip-search-next)
- (define-key map "o" 'vip-open-line)
- (define-key map "p" 'vip-put-back)
- (define-key map "q" 'vip-nil)
- (define-key map "r" 'vip-replace-char)
- (define-key map "s" 'vip-switch-to-buffer)
- (define-key map "t" 'vip-goto-char-forward)
- (define-key map "u" 'vip-undo)
- (define-key map "v" 'vip-find-file)
- (define-key map "w" 'vip-forward-word)
- (define-key map "x" 'vip-delete-char)
- (define-key map "y" 'vip-command-argument)
- (define-key map "zH" 'vip-line-to-top)
- (define-key map "zM" 'vip-line-to-middle)
- (define-key map "zL" 'vip-line-to-bottom)
- (define-key map "z\C-m" 'vip-line-to-top)
- (define-key map "z." 'vip-line-to-middle)
- (define-key map "z-" 'vip-line-to-bottom)
-
- (define-key map "{" 'vip-backward-paragraph)
- (define-key map "|" 'vip-goto-col)
- (define-key map "}" 'vip-forward-paragraph)
- (define-key map "~" 'vip-nil)
- (define-key map "\177" 'vip-delete-backward-char)
+ (define-key map "\C-a" #'beginning-of-line)
+ (define-key map "\C-b" #'vip-scroll-back)
+ (define-key map "\C-c" #'vip-ctl-c)
+ (define-key map "\C-d" #'vip-scroll-up)
+ (define-key map "\C-e" #'vip-scroll-up-one)
+ (define-key map "\C-f" #'vip-scroll)
+ (define-key map "\C-g" #'vip-keyboard-quit)
+ (define-key map "\C-h" #'help-command)
+ (define-key map "\C-m" #'vip-scroll-back)
+ (define-key map "\C-n" #'vip-other-window)
+ (define-key map "\C-o" #'vip-open-line-at-point)
+ (define-key map "\C-u" #'vip-scroll-down)
+ (define-key map "\C-x" #'vip-ctl-x)
+ (define-key map "\C-y" #'vip-scroll-down-one)
+ (define-key map "\C-z" #'vip-change-mode-to-emacs)
+ (define-key map "\e" #'vip-ESC)
+
+ (define-key map [?\S-\ ] #'vip-scroll-back)
+ (define-key map " " #'vip-scroll)
+ (define-key map "!" #'vip-command-argument)
+ (define-key map "\"" #'vip-command-argument)
+ (define-key map "#" #'vip-command-argument)
+ (define-key map "$" #'vip-goto-eol)
+ (define-key map "%" #'vip-paren-match)
+ (define-key map "&" #'vip-nil)
+ (define-key map "'" #'vip-goto-mark-and-skip-white)
+ (define-key map "(" #'vip-backward-sentence)
+ (define-key map ")" #'vip-forward-sentence)
+ (define-key map "*" #'call-last-kbd-macro)
+ (define-key map "+" #'vip-next-line-at-bol)
+ (define-key map "," #'vip-repeat-find-opposite)
+ (define-key map "-" #'vip-previous-line-at-bol)
+ (define-key map "." #'vip-repeat)
+ (define-key map "/" #'vip-search-forward)
+
+ (define-key map "0" #'vip-beginning-of-line)
+ (define-key map "1" #'vip-digit-argument)
+ (define-key map "2" #'vip-digit-argument)
+ (define-key map "3" #'vip-digit-argument)
+ (define-key map "4" #'vip-digit-argument)
+ (define-key map "5" #'vip-digit-argument)
+ (define-key map "6" #'vip-digit-argument)
+ (define-key map "7" #'vip-digit-argument)
+ (define-key map "8" #'vip-digit-argument)
+ (define-key map "9" #'vip-digit-argument)
+
+ (define-key map ":" #'vip-ex)
+ (define-key map ";" #'vip-repeat-find)
+ (define-key map "<" #'vip-command-argument)
+ (define-key map "=" #'vip-command-argument)
+ (define-key map ">" #'vip-command-argument)
+ (define-key map "?" #'vip-search-backward)
+ (define-key map "@" #'vip-nil)
+
+ (define-key map "A" #'vip-Append)
+ (define-key map "B" #'vip-backward-Word)
+ (define-key map "C" #'vip-ctl-c-equivalent)
+ (define-key map "D" #'vip-kill-line)
+ (define-key map "E" #'vip-end-of-Word)
+ (define-key map "F" #'vip-find-char-backward)
+ (define-key map "G" #'vip-goto-line)
+ (define-key map "H" #'vip-window-top)
+ (define-key map "I" #'vip-Insert)
+ (define-key map "J" #'vip-join-lines)
+ (define-key map "K" #'vip-kill-buffer)
+ (define-key map "L" #'vip-window-bottom)
+ (define-key map "M" #'vip-window-middle)
+ (define-key map "N" #'vip-search-Next)
+ (define-key map "O" #'vip-Open-line)
+ (define-key map "P" #'vip-Put-back)
+ (define-key map "Q" #'vip-query-replace)
+ (define-key map "R" #'vip-replace-string)
+ (define-key map "S" #'vip-switch-to-buffer-other-window)
+ (define-key map "T" #'vip-goto-char-backward)
+ (define-key map "U" #'vip-nil)
+ (define-key map "V" #'vip-find-file-other-window)
+ (define-key map "W" #'vip-forward-Word)
+ (define-key map "X" #'vip-ctl-x-equivalent)
+ (define-key map "Y" #'vip-yank-line)
+ (define-key map "ZZ" #'save-buffers-kill-emacs)
+
+ (define-key map "[" #'vip-nil)
+ (define-key map "\\" #'vip-escape-to-emacs)
+ (define-key map "]" #'vip-nil)
+ (define-key map "^" #'vip-bol-and-skip-white)
+ (define-key map "_" #'vip-nil)
+ (define-key map "`" #'vip-goto-mark)
+
+ (define-key map "a" #'vip-append)
+ (define-key map "b" #'vip-backward-word)
+ (define-key map "c" #'vip-command-argument)
+ (define-key map "d" #'vip-command-argument)
+ (define-key map "e" #'vip-end-of-word)
+ (define-key map "f" #'vip-find-char-forward)
+ (define-key map "g" #'vip-info-on-file)
+ (define-key map "h" #'vip-backward-char)
+ (define-key map "i" #'vip-insert)
+ (define-key map "j" #'vip-next-line)
+ (define-key map "k" #'vip-previous-line)
+ (define-key map "l" #'vip-forward-char)
+ (define-key map "m" #'vip-mark-point)
+ (define-key map "n" #'vip-search-next)
+ (define-key map "o" #'vip-open-line)
+ (define-key map "p" #'vip-put-back)
+ (define-key map "q" #'vip-nil)
+ (define-key map "r" #'vip-replace-char)
+ (define-key map "s" #'vip-switch-to-buffer)
+ (define-key map "t" #'vip-goto-char-forward)
+ (define-key map "u" #'vip-undo)
+ (define-key map "v" #'vip-find-file)
+ (define-key map "w" #'vip-forward-word)
+ (define-key map "x" #'vip-delete-char)
+ (define-key map "y" #'vip-command-argument)
+ (define-key map "zH" #'vip-line-to-top)
+ (define-key map "zM" #'vip-line-to-middle)
+ (define-key map "zL" #'vip-line-to-bottom)
+ (define-key map "z\C-m" #'vip-line-to-top)
+ (define-key map "z." #'vip-line-to-middle)
+ (define-key map "z-" #'vip-line-to-bottom)
+
+ (define-key map "{" #'vip-backward-paragraph)
+ (define-key map "|" #'vip-goto-col)
+ (define-key map "}" #'vip-forward-paragraph)
+ (define-key map "~" #'vip-nil)
+ (define-key map "\177" #'vip-delete-backward-char)
map))
(defun vip-version ()
@@ -306,8 +298,8 @@ If nil then it is bound to `delete-backward-char'."
;;;###autoload
(defun vip-setup ()
"Set up bindings for C-x 7 and C-z that are useful for VIP users."
- (define-key ctl-x-map "7" 'vip-buffer-in-two-windows)
- (global-set-key "\C-z" 'vip-change-mode-to-vi))
+ (define-key ctl-x-map "7" #'vip-buffer-in-two-windows)
+ (global-set-key "\C-z" #'vip-change-mode-to-vi))
(defmacro vip-loop (count body)
"(COUNT BODY) Execute BODY COUNT times."
@@ -375,13 +367,13 @@ No message."
vip-emacs-local-map)))
(vip-change-mode-line "Insert")
(use-local-map vip-insert-local-map)
- (define-key vip-insert-local-map "\e" 'vip-change-mode-to-vi)
- (define-key vip-insert-local-map "\C-z" 'vip-ESC)
+ (define-key vip-insert-local-map "\e" #'vip-change-mode-to-vi)
+ (define-key vip-insert-local-map "\C-z" #'vip-ESC)
(define-key vip-insert-local-map "\C-h"
- (if vip-help-in-insert-mode 'help-command
- 'delete-backward-char))
+ (if vip-help-in-insert-mode #'help-command
+ #'delete-backward-char))
(define-key vip-insert-local-map "\C-w"
- 'vip-delete-backward-word))
+ #'vip-delete-backward-word))
((eq new-mode 'emacs-mode)
(vip-change-mode-line "Emacs:")
(use-local-map vip-emacs-local-map)))
@@ -461,13 +453,13 @@ Type `n' to quit this window for now.\n")
ARG is used as the prefix value for the executed command. If
EVENTS is a list of events, which become the beginning of the command."
(interactive "P")
- (let (com key (old-map (current-local-map)))
+ (let (com (old-map (current-local-map)))
(if events (setq unread-command-events
(append events unread-command-events)))
(setq prefix-arg arg)
(use-local-map vip-emacs-local-map)
(unwind-protect
- (setq com (key-binding (setq key (read-key-sequence nil))))
+ (setq com (key-binding (read-key-sequence nil)))
(use-local-map old-map))
(command-execute com prefix-arg)
(setq prefix-arg nil) ;; reset prefix arg
@@ -617,7 +609,7 @@ obtained so far, and COM is the command part obtained so far."
(defun vip-command-argument (arg)
"Accept a motion command as an argument."
(interactive "P")
- (condition-case conditions
+ (condition-case nil
(vip-prefix-arg-com
last-command-event
(cond ((null arg) nil)
@@ -918,11 +910,11 @@ each line in the region."
(defun vip-read-string (prompt &optional init)
(setq vip-save-minibuffer-local-map (copy-keymap minibuffer-local-map))
- (define-key minibuffer-local-map "\C-h" 'backward-char)
- (define-key minibuffer-local-map "\C-w" 'backward-word)
- (define-key minibuffer-local-map "\e" 'exit-minibuffer)
+ (define-key minibuffer-local-map "\C-h" #'backward-char)
+ (define-key minibuffer-local-map "\C-w" #'backward-word)
+ (define-key minibuffer-local-map "\e" #'exit-minibuffer)
(let (str)
- (condition-case conditions
+ (condition-case nil
(setq str (read-string prompt init))
(quit
(setq minibuffer-local-map vip-save-minibuffer-local-map)
@@ -2651,7 +2643,7 @@ a token has type \(command, address, end-mark) and value."
(progn
(with-output-to-temp-buffer " *delete text*"
(princ (buffer-substring (point) (mark))))
- (condition-case conditions
+ (condition-case nil
(vip-read-string "[Hit return to continue] ")
(quit
(save-excursion (kill-buffer " *delete text*"))
@@ -2759,7 +2751,7 @@ a token has type \(command, address, end-mark) and value."
(progn
(with-output-to-temp-buffer " *text*"
(princ (buffer-substring (point) (mark))))
- (condition-case conditions
+ (condition-case nil
(progn
(vip-read-string "[Hit return to continue] ")
(ex-line-subr com (point) (mark)))
@@ -2829,12 +2821,9 @@ a token has type \(command, address, end-mark) and value."
(define-key ex-map char
(or (lookup-key vip-mode-map char) 'vip-nil)))
(define-key vip-mode-map char
- (eval
- (list 'quote
- (cons 'lambda
- (list '(count)
- '(interactive "p")
- (list 'execute-kbd-macro string 'count))))))))
+ (lambda (count)
+ (interactive "p")
+ (execute-kbd-macro string count)))))
(defun ex-unmap ()
"ex unmap"
@@ -2892,10 +2881,7 @@ a token has type \(command, address, end-mark) and value."
(with-no-warnings
(insert-file file)))))
-(defun ex-set ()
- (eval (list 'setq
- (read-variable "Variable: ")
- (eval (read-minibuffer "Value: ")))))
+(defalias 'ex-set #'set-variable)
(defun ex-shell ()
"ex shell"
@@ -2935,7 +2921,7 @@ vip-s-string"
(setq ex-addresses (cons (car ex-addresses) ex-addresses)))))
;(setq G opt-g)
(let ((beg (car ex-addresses)) (end (car (cdr ex-addresses)))
- (cont t) eol-mark)
+ eol-mark) ;;(cont t)
(save-excursion
(vip-enlarge-region beg end)
(let ((limit (save-excursion
diff --git a/lisp/obsolete/ws-mode.el b/lisp/obsolete/ws-mode.el
index d1ced86c468..235a1d7e43d 100644
--- a/lisp/obsolete/ws-mode.el
+++ b/lisp/obsolete/ws-mode.el
@@ -41,144 +41,144 @@
(defvar wordstar-C-k-map
(let ((map (make-keymap)))
(define-key map " " ())
- (define-key map "0" 'ws-set-marker-0)
- (define-key map "1" 'ws-set-marker-1)
- (define-key map "2" 'ws-set-marker-2)
- (define-key map "3" 'ws-set-marker-3)
- (define-key map "4" 'ws-set-marker-4)
- (define-key map "5" 'ws-set-marker-5)
- (define-key map "6" 'ws-set-marker-6)
- (define-key map "7" 'ws-set-marker-7)
- (define-key map "8" 'ws-set-marker-8)
- (define-key map "9" 'ws-set-marker-9)
- (define-key map "b" 'ws-begin-block)
- (define-key map "\C-b" 'ws-begin-block)
- (define-key map "c" 'ws-copy-block)
- (define-key map "\C-c" 'ws-copy-block)
- (define-key map "d" 'save-buffers-kill-emacs)
- (define-key map "\C-d" 'save-buffers-kill-emacs)
- (define-key map "f" 'find-file)
- (define-key map "\C-f" 'find-file)
- (define-key map "h" 'ws-show-markers)
- (define-key map "\C-h" 'ws-show-markers)
- (define-key map "i" 'ws-indent-block)
- (define-key map "\C-i" 'ws-indent-block)
- (define-key map "k" 'ws-end-block)
- (define-key map "\C-k" 'ws-end-block)
- (define-key map "p" 'ws-print-block)
- (define-key map "\C-p" 'ws-print-block)
- (define-key map "q" 'kill-emacs)
- (define-key map "\C-q" 'kill-emacs)
- (define-key map "r" 'insert-file)
- (define-key map "\C-r" 'insert-file)
- (define-key map "s" 'save-some-buffers)
- (define-key map "\C-s" 'save-some-buffers)
- (define-key map "t" 'ws-mark-word)
- (define-key map "\C-t" 'ws-mark-word)
- (define-key map "u" 'ws-exdent-block)
- (define-key map "\C-u" 'keyboard-quit)
- (define-key map "v" 'ws-move-block)
- (define-key map "\C-v" 'ws-move-block)
- (define-key map "w" 'ws-write-block)
- (define-key map "\C-w" 'ws-write-block)
- (define-key map "x" 'save-buffers-kill-emacs)
- (define-key map "\C-x" 'save-buffers-kill-emacs)
- (define-key map "y" 'ws-delete-block)
- (define-key map "\C-y" 'ws-delete-block)
+ (define-key map "0" #'ws-set-marker-0)
+ (define-key map "1" #'ws-set-marker-1)
+ (define-key map "2" #'ws-set-marker-2)
+ (define-key map "3" #'ws-set-marker-3)
+ (define-key map "4" #'ws-set-marker-4)
+ (define-key map "5" #'ws-set-marker-5)
+ (define-key map "6" #'ws-set-marker-6)
+ (define-key map "7" #'ws-set-marker-7)
+ (define-key map "8" #'ws-set-marker-8)
+ (define-key map "9" #'ws-set-marker-9)
+ (define-key map "b" #'ws-begin-block)
+ (define-key map "\C-b" #'ws-begin-block)
+ (define-key map "c" #'ws-copy-block)
+ (define-key map "\C-c" #'ws-copy-block)
+ (define-key map "d" #'save-buffers-kill-emacs)
+ (define-key map "\C-d" #'save-buffers-kill-emacs)
+ (define-key map "f" #'find-file)
+ (define-key map "\C-f" #'find-file)
+ (define-key map "h" #'ws-show-markers)
+ (define-key map "\C-h" #'ws-show-markers)
+ (define-key map "i" #'ws-indent-block)
+ (define-key map "\C-i" #'ws-indent-block)
+ (define-key map "k" #'ws-end-block)
+ (define-key map "\C-k" #'ws-end-block)
+ (define-key map "p" #'ws-print-block)
+ (define-key map "\C-p" #'ws-print-block)
+ (define-key map "q" #'kill-emacs)
+ (define-key map "\C-q" #'kill-emacs)
+ (define-key map "r" #'insert-file)
+ (define-key map "\C-r" #'insert-file)
+ (define-key map "s" #'save-some-buffers)
+ (define-key map "\C-s" #'save-some-buffers)
+ (define-key map "t" #'ws-mark-word)
+ (define-key map "\C-t" #'ws-mark-word)
+ (define-key map "u" #'ws-exdent-block)
+ (define-key map "\C-u" #'keyboard-quit)
+ (define-key map "v" #'ws-move-block)
+ (define-key map "\C-v" #'ws-move-block)
+ (define-key map "w" #'ws-write-block)
+ (define-key map "\C-w" #'ws-write-block)
+ (define-key map "x" #'save-buffers-kill-emacs)
+ (define-key map "\C-x" #'save-buffers-kill-emacs)
+ (define-key map "y" #'ws-delete-block)
+ (define-key map "\C-y" #'ws-delete-block)
map))
(defvar wordstar-C-o-map
(let ((map (make-keymap)))
(define-key map " " ())
- (define-key map "c" 'wordstar-center-line)
- (define-key map "\C-c" 'wordstar-center-line)
- (define-key map "b" 'switch-to-buffer)
- (define-key map "\C-b" 'switch-to-buffer)
- (define-key map "j" 'justify-current-line)
- (define-key map "\C-j" 'justify-current-line)
- (define-key map "k" 'kill-buffer)
- (define-key map "\C-k" 'kill-buffer)
- (define-key map "l" 'list-buffers)
- (define-key map "\C-l" 'list-buffers)
- (define-key map "m" 'auto-fill-mode)
- (define-key map "\C-m" 'auto-fill-mode)
- (define-key map "r" 'set-fill-column)
- (define-key map "\C-r" 'set-fill-column)
- (define-key map "\C-u" 'keyboard-quit)
- (define-key map "wd" 'delete-other-windows)
- (define-key map "wh" 'split-window-right)
- (define-key map "wo" 'other-window)
- (define-key map "wv" 'split-window-below)
+ (define-key map "c" #'wordstar-center-line)
+ (define-key map "\C-c" #'wordstar-center-line)
+ (define-key map "b" #'switch-to-buffer)
+ (define-key map "\C-b" #'switch-to-buffer)
+ (define-key map "j" #'justify-current-line)
+ (define-key map "\C-j" #'justify-current-line)
+ (define-key map "k" #'kill-buffer)
+ (define-key map "\C-k" #'kill-buffer)
+ (define-key map "l" #'list-buffers)
+ (define-key map "\C-l" #'list-buffers)
+ (define-key map "m" #'auto-fill-mode)
+ (define-key map "\C-m" #'auto-fill-mode)
+ (define-key map "r" #'set-fill-column)
+ (define-key map "\C-r" #'set-fill-column)
+ (define-key map "\C-u" #'keyboard-quit)
+ (define-key map "wd" #'delete-other-windows)
+ (define-key map "wh" #'split-window-right)
+ (define-key map "wo" #'other-window)
+ (define-key map "wv" #'split-window-below)
map))
(defvar wordstar-C-q-map
(let ((map (make-keymap)))
(define-key map " " ())
- (define-key map "0" 'ws-find-marker-0)
- (define-key map "1" 'ws-find-marker-1)
- (define-key map "2" 'ws-find-marker-2)
- (define-key map "3" 'ws-find-marker-3)
- (define-key map "4" 'ws-find-marker-4)
- (define-key map "5" 'ws-find-marker-5)
- (define-key map "6" 'ws-find-marker-6)
- (define-key map "7" 'ws-find-marker-7)
- (define-key map "8" 'ws-find-marker-8)
- (define-key map "9" 'ws-find-marker-9)
- (define-key map "a" 'ws-query-replace)
- (define-key map "\C-a" 'ws-query-replace)
- (define-key map "b" 'ws-goto-block-begin)
- (define-key map "\C-b" 'ws-goto-block-begin)
- (define-key map "c" 'end-of-buffer)
- (define-key map "\C-c" 'end-of-buffer)
- (define-key map "d" 'end-of-line)
- (define-key map "\C-d" 'end-of-line)
- (define-key map "f" 'ws-search)
- (define-key map "\C-f" 'ws-search)
- (define-key map "k" 'ws-goto-block-end)
- (define-key map "\C-k" 'ws-goto-block-end)
- (define-key map "l" 'ws-undo)
- (define-key map "\C-l" 'ws-undo)
- (define-key map "p" 'ws-last-cursorp)
- (define-key map "\C-p" 'ws-last-cursorp)
- (define-key map "r" 'beginning-of-buffer)
- (define-key map "\C-r" 'beginning-of-buffer)
- (define-key map "s" 'beginning-of-line)
- (define-key map "\C-s" 'beginning-of-line)
- (define-key map "\C-u" 'keyboard-quit)
- (define-key map "w" 'ws-last-error)
- (define-key map "\C-w" 'ws-last-error)
- (define-key map "y" 'ws-kill-eol)
- (define-key map "\C-y" 'ws-kill-eol)
- (define-key map "\177" 'ws-kill-bol)
+ (define-key map "0" #'ws-find-marker-0)
+ (define-key map "1" #'ws-find-marker-1)
+ (define-key map "2" #'ws-find-marker-2)
+ (define-key map "3" #'ws-find-marker-3)
+ (define-key map "4" #'ws-find-marker-4)
+ (define-key map "5" #'ws-find-marker-5)
+ (define-key map "6" #'ws-find-marker-6)
+ (define-key map "7" #'ws-find-marker-7)
+ (define-key map "8" #'ws-find-marker-8)
+ (define-key map "9" #'ws-find-marker-9)
+ (define-key map "a" #'ws-query-replace)
+ (define-key map "\C-a" #'ws-query-replace)
+ (define-key map "b" #'ws-goto-block-begin)
+ (define-key map "\C-b" #'ws-goto-block-begin)
+ (define-key map "c" #'end-of-buffer)
+ (define-key map "\C-c" #'end-of-buffer)
+ (define-key map "d" #'end-of-line)
+ (define-key map "\C-d" #'end-of-line)
+ (define-key map "f" #'ws-search)
+ (define-key map "\C-f" #'ws-search)
+ (define-key map "k" #'ws-goto-block-end)
+ (define-key map "\C-k" #'ws-goto-block-end)
+ (define-key map "l" #'ws-undo)
+ (define-key map "\C-l" #'ws-undo)
+ ;; (define-key map "p" #'ws-last-cursorp)
+ ;; (define-key map "\C-p" #'ws-last-cursorp)
+ (define-key map "r" #'beginning-of-buffer)
+ (define-key map "\C-r" #'beginning-of-buffer)
+ (define-key map "s" #'beginning-of-line)
+ (define-key map "\C-s" #'beginning-of-line)
+ (define-key map "\C-u" #'keyboard-quit)
+ (define-key map "w" #'ws-last-error)
+ (define-key map "\C-w" #'ws-last-error)
+ (define-key map "y" #'ws-kill-eol)
+ (define-key map "\C-y" #'ws-kill-eol)
+ (define-key map "\177" #'ws-kill-bol)
map))
(defvar wordstar-mode-map
(let ((map (make-keymap)))
- (define-key map "\C-a" 'backward-word)
- (define-key map "\C-b" 'fill-paragraph)
- (define-key map "\C-c" 'scroll-up-command)
- (define-key map "\C-d" 'forward-char)
- (define-key map "\C-e" 'previous-line)
- (define-key map "\C-f" 'forward-word)
- (define-key map "\C-g" 'delete-char)
- (define-key map "\C-h" 'backward-char)
- (define-key map "\C-i" 'indent-for-tab-command)
- (define-key map "\C-j" 'help-for-help)
+ (define-key map "\C-a" #'backward-word)
+ (define-key map "\C-b" #'fill-paragraph)
+ (define-key map "\C-c" #'scroll-up-command)
+ (define-key map "\C-d" #'forward-char)
+ (define-key map "\C-e" #'previous-line)
+ (define-key map "\C-f" #'forward-word)
+ (define-key map "\C-g" #'delete-char)
+ (define-key map "\C-h" #'backward-char)
+ (define-key map "\C-i" #'indent-for-tab-command)
+ (define-key map "\C-j" #'help-for-help)
(define-key map "\C-k" wordstar-C-k-map)
- (define-key map "\C-l" 'ws-repeat-search)
- (define-key map "\C-n" 'open-line)
+ (define-key map "\C-l" #'ws-repeat-search)
+ (define-key map "\C-n" #'open-line)
(define-key map "\C-o" wordstar-C-o-map)
- (define-key map "\C-p" 'quoted-insert)
+ (define-key map "\C-p" #'quoted-insert)
(define-key map "\C-q" wordstar-C-q-map)
- (define-key map "\C-r" 'scroll-down-command)
- (define-key map "\C-s" 'backward-char)
- (define-key map "\C-t" 'kill-word)
- (define-key map "\C-u" 'keyboard-quit)
- (define-key map "\C-v" 'overwrite-mode)
- (define-key map "\C-w" 'scroll-down-line)
- (define-key map "\C-x" 'next-line)
- (define-key map "\C-y" 'kill-complete-line)
- (define-key map "\C-z" 'scroll-up-line)
+ (define-key map "\C-r" #'scroll-down-command)
+ (define-key map "\C-s" #'backward-char)
+ (define-key map "\C-t" #'kill-word)
+ (define-key map "\C-u" #'keyboard-quit)
+ (define-key map "\C-v" #'overwrite-mode)
+ (define-key map "\C-w" #'scroll-down-line)
+ (define-key map "\C-x" #'next-line)
+ (define-key map "\C-y" #'kill-complete-line)
+ (define-key map "\C-z" #'scroll-up-line)
map))
;; wordstar-C-j-map not yet implemented
diff --git a/lisp/obsolete/yow.el b/lisp/obsolete/yow.el
index 76485f989c1..ca8de4f9224 100644
--- a/lisp/obsolete/yow.el
+++ b/lisp/obsolete/yow.el
@@ -1,4 +1,4 @@
-;;; yow.el --- quote random zippyisms
+;;; yow.el --- quote random zippyisms -*- lexical-binding: t; -*-
;; Copyright (C) 1993-1995, 2000-2021 Free Software Foundation, Inc.
@@ -39,8 +39,7 @@
(defcustom yow-file (expand-file-name "yow.lines" data-directory)
"File containing pertinent pinhead phrases."
- :type 'file
- :group 'yow)
+ :type 'file)
(defconst yow-load-message "Am I CONSING yet?...")
(defconst yow-after-load-message "I have SEEN the CONSING!!")