summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/char-fold.el (renamed from lisp/character-fold.el)52
-rw-r--r--lisp/descr-text.el13
-rw-r--r--lisp/desktop.el13
-rw-r--r--lisp/emacs-lisp/package.el95
-rw-r--r--lisp/emulation/viper-cmd.el43
-rw-r--r--lisp/emulation/viper-init.el9
-rw-r--r--lisp/isearch.el18
-rw-r--r--lisp/leim/quail/czech.el65
-rw-r--r--lisp/leim/quail/slovak.el52
-rw-r--r--lisp/menu-bar.el2
-rw-r--r--lisp/printing.el2
-rw-r--r--lisp/replace.el16
-rw-r--r--lisp/ses.el20
-rw-r--r--lisp/simple.el23
-rw-r--r--lisp/term/xterm.el39
-rw-r--r--lisp/vc/vc-cvs.el15
-rw-r--r--lisp/vc/vc.el14
-rw-r--r--lisp/w32-fns.el6
18 files changed, 207 insertions, 290 deletions
diff --git a/lisp/character-fold.el b/lisp/char-fold.el
index 2d3a8c67fa5..68bea29ea45 100644
--- a/lisp/character-fold.el
+++ b/lisp/char-fold.el
@@ -1,4 +1,4 @@
-;;; character-fold.el --- match unicode to similar ASCII -*- lexical-binding: t; -*-
+;;; char-fold.el --- match unicode to similar ASCII -*- lexical-binding: t; -*-
;; Copyright (C) 2015-2016 Free Software Foundation, Inc.
@@ -22,12 +22,12 @@
;;; Code:
-(eval-and-compile (put 'character-fold-table 'char-table-extra-slots 1))
+(eval-and-compile (put 'char-fold-table 'char-table-extra-slots 1))
-(defconst character-fold-table
+(defconst char-fold-table
(eval-when-compile
- (let ((equiv (make-char-table 'character-fold-table))
- (equiv-multi (make-char-table 'character-fold-table))
+ (let ((equiv (make-char-table 'char-fold-table))
+ (equiv-multi (make-char-table 'char-fold-table))
(table (unicode-property-table-internal 'decomposition)))
(set-char-table-extra-slot equiv 0 equiv-multi)
@@ -115,7 +115,7 @@
equiv)
equiv))
"Used for folding characters of the same group during search.
-This is a char-table with the `character-fold-table' subtype.
+This is a char-table with the `char-fold-table' subtype.
Let us refer to the character in question by char-x.
Each entry is either nil (meaning char-x only matches literally)
@@ -136,18 +136,18 @@ For instance, the default alist for ?f includes:
Exceptionally for the space character (32), ALIST is ignored.")
-(defun character-fold--make-space-string (n)
+(defun char-fold--make-space-string (n)
"Return a string that matches N spaces."
(format "\\(?:%s\\|%s\\)"
(make-string n ?\s)
(apply #'concat
- (make-list n (or (aref character-fold-table ?\s) " ")))))
+ (make-list n (or (aref char-fold-table ?\s) " ")))))
;;;###autoload
-(defun character-fold-to-regexp (string &optional _lax from)
- "Return a regexp matching anything that character-folds into STRING.
+(defun char-fold-to-regexp (string &optional _lax from)
+ "Return a regexp matching anything that char-folds into STRING.
Any character in STRING that has an entry in
-`character-fold-table' is replaced with that entry (which is a
+`char-fold-table' is replaced with that entry (which is a
regexp) and other characters are `regexp-quote'd.
If the resulting regexp would be too long for Emacs to handle,
@@ -156,7 +156,7 @@ just return the result of calling `regexp-quote' on STRING.
FROM is for internal use. It specifies an index in the STRING
from which to start."
(let* ((spaces 0)
- (multi-char-table (char-table-extra-slot character-fold-table 0))
+ (multi-char-table (char-table-extra-slot char-fold-table 0))
(i (or from 0))
(end (length string))
(out nil))
@@ -172,9 +172,9 @@ from which to start."
(pcase (aref string i)
(`?\s (setq spaces (1+ spaces)))
(c (when (> spaces 0)
- (push (character-fold--make-space-string spaces) out)
+ (push (char-fold--make-space-string spaces) out)
(setq spaces 0))
- (let ((regexp (or (aref character-fold-table c)
+ (let ((regexp (or (aref char-fold-table c)
(regexp-quote (string c))))
;; Long string. The regexp would probably be too long.
(alist (unless (> end 50)
@@ -206,13 +206,13 @@ from which to start."
(let ((length (car entry))
(suffix-regexp (cdr entry)))
(concat suffix-regexp
- (character-fold-to-regexp subs nil length))))
+ (char-fold-to-regexp subs nil length))))
`((0 . ,regexp) . ,matched-entries) "\\|")
"\\)"))))
out))))
(setq i (1+ i)))
(when (> spaces 0)
- (push (character-fold--make-space-string spaces) out))
+ (push (char-fold--make-space-string spaces) out))
(let ((regexp (apply #'concat (nreverse out))))
;; Limited by `MAX_BUF_SIZE' in `regex.c'.
(if (> (length regexp) 5000)
@@ -221,22 +221,22 @@ from which to start."
;;; Commands provided for completeness.
-(defun character-fold-search-forward (string &optional bound noerror count)
- "Search forward for a character-folded version of STRING.
-STRING is converted to a regexp with `character-fold-to-regexp',
+(defun char-fold-search-forward (string &optional bound noerror count)
+ "Search forward for a char-folded version of STRING.
+STRING is converted to a regexp with `char-fold-to-regexp',
which is searched for with `re-search-forward'.
BOUND NOERROR COUNT are passed to `re-search-forward'."
(interactive "sSearch: ")
- (re-search-forward (character-fold-to-regexp string) bound noerror count))
+ (re-search-forward (char-fold-to-regexp string) bound noerror count))
-(defun character-fold-search-backward (string &optional bound noerror count)
- "Search backward for a character-folded version of STRING.
-STRING is converted to a regexp with `character-fold-to-regexp',
+(defun char-fold-search-backward (string &optional bound noerror count)
+ "Search backward for a char-folded version of STRING.
+STRING is converted to a regexp with `char-fold-to-regexp',
which is searched for with `re-search-backward'.
BOUND NOERROR COUNT are passed to `re-search-backward'."
(interactive "sSearch: ")
- (re-search-backward (character-fold-to-regexp string) bound noerror count))
+ (re-search-backward (char-fold-to-regexp string) bound noerror count))
-(provide 'character-fold)
+(provide 'char-fold)
-;;; character-fold.el ends here
+;;; char-fold.el ends here
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 5f1a4304342..528820876ec 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -806,9 +806,16 @@ relevant to POS."
'describe-char-unidata-list))
'follow-link t)
(insert "\n")
- (dolist (elt (if (eq describe-char-unidata-list t)
- (nreverse (mapcar 'car char-code-property-alist))
- describe-char-unidata-list))
+ (dolist (elt
+ (cond ((eq describe-char-unidata-list t)
+ (nreverse (mapcar 'car char-code-property-alist)))
+ ((< char 32)
+ ;; Temporary fix (2016-05-22): The
+ ;; decomposition item for \n corrupts the
+ ;; display on a Linux virtual terminal.
+ ;; (Bug #23594).
+ (remq 'decomposition describe-char-unidata-list))
+ (t describe-char-unidata-list)))
(let ((val (get-char-code-property char elt))
description)
(when val
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 822db050e1f..dba3277c091 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1163,7 +1163,7 @@ This function also sets `desktop-dirname' to nil."
"Restore the state of a set of frames.
This function depends on the value of `desktop-saved-frameset'
being set (usually, by reading it from the desktop)."
- (when (desktop-restoring-frameset-p)
+ (when (and (display-graphic-p) (desktop-restoring-frameset-p))
(frameset-restore desktop-saved-frameset
:reuse-frames (eq desktop-restore-reuses-frames t)
:cleanup-frames (not (eq desktop-restore-reuses-frames 'keep))
@@ -1634,15 +1634,8 @@ If there are no buffers left to create, kill the timer."
(setq command-line-args (delete key command-line-args))
(desktop-save-mode 0)))
(when desktop-save-mode
- ;; People don't expect emacs -nw, or --daemon,
- ;; to create graphical frames (bug#17693).
- ;; TODO perhaps there should be a separate value
- ;; for desktop-restore-frames to control this startup behavior?
- (let ((desktop-restore-frames (and desktop-restore-frames
- initial-window-system
- (not (daemonp)))))
- (desktop-read)
- (setq inhibit-startup-screen t)))))
+ (desktop-read)
+ (setq inhibit-startup-screen t))))
(provide 'desktop)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 8afe18f8d94..4e3dab4bb38 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -302,10 +302,12 @@ contrast, `package-user-dir' contains packages for personal use."
:risky t
:version "24.1")
-(defvar epg-gpg-program)
+(declare-function epg-find-configuration "epg-config"
+ (protocol &optional force))
(defcustom package-check-signature
- (if (progn (require 'epg-config) (executable-find epg-gpg-program))
+ (if (and (require 'epg-config)
+ (epg-find-configuration 'OpenPGP))
'allow-unsigned)
"Non-nil means to check package signatures when installing.
The value `allow-unsigned' means to still install a package even if
@@ -1159,38 +1161,43 @@ errors signaled by ERROR-FORM or by BODY).
(setq body (cdr (cdr body))))
(macroexp-let2* nil ((url-1 url)
(noerror-1 noerror))
- `(cl-macrolet ((unless-error (body-2 &rest before-body)
- (let ((err (make-symbol "err")))
- `(with-temp-buffer
- (when (condition-case ,err
- (progn ,@before-body t)
- ,(list 'error ',error-form
- (list 'unless ',noerror-1
- `(signal (car ,err) (cdr ,err)))))
- ,@body-2)))))
- (if (string-match-p "\\`https?:" ,url-1)
- (let* ((url (concat ,url-1 ,file))
- (callback (lambda (status)
- (let ((b (current-buffer)))
- (require 'url-handlers)
- (unless-error ,body
- (when-let ((er (plist-get status :error)))
- (error "Error retrieving: %s %S" url er))
- (with-current-buffer b
- (goto-char (point-min))
- (unless (search-forward-regexp "^\r?\n\r?" nil 'noerror)
- (error "Error retrieving: %s %S" url "incomprehensible buffer")))
- (url-insert-buffer-contents b url)
- (kill-buffer b)
- (goto-char (point-min)))))))
- (if ,async
- (unless-error nil (url-retrieve url callback nil 'silent))
- (unless-error ,body (url-insert-file-contents url))))
- (unless-error ,body
- (let ((url (expand-file-name ,file ,url-1)))
- (unless (file-name-absolute-p url)
- (error "Location %s is not a url nor an absolute file name" url))
- (insert-file-contents url)))))))
+ (let ((url-sym (make-symbol "url"))
+ (b-sym (make-symbol "b-sym")))
+ `(cl-macrolet ((unless-error (body-2 &rest before-body)
+ (let ((err (make-symbol "err")))
+ `(with-temp-buffer
+ (when (condition-case ,err
+ (progn ,@before-body t)
+ ,(list 'error ',error-form
+ (list 'unless ',noerror-1
+ `(signal (car ,err) (cdr ,err)))))
+ ,@body-2)))))
+ (if (string-match-p "\\`https?:" ,url-1)
+ (let ((,url-sym (concat ,url-1 ,file)))
+ (if ,async
+ (unless-error nil
+ (url-retrieve ,url-sym
+ (lambda (status)
+ (let ((,b-sym (current-buffer)))
+ (require 'url-handlers)
+ (unless-error ,body
+ (when-let ((er (plist-get status :error)))
+ (error "Error retrieving: %s %S" ,url-sym er))
+ (with-current-buffer ,b-sym
+ (goto-char (point-min))
+ (unless (search-forward-regexp "^\r?\n\r?" nil 'noerror)
+ (error "Error retrieving: %s %S" ,url-sym "incomprehensible buffer")))
+ (url-insert-buffer-contents ,b-sym ,url-sym)
+ (kill-buffer ,b-sym)
+ (goto-char (point-min)))))
+ nil
+ 'silent))
+ (unless-error ,body (url-insert-file-contents ,url-sym))))
+ (unless-error ,body
+ (let ((url (expand-file-name ,file ,url-1)))
+ (unless (file-name-absolute-p url)
+ (error "Location %s is not a url nor an absolute file name" url))
+ (insert-file-contents url))))))))
(define-error 'bad-signature "Failed to verify signature")
@@ -1460,8 +1467,6 @@ taken care of by `package-initialize'."
(defvar package--downloads-in-progress nil
"List of in-progress asynchronous downloads.")
-(declare-function epg-find-configuration "epg-config"
- (protocol &optional force))
(declare-function epg-import-keys-from-file "epg" (context keys))
;;;###autoload
@@ -1561,12 +1566,6 @@ downloads in the background."
(let ((default-keyring (expand-file-name "package-keyring.gpg"
data-directory))
(inhibit-message async))
- (if (get 'package-check-signature 'saved-value)
- (when package-check-signature
- (epg-find-configuration 'OpenPGP))
- (setq package-check-signature
- (if (epg-find-configuration 'OpenPGP)
- 'allow-unsigned)))
(when (and package-check-signature (file-exists-p default-keyring))
(condition-case-unless-debug error
(package-import-keyring default-keyring)
@@ -1874,6 +1873,7 @@ add a call to it along with some explanatory comments."
(file-readable-p user-init-file)
(file-writable-p user-init-file))
(let* ((buffer (find-buffer-visiting user-init-file))
+ buffer-name
(contains-init
(if buffer
(with-current-buffer buffer
@@ -1889,8 +1889,12 @@ add a call to it along with some explanatory comments."
(re-search-forward "(package-initialize\\_>" nil 'noerror)))))
(unless contains-init
(with-current-buffer (or buffer
- (let ((delay-mode-hooks t))
+ (let ((delay-mode-hooks t)
+ (find-file-visit-truename t))
(find-file-noselect user-init-file)))
+ (when buffer
+ (setq buffer-name (buffer-file-name))
+ (set-visited-file-name (file-chase-links user-init-file)))
(save-excursion
(save-restriction
(widen)
@@ -1909,7 +1913,10 @@ add a call to it along with some explanatory comments."
(insert "\n"))
(let ((file-precious-flag t))
(save-buffer))
- (unless buffer
+ (if buffer
+ (progn
+ (set-visited-file-name buffer-name)
+ (set-buffer-modified-p nil))
(kill-buffer (current-buffer)))))))))
(setq package--init-file-ensured t))
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 6951dbb708b..72fc89817a1 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -631,7 +631,7 @@
(viper-over-whitespace-line))
(indent-to-left-margin))
(viper-add-newline-at-eob-if-necessary)
- (viper-adjust-undo)
+ (viper-complete-complex-command-for-undo)
(if (eq viper-current-state 'emacs-state)
(viper-restore-cursor-color 'after-emacs-mode)
@@ -1570,7 +1570,7 @@ If the prefix argument ARG is non-nil, it is used instead of `val'."
(if (and (eolp) (not (bolp)))
(backward-char 1))
))
- (viper-adjust-undo) ; take care of undo
+ (viper-complete-complex-command-for-undo) ; take care of undo
;; If the prev cmd was rotating the command ring, this means that `.' has
;; just executed a command from that ring. So, push it on the ring again.
;; If we are just executing previous command , then don't push viper-d-com
@@ -1670,6 +1670,7 @@ invokes the command before that, etc."
(undo-start)
(undo-more 2)
+ (viper-complete-complex-command-for-undo)
;;(setq undo-beg-posn (or undo-beg-posn (point))
;; undo-end-posn (or undo-end-posn (point)))
;;(setq undo-beg-posn (or undo-beg-posn before-undo-pt)
@@ -1709,37 +1710,17 @@ invokes the command before that, etc."
;; The following two functions are used to set up undo properly.
;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines,
;; they are undone all at once.
-(defun viper-adjust-undo ()
- (if viper-undo-needs-adjustment
- (let ((inhibit-quit t)
- tmp tmp2)
- (setq viper-undo-needs-adjustment nil)
- (if (listp buffer-undo-list)
- (if (setq tmp (memq viper-buffer-undo-list-mark buffer-undo-list))
- (progn
- (setq tmp2 (cdr tmp)) ; the part after mark
-
- ;; cut tail from buffer-undo-list temporarily by direct
- ;; manipulation with pointers in buffer-undo-list
- (setcdr tmp nil)
-
- (setq buffer-undo-list (delq nil buffer-undo-list))
- (setq buffer-undo-list
- (delq viper-buffer-undo-list-mark buffer-undo-list))
- ;; restore tail of buffer-undo-list
- (setq buffer-undo-list (nconc buffer-undo-list tmp2)))
- (setq buffer-undo-list (delq nil buffer-undo-list)))))
- ))
+(defun viper-complete-complex-command-for-undo ()
+ (setq undo-auto-disable-boundaries nil)
+ (setq viper-undo-in-complex-command nil)
+ (undo-boundary))
(defun viper-set-complex-command-for-undo ()
- (if (listp buffer-undo-list)
- (if (not viper-undo-needs-adjustment)
- (let ((inhibit-quit t))
- (setq buffer-undo-list
- (cons viper-buffer-undo-list-mark buffer-undo-list))
- (setq viper-undo-needs-adjustment t)))))
-
+ (when (not viper-undo-in-complex-command)
+ (setq undo-auto-disable-boundaries t)
+ (setq viper-undo-in-complex-command t)
+ (undo-boundary)))
;;; Viper's destructive Command ring utilities
@@ -2607,7 +2588,7 @@ These keys are ESC, RET, and LineFeed."
(delete-char 1 t)
(insert char))
- (viper-adjust-undo)
+ (viper-complete-complex-command-for-undo)
(backward-char arg)
))
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 104245b7571..c1e76629477 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -370,13 +370,8 @@ Use `\\[viper-set-expert-level]' to change this.")
;; VI-style Undo
;; Used to 'undo' complex commands, such as replace and insert commands.
-(viper-deflocalvar viper-undo-needs-adjustment nil)
-(put 'viper-undo-needs-adjustment 'permanent-local t)
-
-;; A mark that Viper puts on buffer-undo-list. Marks the beginning of a
-;; complex command that must be undone atomically. If inserted, it is
-;; erased by viper-change-state-to-vi and viper-repeat.
-(defconst viper-buffer-undo-list-mark 'viper)
+(viper-deflocalvar viper-undo-in-complex-command nil)
+(put 'viper-undo-in-complex-command 'permanent-local t)
(defcustom viper-keep-point-on-undo nil
"Non-nil means not to move point while undoing commands.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 418d9ea273a..7360a0b3742 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -222,7 +222,7 @@ It is nil if none yet.")
Default value, nil, means edit the string instead."
:type 'boolean)
-(autoload 'character-fold-to-regexp "character-fold")
+(autoload 'char-fold-to-regexp "char-fold")
(defcustom search-default-mode nil
"Default mode to use when starting isearch.
@@ -236,7 +236,7 @@ isearch).
If a function, use that function as an `isearch-regexp-function'.
Example functions (and the keys to toggle them during isearch)
are `word-search-regexp' \(`\\[isearch-toggle-word]'), `isearch-symbol-regexp'
-\(`\\[isearch-toggle-symbol]'), and `character-fold-to-regexp' \(`\\[isearch-toggle-character-fold]')."
+\(`\\[isearch-toggle-symbol]'), and `char-fold-to-regexp' \(`\\[isearch-toggle-char-fold]')."
;; :type is set below by `isearch-define-mode-toggle'.
:type '(choice (const :tag "Literal search" nil)
(const :tag "Regexp search" t)
@@ -510,6 +510,7 @@ This is like `describe-bindings', but displays only Isearch keys."
;; People expect to be able to paste with the mouse.
(define-key map [mouse-2] #'isearch-mouse-2)
(define-key map [down-mouse-2] nil)
+ (define-key map [xterm-paste] #'isearch-xterm-paste)
;; Some bindings you may want to put in your isearch-mode-hook.
;; Suggest some alternates...
@@ -718,7 +719,7 @@ Type \\[isearch-toggle-invisible] to toggle search in invisible text.
Type \\[isearch-toggle-regexp] to toggle regular-expression mode.
Type \\[isearch-toggle-word] to toggle word mode.
Type \\[isearch-toggle-symbol] to toggle symbol mode.
-Type \\[isearch-toggle-character-fold] to toggle character folding.
+Type \\[isearch-toggle-char-fold] to toggle character folding.
Type \\[isearch-toggle-lax-whitespace] to toggle whitespace matching.
In incremental searches, a space or spaces normally matches any whitespace
@@ -1546,9 +1547,9 @@ The command then executes BODY and updates the isearch prompt."
Turning on word search turns off regexp mode.")
(isearch-define-mode-toggle symbol "_" isearch-symbol-regexp "\
Turning on symbol search turns off regexp mode.")
-(isearch-define-mode-toggle character-fold "'" character-fold-to-regexp "\
+(isearch-define-mode-toggle char-fold "'" char-fold-to-regexp "\
Turning on character-folding turns off regexp mode.")
-(put 'character-fold-to-regexp 'isearch-message-prefix "char-fold ")
+(put 'char-fold-to-regexp 'isearch-message-prefix "char-fold ")
(isearch-define-mode-toggle regexp "r" nil nil
(setq isearch-regexp (not isearch-regexp))
@@ -2001,6 +2002,13 @@ is bound to outside of Isearch."
(when (functionp binding)
(call-interactively binding)))))
+(declare-function xterm--pasted-text "term/xterm" ())
+
+(defun isearch-xterm-paste ()
+ "Pull terminal paste into search string."
+ (interactive)
+ (isearch-yank-string (xterm--pasted-text)))
+
(defun isearch-yank-internal (jumpform)
"Pull the text from point to the point reached by JUMPFORM.
JUMPFORM is a lambda expression that takes no arguments and returns
diff --git a/lisp/leim/quail/czech.el b/lisp/leim/quail/czech.el
index 365c3c51059..ddb4af53db3 100644
--- a/lisp/leim/quail/czech.el
+++ b/lisp/leim/quail/czech.el
@@ -142,18 +142,7 @@
("=[" ?\[)
("=]" ?\])
("={" ?{)
- ("=}" ?})
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("=}" ?}))
(quail-define-package
"czech-qwerty" "Czech" "CZ" t
@@ -260,18 +249,7 @@
("=[" ?\[)
("=]" ?\])
("={" ?{)
- ("=}" ?})
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("=}" ?}))
(quail-define-package
"czech-prog-1" "Czech" "CZ" t
@@ -350,18 +328,7 @@ All other keys are the same as on standard US keyboard."
("++U" ?Ů)
("+++U" ?Ü)
("+Y" ?Ý)
- ("+Z" ?Ž)
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("+Z" ?Ž))
(quail-define-package
"czech-prog-2" "Czech" "CZ" t
@@ -440,18 +407,7 @@ All other keys are the same as on standard US keyboard."
("++U" ?Ů)
("+++U" ?Ü)
("+Y" ?Ý)
- ("+Z" ?Ž)
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("+Z" ?Ž))
(quail-define-package
"czech-prog-3" "Czech" "CZ" t
@@ -552,17 +508,6 @@ All other keys are the same as on standard US keyboard."
("+u" ?ů)
("+=u" ?ü)
("=y" ?ý)
- ("+z" ?ž)
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("+z" ?ž))
;;; czech.el ends here
diff --git a/lisp/leim/quail/slovak.el b/lisp/leim/quail/slovak.el
index 4294fd7613b..e00f03fa1f6 100644
--- a/lisp/leim/quail/slovak.el
+++ b/lisp/leim/quail/slovak.el
@@ -151,18 +151,7 @@
("+7" ?&)
("+8" ?*)
("+9" ?\()
- ("+0" ?\))
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("+0" ?\)))
(quail-define-package
@@ -245,18 +234,7 @@ All other keys are the same as on standard US keyboard."
("[[[U" ?Ü)
("[Y" ?Ý)
("[Z" ?Ž)
- ("[[Z" ?Ž)
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("[[Z" ?Ž))
(quail-define-package
@@ -347,18 +325,7 @@ All other keys are the same as on standard US keyboard."
("+U" ?Ů)
("+=U" ?Ü)
("=Y" ?Ý)
- ("+Z" ?Ž)
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("+Z" ?Ž))
(quail-define-package
@@ -463,17 +430,6 @@ All other keys are the same as on standard US keyboard."
("[Y" ?Ý)
("[Z" ?Ž)
("[[Z" ?Ž)
- ("]Z" ?Ž)
- ([kp-1] ?1)
- ([kp-2] ?2)
- ([kp-3] ?3)
- ([kp-4] ?4)
- ([kp-5] ?5)
- ([kp-6] ?6)
- ([kp-7] ?7)
- ([kp-8] ?8)
- ([kp-9] ?9)
- ([kp-0] ?0)
- ([kp-add] ?+))
+ ("]Z" ?Ž))
;;; slovak.el ends here
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 933e2d22f67..a6541182e24 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1263,7 +1263,7 @@ mail status in mode line"))
(defvar menu-bar-search-options-menu
(let ((menu (make-sparse-keymap "Search Options")))
- (dolist (x '((character-fold-to-regexp "Fold Characters" "Character folding")
+ (dolist (x '((char-fold-to-regexp "Fold Characters" "Character folding")
(isearch-symbol-regexp "Whole Symbols" "Whole symbol")
(word-search-regexp "Whole Words" "Whole word")))
(bindings--define-key menu (vector (nth 0 x))
diff --git a/lisp/printing.el b/lisp/printing.el
index 3bd5a67298d..d9cc2a3614a 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5673,7 +5673,7 @@ If menu binding was not done, calls `pr-menu-bind'."
(or (listp switches)
(error "%S should have a list of strings" mess))
(lpr-flatten-list ; dynamic evaluation
- (mapcar 'ps-eval-switch switches)))
+ (mapcar #'lpr-eval-switch switches)))
(defun pr-ps-preview (kind n-up filename mess)
diff --git a/lisp/replace.el b/lisp/replace.el
index 0b25200be57..9e2d521baf0 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -33,7 +33,7 @@
:type 'boolean
:group 'matching)
-(defcustom replace-character-fold nil
+(defcustom replace-char-fold nil
"Non-nil means replacement commands should do character folding in matches.
This means, for instance, that \\=' will match a large variety of
unicode quotes.
@@ -324,7 +324,7 @@ If `replace-lax-whitespace' is non-nil, a space or spaces in the string
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
-If `replace-character-fold' is non-nil, matching uses character folding,
+If `replace-char-fold' is non-nil, matching uses character folding,
i.e. it ignores diacritics and other differences between equivalent
character strings.
@@ -383,7 +383,7 @@ If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
-This function is not affected by `replace-character-fold'.
+This function is not affected by `replace-char-fold'.
Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace
only matches surrounded by word boundaries. A negative prefix arg means
@@ -474,7 +474,7 @@ If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
-This function is not affected by `replace-character-fold'.
+This function is not affected by `replace-char-fold'.
Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace
only matches that are surrounded by word boundaries.
@@ -568,7 +568,7 @@ If `replace-lax-whitespace' is non-nil, a space or spaces in the string
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
-If `replace-character-fold' is non-nil, matching uses character folding,
+If `replace-char-fold' is non-nil, matching uses character folding,
i.e. it ignores diacritics and other differences between equivalent
character strings.
@@ -623,7 +623,7 @@ If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
-This function is not affected by `replace-character-fold'
+This function is not affected by `replace-char-fold'
In Transient Mark mode, if the mark is active, operate on the contents
of the region. Otherwise, operate from point to the end of the buffer's
@@ -2055,9 +2055,9 @@ It is called with three arguments, as if it were
;; used after `recursive-edit' might override them.
(let* ((isearch-regexp regexp-flag)
(isearch-regexp-function (or delimited-flag
- (and replace-character-fold
+ (and replace-char-fold
(not regexp-flag)
- #'character-fold-to-regexp)))
+ #'char-fold-to-regexp)))
(isearch-lax-whitespace
replace-lax-whitespace)
(isearch-regexp-lax-whitespace
diff --git a/lisp/ses.el b/lisp/ses.el
index a87386e1730..b2fd2bbe9a5 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3455,9 +3455,18 @@ highlighted range in the spreadsheet."
(setq cell (or cell (ses-get-cell row col))
old-name (ses-cell-symbol cell)
new-rowcol (ses-decode-cell-symbol (symbol-name new-name)))
+ ;; when ses-rename-cell is called interactively, then 'sym' is the
+ ;; 'cursor-intangible' property of text at cursor position, while
+ ;; 'old-name' is the symbol stored in array cell at coordinate
+ ;; 'rowcol' corresponding to 'ses-cell' property of symbol
+ ;; 'sym'. Both must be the same.
+ (unless (eq sym old-name)
+ (error "Spreadsheet is broken, both symbols %S and %S refering to cell (%d,%d)" sym old-name row col))
(if new-rowcol
+ ;; the new name is of A1 type, so we test that the coordinate
+ ;; inferred from new name
(if (equal new-rowcol rowcol)
- (put new-name 'ses-cell rowcol)
+ (put new-name 'ses-cell rowcol)
(error "Not a valid name for this cell location"))
(setq ses--named-cell-hashmap
(or ses--named-cell-hashmap (make-hash-table :test 'eq)))
@@ -3471,7 +3480,7 @@ highlighted range in the spreadsheet."
(setf (ses-cell-formula xcell)
(ses-replace-name-in-formula
(ses-cell-formula xcell)
- sym
+ old-name
new-name))))
;; Replace name by new name in reference list of cells to which renamed
;; cell refers to.
@@ -3479,11 +3488,14 @@ highlighted range in the spreadsheet."
(let* ((x (ses-sym-rowcol ref))
(xcell (ses-get-cell (car x) (cdr x))))
(setf (ses-cell-references xcell)
- (cons new-name (delq sym
+ (cons new-name (delq old-name
(ses-cell-references xcell))))))
(set (make-local-variable new-name) (symbol-value sym))
(setf (ses-cell--symbol cell) new-name)
- (makunbound sym)
+ ;; Unbind old name
+ (if (eq (get old-name 'ses-cell) :ses-named)
+ (ses--unbind-cell-name old-name)
+ (kill-local-variable old-name))
(and curcell (setq ses--curcell new-name))
(save-excursion
(or curcell (ses-goto-print row col))
diff --git a/lisp/simple.el b/lisp/simple.el
index 65664c93666..affc403dcdc 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2848,6 +2848,18 @@ buffers that were changed during the last command.")
If set to non-nil, this will effectively disable the timer.")
+(defvar-local undo-auto-disable-boundaries nil
+ "Disable the automatic addition of boundaries.
+
+If set to non-nil, `undo-boundary' will not be called
+automatically in a buffer either at the end of a command, or as a
+result of `undo-auto-current-boundary-timer'.
+
+When this is set to non-nil, it is important to ensure that
+`undo-boundary' is called frequently enough. Failure to do so
+will result in user-visible warnings that the situation is
+probably a bug.")
+
(defvar undo-auto--this-command-amalgamating nil
"Non-nil if `this-command' should be amalgamated.
This variable is set to nil by `undo-auto--boundaries' and is set
@@ -2887,7 +2899,8 @@ REASON describes the reason that the boundary is being added; see
(dolist (b undo-auto--undoably-changed-buffers)
(when (buffer-live-p b)
(with-current-buffer b
- (undo-auto--ensure-boundary cause))))
+ (unless undo-auto-disable-boundaries
+ (undo-auto--ensure-boundary cause)))))
(setq undo-auto--undoably-changed-buffers nil))
(defun undo-auto--boundary-timer ()
@@ -2914,10 +2927,10 @@ See also `undo-auto--buffer-undoably-changed'.")
"Add an `undo-boundary' in appropriate buffers."
(undo-auto--boundaries
(let ((amal undo-auto--this-command-amalgamating))
- (setq undo-auto--this-command-amalgamating nil)
- (if amal
- 'amalgamate
- 'command))))
+ (setq undo-auto--this-command-amalgamating nil)
+ (if amal
+ 'amalgamate
+ 'command))))
(defun undo-auto-amalgamate ()
"Amalgamate undo if necessary.
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 5a38ebe8e45..01c01130e7c 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -71,28 +71,29 @@ string bytes that can be copied is 3/4 of this value."
(defconst xterm-paste-ending-sequence "\e[201~"
"Characters send by the terminal to end a bracketed paste.")
+(defun xterm--pasted-text ()
+ "Handle the rest of a terminal paste operation.
+Return the pasted text as a string."
+ (let ((end-marker-length (length xterm-paste-ending-sequence)))
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (while (not (search-backward xterm-paste-ending-sequence
+ (- (point) end-marker-length) t))
+ (let ((event (read-event nil nil
+ ;; Use finite timeout to avoid glomming the
+ ;; event onto this-command-keys.
+ most-positive-fixnum)))
+ (when (eql event ?\r)
+ (setf event ?\n))
+ (insert event)))
+ (let ((last-coding-system-used))
+ (decode-coding-region (point-min) (point) (keyboard-coding-system)
+ t)))))
+
(defun xterm-paste ()
"Handle the start of a terminal paste operation."
(interactive)
- (let* ((end-marker-length (length xterm-paste-ending-sequence))
- (pasted-text (with-temp-buffer
- (set-buffer-multibyte nil)
- (while (not (search-backward
- xterm-paste-ending-sequence
- (- (point) end-marker-length) t))
- (let ((event (read-event
- nil nil
- ;; Use finite timeout to avoid
- ;; glomming the event onto
- ;; this-command-keys.
- most-positive-fixnum)))
- (when (eql event ?\r)
- (setf event ?\n))
- (insert event)))
- (let ((last-coding-system-used))
- (decode-coding-region
- (point-min) (point)
- (keyboard-coding-system) t))))
+ (let* ((pasted-text (xterm--pasted-text))
(interprogram-paste-function (lambda () pasted-text)))
(yank)))
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index dfe6b293e94..50198713b41 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -127,7 +127,7 @@ This is only meaningful if you don't use the implicit checkout model
:version "21.1"
:group 'vc-cvs)
-(defcustom vc-stay-local 'only-file
+(defcustom vc-cvs-stay-local 'only-file
"Non-nil means use local operations when possible for remote repositories.
This avoids slow queries over the network and instead uses heuristics
and past information to determine the current status of a file.
@@ -137,11 +137,11 @@ server, but heuristics will be used to determine the status for
all other VC operations.
The value can also be a regular expression or list of regular
-expressions to match against the host name of a repository; then VC
-only stays local for hosts that match it. Alternatively, the value
-can be a list of regular expressions where the first element is the
-symbol `except'; then VC always stays local except for hosts matched
-by these regular expressions."
+expressions to match against the host name of a repository; then
+vc-cvs only stays local for hosts that match it. Alternatively,
+the value can be a list of regular expressions where the first
+element is the symbol `except'; then vc-cvs always stays local
+except for hosts matched by these regular expressions."
:type '(choice (const :tag "Always stay local" t)
(const :tag "Only for file operations" only-file)
(const :tag "Don't stay local" nil)
@@ -795,8 +795,7 @@ If FILE is a list of files, return non-nil if any of them
individually should stay local."
(if (listp file)
(delq nil (mapcar (lambda (arg) (vc-cvs-stay-local-p arg)) file))
- (let* ((sym (vc-make-backend-sym 'CVS 'stay-local))
- (stay-local (if (boundp sym) (symbol-value sym) vc-stay-local)))
+ (let ((stay-local vc-cvs-stay-local))
(if (symbolp stay-local) stay-local
(let ((dirname (if (file-directory-p file)
(directory-file-name file)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 25b41e34e64..af875e89907 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -552,7 +552,7 @@
;; argument, since on no system since RCS has setting the initial
;; revision been even possible, let alone sane.
;;
-;; INCOMPATIBLE CHANGE: In older versions of the API, vc-diff did
+;; - INCOMPATIBLE CHANGE: In older versions of the API, vc-diff did
;; not take an async-mode flag as a fourth optional argument. (This
;; change eliminated a particularly ugly global.)
;;
@@ -563,12 +563,12 @@
;; SVN.)
;;
;; - INCOMPATIBLE CHANGE: The old fourth 'default-state' argument of
-;; vc-dir-status-files is gone; none of the back ends actually used it.
+;; dir-status-files is gone; none of the back ends actually used it.
;;
-;; - vc-dir-status is no longer a public method; it has been replaced
-;; by vc-dir-status-files.
+;; - dir-status is no longer a public method; it has been replaced by
+;; dir-status-files.
;;
-;; - vc-state-heuristic is no longer a public method (the CVS backend
+;; - state-heuristic is no longer a public method (the CVS backend
;; retains it as a private one).
;;
;; - the vc-mistrust-permissions configuration variable is gone; the
@@ -577,8 +577,8 @@
;; only affected back ends were SCCS and RCS.
;;
;; - vc-stay-local-p and repository-hostname are no longer part
-;; of the public API. The vc-stay-local configuration variable
-;; remains but only affects the CVS back end.
+;; of the public API. The vc-cvs-stay-local configuration variable
+;; remains and only affects the CVS back end.
;;
;; - The init-revision function and the default-initial-revision
;; variable are gone. These have't made sense on anything shipped
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index 4815f4b8c21..91c02530427 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -31,9 +31,9 @@
;;;; Function keys
-(declare-function set-message-beep "w32fns.c")
-(declare-function w32-get-locale-info "w32proc.c")
-(declare-function w32-get-valid-locale-ids "w32proc.c")
+(declare-function set-message-beep "w32fns.c" (sound))
+(declare-function w32-get-locale-info "w32proc.c" (lcid &optional longform))
+(declare-function w32-get-valid-locale-ids "w32proc.c" ())
;; Map all versions of a filename (8.3, longname, mixed case) to the
;; same buffer.