From: Paul Eggert Date: Fri, 1 Jan 2021 09:28:16 +0000 (-0800) Subject: Merge from origin/emacs-27 X-Git-Tag: emacs-28.0.90~4444 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=50f3949119cd5bb2f058b90d14b2940a3a8a7a0e;p=emacs.git Merge from origin/emacs-27 33d159c36f Fix copyright years by hand --- 50f3949119cd5bb2f058b90d14b2940a3a8a7a0e diff --cc etc/refcards/ru-refcard.tex index bab486351ac,f194542a976..179be0af885 --- a/etc/refcards/ru-refcard.tex +++ b/etc/refcards/ru-refcard.tex @@@ -40,8 -40,8 +40,8 @@@ \newlength{\ColThreeWidth} \setlength{\ColThreeWidth}{25mm} -\newcommand{\versionemacs}[0]{27} % version of Emacs this is for +\newcommand{\versionemacs}[0]{28} % version of Emacs this is for - \newcommand{\cyear}[0]{2020} % copyright year + \newcommand{\cyear}[0]{2021} % copyright year \newcommand\shortcopyrightnotice[0]{\vskip 1ex plus 2 fill \centerline{\footnotesize \copyright\ \cyear\ Free Software Foundation, Inc. diff --cc lisp/epa-mail.el index 6cc7ac9768e,260911d0be3..7e100569b0f --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@@ -243,12 -226,7 +243,12 @@@ If no one is selected, symmetric encryp (setq epa-last-coding-system-specified (or coding-system-for-write (select-safe-coding-system (point) (point-max))))) - + + ;; Insert contents of requested attachments, if any. + (when (and (eq major-mode 'mail-mode) mail-encode-mml) + (mml-to-mime) + (setq mail-encode-mml nil)) + ;; Don't let some read-only text stop us from encrypting. (let ((inhibit-read-only t)) (with-suppressed-warnings ((interactive-only epa-encrypt-region)) diff --cc lisp/net/tramp-sh.el index b69925437a0,49eb6415ad3..865ea4e92a4 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@@ -763,25 -760,25 +763,25 @@@ characters need to be doubled." ;; These two use base64 encoding. (defconst tramp-perl-encode-with-module - "%s -MMIME::Base64 -0777 -ne 'print encode_base64($_)' 2>/dev/null" + "%p -MMIME::Base64 -0777 -ne 'print encode_base64($_)' %n" "Perl program to use for encoding a file. -Escape sequence %s is replaced with name of Perl binary. -This string is passed to `format', so percent characters need to be doubled. This implementation requires the MIME::Base64 Perl module to be installed -on the remote host.") +on the remote host. +Format specifiers are replaced by `tramp-expand-script', percent +characters need to be doubled.") (defconst tramp-perl-decode-with-module - "%s -MMIME::Base64 -0777 -ne 'print decode_base64($_)' 2>/dev/null" + "%p -MMIME::Base64 -0777 -ne 'print decode_base64($_)' %n" "Perl program to use for decoding a file. -Escape sequence %s is replaced with name of Perl binary. -This string is passed to `format', so percent characters need to be doubled. This implementation requires the MIME::Base64 Perl module to be installed -on the remote host.") +on the remote host. +Format specifiers are replaced by `tramp-expand-script', percent +characters need to be doubled.") (defconst tramp-perl-encode - "%s -e ' + "%p -e ' # This script contributed by Juanma Barranquero . - # Copyright (C) 2002-2020 Free Software Foundation, Inc. + # Copyright (C) 2002-2021 Free Software Foundation, Inc. use strict; my %%trans = do { @@@ -812,15 -809,15 +812,15 @@@ while (read STDIN, $data, 54) (substr(unpack(q(B*), $data) . q(00000), 0, 432) =~ /....../g)), $pad, qq(\\n); -}' 2>/dev/null" +}' %n" "Perl program to use for encoding a file. -Escape sequence %s is replaced with name of Perl binary. -This string is passed to `format', so percent characters need to be doubled.") +Format specifiers are replaced by `tramp-expand-script', percent +characters need to be doubled.") (defconst tramp-perl-decode - "%s -e ' + "%p -e ' # This script contributed by Juanma Barranquero . - # Copyright (C) 2002-2020 Free Software Foundation, Inc. + # Copyright (C) 2002-2021 Free Software Foundation, Inc. use strict; my %%trans = do { diff --cc lisp/profiler.el index 75fa48426e9,eb0e2c94e24..64d71f4aab2 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@@ -500,11 -495,7 +500,11 @@@ RET: expand or collapse") (defun profiler-report-header-line-format (fmt &rest args) (let* ((header (apply #'profiler-format fmt args)) (escaped (replace-regexp-in-string "%" "%%" header))) - (concat - (propertize " " - (concat " " escaped))) ++ (concat ++ (propertize " " + 'display '(space :align-to 0) - 'face 'fixed-pitch) ++ 'face 'fixed-pitch) + escaped))) (defun profiler-report-line-format (tree) (let ((diff-p (profiler-profile-diff-p profiler-report-profile)) diff --cc lisp/progmodes/cc-mode.el index 0f37db6a5ed,601e1811920..cfb23d0d45e --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@@ -731,8 -684,8 +731,8 @@@ that requires a literal mode spec at co ;; ;; Put submode indicators onto minor-mode-alist, but only once. ;; (or (assq 'c-submode-indicators minor-mode-alist) ;; (setq minor-mode-alist --;; (cons '(c-submode-indicators c-submode-indicators) --;; minor-mode-alist))) ++;; (cons '(c-submode-indicators c-submode-indicators) ++;; minor-mode-alist))) (c-update-modeline) ;; Install the functions that ensure that various internal caches @@@ -1254,65 -1207,27 +1254,65 @@@ Note that the style variables are alway (c-put-syn-tab (1- (point)) '(15))) (t nil))))) -(defvar c-fl-syn-tab-region nil) - ;; Non-nil when a `c-restore-string-fences' is "in force". It's value is a - ;; cons of the BEG and END of the region currently "mirroring" the - ;; c-fl-syn-tab properties as syntax-table properties. +(defun c-put-syn-tab (pos value) + ;; Set both the syntax-table and the c-fl-syn-tab text properties at POS to + ;; VALUE (which should not be nil). + ;; `(let ((-pos- ,pos) - ;; (-value- ,value)) ++ ;; (-value- ,value)) + (c-put-char-property pos 'syntax-table value) + (c-put-char-property pos 'c-fl-syn-tab value) + (cond + ((null c-min-syn-tab-mkr) + (setq c-min-syn-tab-mkr (copy-marker pos t))) + ((< pos c-min-syn-tab-mkr) + (move-marker c-min-syn-tab-mkr pos))) + (cond + ((null c-max-syn-tab-mkr) + (setq c-max-syn-tab-mkr (copy-marker (1+ pos) nil))) + ((>= pos c-max-syn-tab-mkr) + (move-marker c-max-syn-tab-mkr (1+ pos)))) + (c-truncate-lit-pos-cache pos)) + +(defun c-clear-syn-tab (pos) + ;; Remove both the 'syntax-table and `c-fl-syn-tab properties at POS. + (c-clear-char-property pos 'syntax-table) + (c-clear-char-property pos 'c-fl-syn-tab) + (when c-min-syn-tab-mkr + (if (and (eq pos (marker-position c-min-syn-tab-mkr)) + (eq (1+ pos) (marker-position c-max-syn-tab-mkr))) + (progn + (move-marker c-min-syn-tab-mkr nil) + (move-marker c-max-syn-tab-mkr nil) + (setq c-min-syn-tab-mkr nil c-max-syn-tab-mkr nil)) + (when (eq pos (marker-position c-min-syn-tab-mkr)) + (move-marker c-min-syn-tab-mkr + (if (c-get-char-property (1+ pos) 'c-fl-syn-tab) + (1+ pos) + (c-next-single-property-change + (1+ pos) 'c-fl-syn-tab nil c-max-syn-tab-mkr)))) + (when (eq (1+ pos) (marker-position c-max-syn-tab-mkr)) + (move-marker c-max-syn-tab-mkr + (if (c-get-char-property (1- pos) 'c-fl-syn-tab) + pos + (c-previous-single-property-change + pos 'c-fl-syn-tab nil (1+ c-min-syn-tab-mkr))))))) + (c-truncate-lit-pos-cache pos)) (defun c-clear-string-fences () - ;; Clear syntax-table text properties in the region defined by - ;; `c-cl-syn-tab-region' which are "mirrored" by c-fl-syn-tab text - ;; properties. However, any such " character which ends up not being + ;; Clear syntax-table text properties which are "mirrored" by c-fl-syn-tab + ;; text properties. However, any such " character which ends up not being ;; balanced by another " is left with a '(1) syntax-table property. - (when c-fl-syn-tab-region - (let ((beg (car c-fl-syn-tab-region)) - (end (cdr c-fl-syn-tab-region)) - s pos) - (setq pos beg) + (when + (and c-min-syn-tab-mkr c-max-syn-tab-mkr) + (let (s pos) + (setq pos c-min-syn-tab-mkr) (while (and - (< pos end) - (setq pos - (c-min-property-position pos end 'c-fl-syn-tab)) - (< pos end)) + (< pos c-max-syn-tab-mkr) + (setq pos (c-min-property-position pos + c-max-syn-tab-mkr + 'c-fl-syn-tab)) + (< pos c-max-syn-tab-mkr)) (c-clear-char-property pos 'syntax-table) (setq pos (1+ pos))) ;; Check we haven't left any unbalanced "s. @@@ -1484,11 -1396,9 +1484,11 @@@ (c-will-be-escaped end beg end)) (c-remove-string-fences end) (goto-char (1+ end))) - ;; Are we unescaping a newline by inserting stuff between \ and \n? - ((and (eq end beg) - (c-is-escaped end)) + ;; Are we unescaping a newline ... + ((and + (c-is-escaped end) + (or (eq beg end) ; .... by inserting stuff between \ and \n? - (c-will-be-unescaped beg))) ; ... by removing an odd number of \s? ++ (c-will-be-unescaped beg))) ; ... by removing an odd number of \s? (goto-char (1+ end))) ; To after the NL which is being unescaped. (t (goto-char end))) diff --cc lisp/progmodes/compile.el index 9db7bcde206,c687a664608..94e4f3c6fa7 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@@ -1496,109 -1431,98 +1496,109 @@@ This updates the appropriate variable u "Parse errors between START and END. The errors recognized are the ones specified in RULES which default to `compilation-error-regexp-alist' if RULES is nil." - (dolist (item (or rules compilation-error-regexp-alist)) - (if (symbolp item) - (setq item (cdr (assq item - compilation-error-regexp-alist-alist)))) - (let ((file (nth 1 item)) - (line (nth 2 item)) - (col (nth 3 item)) - (type (nth 4 item)) - (pat (car item)) - end-line end-col fmt - props) - - ;; omake reports some error indented, so skip the indentation. - ;; another solution is to modify (some?) regexps in - ;; `compilation-error-regexp-alist'. - ;; note that omake usage is not limited to ocaml and C (for stubs). - ;; FIXME-omake: Doing it here seems wrong, at least it should depend on - ;; whether or not omake's own error messages are recognized. - (cond - ((not (memq 'omake compilation-error-regexp-alist)) nil) - ((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat) - nil) ;; Not anchored or anchored but already allows empty spaces. - (t (setq pat (concat "^\\(?: \\)?" (substring pat 1))))) - - (if (consp file) (setq fmt (cdr file) file (car file))) - (if (consp line) (setq end-line (cdr line) line (car line))) - (if (consp col) (setq end-col (cdr col) col (car col))) - - (unless (or (null (nth 5 item)) (integerp (nth 5 item))) - (error "HYPERLINK should be an integer: %s" (nth 5 item))) - - (goto-char start) - (while (re-search-forward pat end t) - (when (setq props (compilation-error-properties - file line end-line col end-col (or type 2) fmt)) - - (when (integerp file) - (let ((this-type (if (consp type) - (compilation-type type) - (or type 2)))) - (compilation--note-type this-type) - - (compilation--put-prop - file 'font-lock-face - (symbol-value (aref [compilation-info-face - compilation-warning-face - compilation-error-face] - this-type))))) - - (compilation--put-prop - line 'font-lock-face compilation-line-face) - (compilation--put-prop - end-line 'font-lock-face compilation-line-face) - - (compilation--put-prop - col 'font-lock-face compilation-column-face) - (compilation--put-prop - end-col 'font-lock-face compilation-column-face) - - ;; Obey HIGHLIGHT. - (dolist (extra-item (nthcdr 6 item)) - (let ((mn (pop extra-item))) - (when (match-beginning mn) - (let ((face (eval (car extra-item)))) - (cond - ((null face)) - ((or (symbolp face) (stringp face)) - (put-text-property - (match-beginning mn) (match-end mn) - 'font-lock-face face)) - ((and (listp face) - (eq (car face) 'face) - (or (symbolp (cadr face)) - (stringp (cadr face)))) - (compilation--put-prop mn 'font-lock-face (cadr face)) - (add-text-properties - (match-beginning mn) (match-end mn) - (nthcdr 2 face))) - (t - (error "Don't know how to handle face %S" - face))))))) - (let ((mn (or (nth 5 item) 0))) - (when compilation-debug + (let ((case-fold-search compilation-error-case-fold-search) + (omake-included (memq 'omake compilation-error-regexp-alist))) + (dolist (rule-item (or rules compilation-error-regexp-alist)) + (let* ((item + (if (symbolp rule-item) + (cdr (assq rule-item compilation-error-regexp-alist-alist)) + rule-item)) + (pat (car item)) + (file (nth 1 item)) + (line (nth 2 item)) + (col (nth 3 item)) + (type (nth 4 item)) + (rule (and (symbolp rule-item) rule-item)) + end-line end-col fmt + props) + + ;; omake reports some error indented, so skip the indentation. + ;; another solution is to modify (some?) regexps in + ;; `compilation-error-regexp-alist'. + ;; note that omake usage is not limited to ocaml and C (for stubs). + ;; FIXME-omake: Doing it here seems wrong, at least it should depend on + ;; whether or not omake's own error messages are recognized. + (cond + ((not omake-included) nil) + ((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat) + nil) ;; Not anchored or anchored but already allows empty spaces. + (t (setq pat (concat "^\\(?: \\)?" (substring pat 1))))) + + (if (and (consp file) (not (functionp file))) + (setq fmt (cdr file) + file (car file))) + (if (and (consp line) (not (functionp line))) + (setq end-line (cdr line) + line (car line))) + (if (and (consp col) (not (functionp col))) + (setq end-col (cdr col) + col (car col))) + + (unless (or (null (nth 5 item)) (integerp (nth 5 item))) + (error "HYPERLINK should be an integer: %s" (nth 5 item))) + + (goto-char start) + (while (re-search-forward pat end t) + (when (setq props (compilation-error-properties + file line end-line col end-col + (or type 2) fmt rule)) + + (when (integerp file) + (let ((this-type (if (consp type) + (compilation-type type) + (or type 2)))) + (compilation--note-type this-type) + + (compilation--put-prop + file 'font-lock-face + (symbol-value (aref [compilation-info-face + compilation-warning-face + compilation-error-face] + this-type))))) + + (compilation--put-prop + line 'font-lock-face compilation-line-face) + (compilation--put-prop + end-line 'font-lock-face compilation-line-face) + + (compilation--put-prop + col 'font-lock-face compilation-column-face) + (compilation--put-prop + end-col 'font-lock-face compilation-column-face) + + ;; Obey HIGHLIGHT. + (dolist (extra-item (nthcdr 6 item)) + (let ((mn (pop extra-item))) + (when (match-beginning mn) + (let ((face (eval (car extra-item)))) + (cond + ((null face)) + ((or (symbolp face) (stringp face)) + (put-text-property + (match-beginning mn) (match-end mn) + 'font-lock-face face)) - ((and (listp face) - (eq (car face) 'face) - (or (symbolp (cadr face)) - (stringp (cadr face)))) ++ ((and (listp face) ++ (eq (car face) 'face) ++ (or (symbolp (cadr face)) ++ (stringp (cadr face)))) + (compilation--put-prop mn 'font-lock-face (cadr face)) + (add-text-properties + (match-beginning mn) (match-end mn) + (nthcdr 2 face))) + (t + (error "Don't know how to handle face %S" + face))))))) + (let ((mn (or (nth 5 item) 0))) + (when compilation-debug + (font-lock-append-text-property + (match-beginning 0) (match-end 0) + 'compilation-debug (vector 'std item props))) + (add-text-properties + (match-beginning mn) (match-end mn) + (cddr props)) (font-lock-append-text-property - (match-beginning 0) (match-end 0) - 'compilation-debug (vector 'std item props))) - (add-text-properties - (match-beginning mn) (match-end mn) - (cddr props)) - (font-lock-append-text-property - (match-beginning mn) (match-end mn) - 'font-lock-face (cadr props)))))))) + (match-beginning mn) (match-end mn) + 'font-lock-face (cadr props))))))))) (defvar compilation--parsed -1) (make-variable-buffer-local 'compilation--parsed) diff --cc test/lisp/cedet/srecode-utest-getset.el index fc66ac4edf2,2a79a5cd669..0497dea505d --- a/test/lisp/cedet/srecode-utest-getset.el +++ b/test/lisp/cedet/srecode-utest-getset.el @@@ -1,6 -1,6 +1,6 @@@ -;;; srecode/test-getset.el --- Test the getset inserter. +;;; srecode/test-getset.el --- Test the getset inserter. -*- lexical-binding:t -*- - ;; Copyright (C) 2008, 2009, 2011, 2019-2020 Free Software Foundation, Inc + ;; Copyright (C) 2008, 2009, 2011, 2019-2021 Free Software Foundation, Inc. ;; This file is part of GNU Emacs.