* lisp/obsolete: Use lexical-binding
Use lexical-binding in all the lisp/obsolete/*.el files. While at it, removed redundant :group arguments and used #' to quote functions. Commented out the key bindings which the #' revealed to lead to non-existing commands, and replaced those revealed to be obsolete. * lisp/obsolete/cl-compat.el: Use cl-lib. * lisp/obsolete/cust-print.el: Assume `defalias` exists. (with-custom-print): Use `declare`. * lisp/obsolete/iswitchb.el (iswitchb-init-XEmacs-trick) (iswitchb-xemacs-backspacekey): Remove functions. * lisp/obsolete/landmark.el (landmark, landmark-nslify-wts): Prefer `apply` to `eval`. * lisp/obsolete/longlines.el (longlines-mode): Don't use `add-to-list` on a hook. * lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): Use `clear-string`. * lisp/obsolete/pgg-pgp.el (pgg-pgp-encrypt-region): Remove oddly unused var `passphrase`. (pgg-pgp-verify-region): Declare var `jam-zcat-filename-list`. * lisp/obsolete/pgg-pgp5.el (pgg-pgp5-encrypt-region): Remove oddly unused var `passphrase`. (pgg-pgp5-verify-region): Declare var `jam-zcat-filename-list`. * lisp/obsolete/pgg.el: Remove some XEmacs compatibility code. (pgg-run-at-time, pgg-cancel-timer, pgg-clear-string): Remove functions. Use their core equivalent instead. * lisp/obsolete/rcompile.el (remote-compile): Remove unused vars `l`, `l-host`, `l-user`, and `localname`. * lisp/obsolete/starttls.el (starttls-any-program-available): Use `define-obsolete-function-alias`. * lisp/obsolete/tls.el (tls-format-message): Delete function, use `format-message` instead. * lisp/obsolete/url-ns.el (url-ns-prefs): Use `with-current-buffer` and `dlet`. * lisp/obsolete/vip.el (vip-escape-to-emacs): Remove unused var `key`. (vip-command-argument, vip-read-string, ex-delete, ex-line): Remove unused var `conditions`. (ex-map): Use a closure instead of `eval`. (ex-set): Make it an alias of `set-variable`. (ex-substitute): Remove unused var `cont`. * lisp/obsolete/abbrevlist.el: * lisp/obsolete/bruce.el: * lisp/obsolete/cc-compat.el: * lisp/obsolete/cl-compat.el: * lisp/obsolete/cl.el: * lisp/obsolete/complete.el: * lisp/obsolete/crisp.el: * lisp/obsolete/cust-print.el: * lisp/obsolete/erc-compat.el: * lisp/obsolete/erc-hecomplete.el: * lisp/obsolete/eudcb-ph.el: * lisp/obsolete/fast-lock.el: * lisp/obsolete/gs.el: * lisp/obsolete/gulp.el: * lisp/obsolete/html2text.el: * lisp/obsolete/info-edit.el: * lisp/obsolete/iswitchb.el: * lisp/obsolete/landmark.el: * lisp/obsolete/lazy-lock.el: * lisp/obsolete/longlines.el: * lisp/obsolete/mailpost.el: * lisp/obsolete/mantemp.el: * lisp/obsolete/meese.el: * lisp/obsolete/messcompat.el: * lisp/obsolete/metamail.el: * lisp/obsolete/mouse-sel.el: * lisp/obsolete/nnir.el: * lisp/obsolete/old-emacs-lock.el: * lisp/obsolete/otodo-mode.el: * lisp/obsolete/patcomp.el: * lisp/obsolete/pc-mode.el: * lisp/obsolete/pc-select.el: * lisp/obsolete/pgg-def.el: * lisp/obsolete/pgg-gpg.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/pgg-pgp.el: * lisp/obsolete/pgg-pgp5.el: * lisp/obsolete/pgg.el: * lisp/obsolete/rcompile.el: * lisp/obsolete/s-region.el: * lisp/obsolete/sb-image.el: * lisp/obsolete/sregex.el: * lisp/obsolete/starttls.el: * lisp/obsolete/sup-mouse.el: * lisp/obsolete/terminal.el: * lisp/obsolete/tls.el: * lisp/obsolete/tpu-edt.el: * lisp/obsolete/tpu-extras.el: * lisp/obsolete/tpu-mapper.el: * lisp/obsolete/url-ns.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/vi.el: * lisp/obsolete/vip.el: * lisp/obsolete/ws-mode.el: * lisp/obsolete/yow.el: Use lexical-binding.
This commit is contained in:
parent
59698d924e
commit
79d585c2be
55 changed files with 1267 additions and 1527 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
@ -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 ()
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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))
|
||||
|
@ -446,7 +446,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)
|
||||
|
@ -630,10 +630,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 +652,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"))
|
||||
|
|
|
@ -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)
|
||||
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,7 +31,7 @@
|
|||
(require 'format-spec)
|
||||
|
||||
;;;###autoload(autoload 'erc-define-minor-mode "erc-compat")
|
||||
(defalias 'erc-define-minor-mode 'define-minor-mode)
|
||||
(defalias 'erc-define-minor-mode #'define-minor-mode)
|
||||
(put 'erc-define-minor-mode 'edebug-form-spec 'define-minor-mode)
|
||||
|
||||
(defun erc-decode-coding-string (s coding-system)
|
||||
|
@ -73,7 +73,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').
|
||||
|
|
|
@ -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 ()
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -438,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:
|
||||
|
||||
|
@ -456,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.
|
||||
|
@ -517,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:
|
||||
|
@ -718,7 +717,7 @@ 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)
|
||||
|
@ -740,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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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" ())
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.")
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
@ -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 ()
|
||||
|
@ -1273,7 +1217,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))
|
||||
|
@ -1323,8 +1267,9 @@ Modified from `icomplete-completions'."
|
|||
(most-len (length most))
|
||||
most-is-exact
|
||||
(alternatives
|
||||
(mapconcat (if most 'iswitchb-output-completion
|
||||
'identity) comps iswitchb-delim)))
|
||||
(mapconcat (if most #'iswitchb-output-completion
|
||||
#'identity)
|
||||
comps iswitchb-delim)))
|
||||
|
||||
(concat
|
||||
|
||||
|
@ -1356,8 +1301,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 +1361,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
|
||||
nil nil 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)
|
||||
|
||||
|
|
|
@ -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 "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 [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 "\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 "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 " " #'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 [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
|
||||
|
|
|
@ -554,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.
|
||||
|
@ -590,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 ()
|
||||
;;
|
||||
|
@ -614,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.
|
||||
|
||||
|
@ -724,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'.
|
||||
|
@ -783,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'.
|
||||
|
|
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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))
|
||||
)))
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,8 +271,7 @@ 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/
|
||||
|
@ -293,21 +286,18 @@ that it is for swish++, not Namazu."
|
|||
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)
|
||||
:type '(file))
|
||||
|
||||
(defcustom nnir-swish-e-index-files
|
||||
(list nnir-swish-e-index-file)
|
||||
"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 +308,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 +319,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/>
|
||||
|
||||
(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 +333,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 +349,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 +370,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 +382,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 +397,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 +408,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 +434,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 +472,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)
|
||||
|
@ -573,7 +549,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)
|
||||
|
@ -1214,7 +1190,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)
|
||||
|
@ -1247,7 +1223,7 @@ construct path: search terms (see the variable
|
|||
(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 +1236,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 +1336,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,7 +1347,7 @@ 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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked
|
||||
;;; 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,12 +90,12 @@ 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)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; todo-mode.el --- major mode for editing TODO list files
|
||||
;;; todo-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."
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
@ -320,7 +316,6 @@ but before calling PC Selection mode):
|
|||
;; FIXME: bring pc-bindings-mode here ?
|
||||
nil nil nil
|
||||
|
||||
:group 'pc-select
|
||||
:global t
|
||||
|
||||
(if pc-selection-mode
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -27,33 +27,16 @@
|
|||
|
||||
(require 'pgg-def)
|
||||
(require 'pgg-parse)
|
||||
(autoload 'run-at-time "timer")
|
||||
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
|
||||
;;; @ utility functions
|
||||
;;;
|
||||
|
||||
(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)))
|
||||
(apply #'funcall (intern (format "pgg-%s-%s" scheme func)) args)))
|
||||
|
||||
(defmacro pgg-save-coding-system (start end &rest body)
|
||||
(declare (indent 2) (debug t))
|
||||
|
@ -153,16 +136,9 @@ regulate cache behavior."
|
|||
(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.
|
||||
|
@ -182,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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; sb-image --- Image management for speedbar
|
||||
;;; sb-image --- Image management for speedbar -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1999-2003, 2005-2019, 2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -246,15 +246,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 +525,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)))
|
||||
|
|
|
@ -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 "2011-08-02")
|
||||
|
||||
(provide 'starttls)
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
@ -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)
|
||||
" ")))
|
||||
|
||||
|
||||
|
@ -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 ()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 [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 [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."
|
||||
|
@ -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)))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 "\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 " " #'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 "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 ":" #'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 "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 "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 "[" #'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 "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 "{" #'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))))
|
||||
|
|
|
@ -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 "\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 [?\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 "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 ":" #'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 "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 "[" #'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 "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 "{" #'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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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!!")
|
||||
|
|
Loading…
Add table
Reference in a new issue