commit aff0c585060b7cc92d52a32978c6aa64cf7e2a5e (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Feb 16 09:27:53 2019 +0100 Port tramp-adb to various 'touch' platforms * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): Try nanoseconds first, then plain seconds, then touch -t. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 22f2c5f6bf..4fba4e14f3 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -677,11 +677,22 @@ But handle the case, if the \"test\" command is not available." (tramp-compat-time-equal-p time tramp-time-doesnt-exist) (tramp-compat-time-equal-p time tramp-time-dont-know)) (current-time) - time))) + time)) + (quoted-name (tramp-shell-quote-argument localname))) + ;; Older versions of toybox 'touch' mishandle nanoseconds and/or + ;; trailing "Z", so fall back on plain seconds if nanoseconds+Z + ;; fails. Also, fall back on old POSIX 'touch -t' if 'touch -d' + ;; (introduced in POSIX.1-2008) fails. (tramp-adb-send-command-and-check - v (format "touch -d %s %s" + v (format (concat "touch -d %s %s 2>/dev/null || " + "touch -d %s %s 2>/dev/null || " + "touch -t %s %s") + (format-time-string "%Y-%m-%dT%H:%M:%S.%NZ" time t) + quoted-name (format-time-string "%Y-%m-%dT%H:%M:%S" time t) - (tramp-shell-quote-argument localname)))))) + quoted-name + (format-time-string "%Y%m%d%H%M.%S" time t) + quoted-name))))) (defun tramp-adb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date commit 3d9a56f00040cbfc8fb92c4379344d7e91e2dff2 Author: Eli Zaretskii Date: Sat Feb 16 09:15:40 2019 +0200 Fix 'early-init-file' value when file is missing * lisp/startup.el (command-line): Pass 'early-init.el', with an explicit .el extension, to load-user-init-file. Reported by Radon Rosborough in http://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00314.html. diff --git a/lisp/startup.el b/lisp/startup.el index f2410f6f2c..112b9b2596 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1167,7 +1167,11 @@ please check its value") (load-user-init-file (lambda () (expand-file-name - "early-init" + ;; We use an explicit .el extension here to force + ;; load-user-init-file to set user-init-file to "early-init.el", + ;; with the .el extension, if the file doesn't exist, not just + ;; "early-init" without an extension, as it does for ".emacs". + "early-init.el" (file-name-as-directory (concat "~" init-file-user "/.emacs.d"))))) (setq early-init-file user-init-file) commit f390147f7b815a7e4345caff04f692c6a897a619 Author: Stefan Monnier Date: Fri Feb 15 19:07:20 2019 -0500 * lisp/progmodes/cc-engine.el: Remove unneeded require of 'cl' diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index b4c12896f3..071efbc55b 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -152,8 +152,6 @@ (cc-require-when-compile 'cc-langs) (cc-require 'cc-vars) -(eval-when-compile (require 'cl)) - ;; Make declarations for all the `c-lang-defvar' variables in cc-langs. commit fd0ab0b9bd5991c1a2c598a7c78ec3f491a783bd Merge: 3c80bc3337 a298a1f6b2 Author: Stefan Monnier Date: Fri Feb 15 18:34:38 2019 -0500 Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk commit 3c80bc333750b62ed98d3064cf98b74b43121a5e Author: Stefan Monnier Date: Fri Feb 15 18:02:40 2019 -0500 * src/lread.c (readevalloop): Use filename to decide macroexpansion diff --git a/src/lread.c b/src/lread.c index ff9b75475b..ddef135687 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1932,13 +1932,12 @@ readevalloop (Lisp_Object readcharfun, Lisp_Object macroexpand = intern ("internal-macroexpand-for-load"); if (NILP (Ffboundp (macroexpand)) - /* Don't macroexpand in .elc files, since it should have been done - already. We actually don't know whether we're in a .elc file or not, - so we use circumstantial evidence: .el files normally go through - Vload_source_file_function -> load-with-code-conversion - -> eval-buffer. */ - || EQ (readcharfun, Qget_file_char) - || EQ (readcharfun, Qget_emacs_mule_file_char)) + || (STRINGP (sourcename) + && SBYTES (sourcename) >= 4 + && !strcmp (".elc", SSDATA (sourcename) + SBYTES (sourcename) - 4))) + /* Don't macroexpand before the corresponding function is defined + and don't bother macroexpanding in .elc files, since it should have + been done already. */ macroexpand = Qnil; if (MARKERP (readcharfun)) commit a298a1f6b2fc745163198825941dbe593dff331c Author: Glenn Morris Date: Fri Feb 15 16:49:27 2019 -0500 * test/lisp/textmodes/conf-mode-tests.el (conf-test-align-assignments): Fix whitespace. diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/conf-mode-tests.el index 5d79ceec96..3eefc8f84f 100644 --- a/test/lisp/textmodes/conf-mode-tests.el +++ b/test/lisp/textmodes/conf-mode-tests.el @@ -33,7 +33,7 @@ (conf-colon-mode) (conf-align-assignments) (should (equal (buffer-string) - "foo: bar\nbar: baz")))) + "foo: bar\nbar: baz")))) (ert-deftest conf-test-font-lock () (with-temp-buffer commit b15e6e456da915e7f398be63dfaaee64bdb6dc2d Merge: 613f9740e4 f721084f78 Author: Glenn Morris Date: Fri Feb 15 13:25:31 2019 -0800 Merge from origin/emacs-26 f721084 (origin/emacs-26) Avoid errors in erc-dcc.el when erc-dcc-ver... 3cba92d Fix faces in compilation messages commit 613f9740e498c7c55cee6eba1a1407dd3d57b681 Merge: 92a2c737b9 834ca187b8 Author: Glenn Morris Date: Fri Feb 15 13:25:31 2019 -0800 ; Merge from origin/emacs-26 The following commit was skipped: 834ca18 * doc/misc/eshell.texi (Built-ins): Fix alias description commit 92a2c737b9451271218baab13e7030c55a9fb260 Merge: 38b442429b 25d9fe24a6 Author: Glenn Morris Date: Fri Feb 15 13:25:31 2019 -0800 Merge from origin/emacs-26 25d9fe2 Work for empty MIME attachments (related to bug#34387) commit 38b442429bd0f15212960fb7fd37bd701cc8af3f Merge: a29c70d29b 58e0e929af Author: Glenn Morris Date: Fri Feb 15 13:25:30 2019 -0800 ; Merge from origin/emacs-26 The following commits were skipped: 58e0e92 Backport: js-indent-align-list-continuation: Make variable safe 6d89120 Avoid crashes upon C-g in nested invocations of 'read_char' commit a29c70d29b349712928ef8f12cfb87834df359a4 Merge: 877eba7249 3f4b8e9a29 Author: Glenn Morris Date: Fri Feb 15 13:25:30 2019 -0800 Merge from origin/emacs-26 3f4b8e9 * src/data.c (Fmake_local_variable): Fix bug#34318 b384996 Minor fixes in ELisp manual wrt syntax-table properties 71fc6d2 * admin/notes/emba: New file. 3aaa2d2 Fix Hunspell invocation for discovering its dictionaries # Conflicts: # test/src/data-tests.el commit 877eba7249d0d352ff489f1fceb8362c08814494 Author: Stefan Monnier Date: Fri Feb 15 10:29:02 2019 -0500 * lisp/progmodes/compile.el: Remove redundant :groups (compilation-shell-minor-mode, compilation-minor-mode): Use :lighter rather than the old positional args. (compilation-next-error): Make "No error here" into a user-error. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 581a98d56c..9fbe3614fd 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -43,23 +43,20 @@ ;;;###autoload (defcustom compilation-mode-hook nil "List of hook functions run by `compilation-mode'." - :type 'hook - :group 'compilation) + :type 'hook) ;;;###autoload (defcustom compilation-start-hook nil "Hook run after starting a new compilation process. The hook is run with one argument, the new process." - :type 'hook - :group 'compilation) + :type 'hook) ;;;###autoload (defcustom compilation-window-height nil "Number of lines in a compilation window. If nil, use Emacs default." :type '(choice (const :tag "Default" nil) - integer) - :group 'compilation) + integer)) (defvar compilation-filter-hook nil "Hook run after `compilation-filter' has inserted a string into the buffer. @@ -526,7 +523,7 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" "Alist of values for `compilation-error-regexp-alist'.") (defcustom compilation-error-regexp-alist - (mapcar 'car compilation-error-regexp-alist-alist) + (mapcar #'car compilation-error-regexp-alist-alist) "Alist that specifies how to match errors in compiler output. On GNU and Unix, any string is a valid filename, so these matchers must make some common sense assumptions, which catch @@ -581,8 +578,7 @@ listed text properties PROP# are given values VAL# as well." :type '(repeat (choice (symbol :tag "Predefined symbol") (sexp :tag "Error specification"))) :link `(file-link :tag "example file" - ,(expand-file-name "compilation.txt" data-directory)) - :group 'compilation) + ,(expand-file-name "compilation.txt" data-directory))) ;;;###autoload(put 'compilation-directory 'safe-local-variable 'stringp) (defvar compilation-directory nil @@ -642,7 +638,6 @@ If this is buffer-local in the destination buffer, Emacs obeys that value, otherwise it uses the value in the *compilation* buffer. This enables a major-mode to specify its own value." :type 'boolean - :group 'compilation :version "20.4") (defcustom compilation-read-command t @@ -653,15 +648,13 @@ Note that changing this to nil may be a security risk, because a file might define a malicious `compile-command' as a file local variable, and you might not notice. Therefore, `compile-command' is considered unsafe if this variable is nil." - :type 'boolean - :group 'compilation) + :type 'boolean) ;;;###autoload (defcustom compilation-ask-about-save t "Non-nil means \\[compile] asks which buffers to save before compiling. Otherwise, it saves all modified buffers without asking." - :type 'boolean - :group 'compilation) + :type 'boolean) (defcustom compilation-save-buffers-predicate nil "The second argument (PRED) passed to `save-some-buffers' before compiling. @@ -675,7 +668,6 @@ of `my-compilation-root' here." (const :tag "Default (save all file-visiting buffers)" nil) (const :tag "Save all buffers" t) function) - :group 'compilation :version "24.1") ;;;###autoload @@ -684,8 +676,7 @@ of `my-compilation-root' here." Elements should be directory names, not file names of directories. The value nil as an element means to try the default directory." :type '(repeat (choice (const :tag "Default" nil) - (string :tag "Directory"))) - :group 'compilation) + (string :tag "Directory")))) ;;;###autoload (defcustom compile-command (purecopy "make -k ") @@ -705,8 +696,7 @@ You might also use mode hooks to specify it in certain modes, like this: (file-name-sans-extension buffer-file-name)))))))) It's often useful to leave a space at the end of the value." - :type 'string - :group 'compilation) + :type 'string) ;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) ;;;###autoload @@ -715,7 +705,6 @@ It's often useful to leave a space at the end of the value." This only affects platforms that support asynchronous processes (see `start-process'); synchronous compilation processes never accept input." :type 'boolean - :group 'compilation :version "22.1") ;; A weak per-compilation-buffer hash indexed by (FILENAME . DIRECTORY). Each @@ -741,7 +730,6 @@ This list is temporarily prepended to `process-environment' prior to starting the compilation process." :type '(repeat (string :tag "ENVVARNAME=VALUE")) :options '(("LANG=C")) - :group 'compilation :version "24.1") ;; History of compile commands. @@ -750,19 +738,16 @@ starting the compilation process." (defface compilation-error '((t :inherit error)) "Face used to highlight compiler errors." - :group 'compilation :version "22.1") (defface compilation-warning '((t :inherit warning)) "Face used to highlight compiler warnings." - :group 'compilation :version "22.1") (defface compilation-info '((t :inherit success)) "Face used to highlight compiler information." - :group 'compilation :version "22.1") ;; The next three faces must be able to stand out against the @@ -774,13 +759,11 @@ starting the compilation process." (((class color) (min-colors 8)) (:foreground "red")) (t (:inverse-video t :weight bold))) "Face for Compilation mode's \"error\" mode line indicator." - :group 'compilation :version "24.3") (defface compilation-mode-line-run '((t :inherit compilation-warning)) "Face for Compilation mode's \"running\" mode line indicator." - :group 'compilation :version "24.3") (defface compilation-mode-line-exit @@ -790,19 +773,16 @@ starting the compilation process." (((class color)) (:foreground "green" :weight bold)) (t (:weight bold))) "Face for Compilation mode's \"exit\" mode line indicator." - :group 'compilation :version "24.3") (defface compilation-line-number '((t :inherit font-lock-keyword-face)) "Face for displaying line numbers in compiler messages." - :group 'compilation :version "22.1") (defface compilation-column-number '((t :inherit font-lock-doc-face)) "Face for displaying column numbers in compiler messages." - :group 'compilation :version "22.1") (defcustom compilation-message-face 'underline @@ -811,7 +791,6 @@ Faces `compilation-error-face', `compilation-warning-face', `compilation-info-face', `compilation-line-face' and `compilation-column-face' get prepended to this, when applicable." :type 'face - :group 'compilation :version "22.1") (defvar compilation-error-face 'compilation-error @@ -844,7 +823,6 @@ Faces `compilation-error-face', `compilation-warning-face', (defcustom compilation-auto-jump-to-first-error nil "If non-nil, automatically jump to the first error during compilation." :type 'boolean - :group 'compilation :version "23.1") (defvar compilation-auto-jump-to-next nil @@ -867,7 +845,6 @@ info, are considered errors." :type '(choice (const :tag "Skip warnings and info" 2) (const :tag "Skip info" 1) (const :tag "No skip" 0)) - :group 'compilation :version "22.1") (defun compilation-set-skip-threshold (level) @@ -891,7 +868,6 @@ Visited messages are ones for which the file, line and column have been jumped to from the current content in the current compilation buffer, even if it was from a different message." :type 'boolean - :group 'compilation :version "22.1") (defun compilation-type (type) @@ -1583,7 +1559,7 @@ If the optional argument `edit-command' is non-nil, the command can be edited." (setq command (compilation-read-command (or (car compilation-arguments) command))) (if compilation-arguments (setcar compilation-arguments command))) - (apply 'compilation-start (or compilation-arguments (list command))))) + (apply #'compilation-start (or compilation-arguments (list command))))) (defcustom compilation-scroll-output nil "Non-nil to scroll the *compilation* buffer window as output appears. @@ -1597,8 +1573,7 @@ point on its location in the *compilation* buffer." :type '(choice (const :tag "No scrolling" nil) (const :tag "Scroll compilation output" t) (const :tag "Stop scrolling at the first error" first-error)) - :version "20.3" - :group 'compilation) + :version "20.3") (defun compilation-buffer-name (name-of-mode mode-command name-function) @@ -1622,8 +1597,7 @@ Otherwise, construct a buffer name from NAME-OF-MODE." "If t, always kill a running compilation process before starting a new one. If nil, ask to kill it." :type 'boolean - :version "24.3" - :group 'compilation) + :version "24.3") ;;;###autoload (defun compilation-start (command &optional mode name-function highlight-regexp) @@ -1802,11 +1776,11 @@ Returns the compilation buffer created." (when compilation-always-kill (set-process-query-on-exit-flag proc nil)) - (set-process-sentinel proc 'compilation-sentinel) + (set-process-sentinel proc #'compilation-sentinel) (unless (eq mode t) ;; Keep the comint filter, since it's needed for proper ;; handling of the prompts. - (set-process-filter proc 'compilation-filter)) + (set-process-filter proc #'compilation-filter)) ;; Use (point-max) here so that output comes in ;; after the initial text, ;; regardless of where the user sees point. @@ -2114,7 +2088,7 @@ by replacing the first word, e.g., `compilation-scroll-output' from (let (revert-buffer-function) (revert-buffer ignore-auto noconfirm)) (if (or noconfirm (yes-or-no-p (format "Restart compilation? "))) - (apply 'compilation-start compilation-arguments)))) + (apply #'compilation-start compilation-arguments)))) (defvar compilation-current-error nil "Marker to the location from where the next error will be found. @@ -2150,7 +2124,7 @@ Optional argument MINOR indicates this is called from ;; It's generally preferable to use after-change-functions since they ;; can be subject to combine-after-change-calls, but if we do that, we risk ;; running our hook after font-lock, resulting in incorrect refontification. - (add-hook 'before-change-functions 'compilation--flush-parse nil t) + (add-hook 'before-change-functions #'compilation--flush-parse nil t) ;; Also for minor mode, since it's not permanent-local. (add-hook 'change-major-mode-hook #'compilation--remove-properties nil t) (if minor @@ -2162,7 +2136,7 @@ Optional argument MINOR indicates this is called from (defun compilation--unsetup () ;; Only for minor mode. (font-lock-remove-keywords nil (compilation-mode-font-lock-keywords)) - (remove-hook 'before-change-functions 'compilation--flush-parse t) + (remove-hook 'before-change-functions #'compilation--flush-parse t) (kill-local-variable 'compilation--parsed) (compilation--remove-properties) (font-lock-flush)) @@ -2175,8 +2149,7 @@ When Compilation Shell minor mode is enabled, all the error-parsing commands of the Compilation major mode are available but bound to keys that don't collide with Shell mode. See `compilation-mode'." - nil " Shell-Compile" - :group 'compilation + :lighter " Shell-Compile" (if compilation-shell-minor-mode (compilation-setup t) (compilation--unsetup))) @@ -2188,8 +2161,7 @@ See `compilation-mode'." When Compilation minor mode is enabled, all the error-parsing commands of Compilation major mode are available. See `compilation-mode'." - nil " Compilation" - :group 'compilation + :lighter " Compilation" (if compilation-minor-mode (compilation-setup t) (compilation--unsetup))) @@ -2379,7 +2351,7 @@ looking for the next message." 'compilation-message)) (setq pt (compilation-next-single-property-change pt 'compilation-message nil - (line-end-position))) + (line-end-position))) (or (setq msg (get-text-property pt 'compilation-message)) (setq pt (point))))) (setq last (compilation--loc->file-struct loc)) @@ -2397,7 +2369,7 @@ looking for the next message." "Moved back before first %s" (point-min)))) (goto-char pt) (or msg - (error "No %s here" compilation-error)))) + (user-error "No %s here" compilation-error)))) (defun compilation-previous-error (n) "Move point to the previous error in the compilation buffer. @@ -2585,7 +2557,6 @@ compilation output window; an arrow in the left fringe points to the current message. If nil and there is no left fringe, the message displays at the top of the window; there is no arrow." :type '(choice integer (const :tag "No window scrolling" nil)) - :group 'compilation :version "22.1") (defsubst compilation-set-window (w mk) @@ -2679,7 +2650,7 @@ and overlay is highlighted between MK and END-MK." (numberp next-error-highlight)) ;; We want highlighting: delete overlay on next input. (add-hook 'pre-command-hook - 'compilation-goto-locus-delete-o) + #'compilation-goto-locus-delete-o) ;; We don't want highlighting: delete overlay now. (delete-overlay compilation-highlight-overlay)) ;; We want highlighting for a limited time: @@ -2699,7 +2670,7 @@ and overlay is highlighted between MK and END-MK." (if (timerp next-error-highlight-timer) (cancel-timer next-error-highlight-timer)) (remove-hook 'pre-command-hook - 'compilation-goto-locus-delete-o)) + #'compilation-goto-locus-delete-o)) (defun compilation-find-file (marker filename directory &rest formats) "Find a buffer for file FILENAME. commit 00b8c7ef96dacaf36ec6e66356b4d100ad9b1530 Author: Eli Zaretskii Date: Fri Feb 15 15:45:23 2019 +0200 Make ls-lisp.el behave like Posix hosts when directory doesn't exist * lisp/ls-lisp.el (ls-lisp-insert-directory): For a directory that cannot be accessed, signal an error, like insert-directory does on Posix systems. This causes files-tests.el to pass on MS-Windows. diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index c00dd29c45..1f2c46834e 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -475,9 +475,13 @@ not contain `d', so that a full listing is expected." (ls-lisp-classify-file file fattr) file) fattr (file-attribute-size fattr) - switches time-index)) - (message "%s: doesn't exist or is inaccessible" file) - (ding) (sit-for 2))))) ; to show user the message! + switches time-index)) + ;; Emulate what we do on Posix hosts when we call access-file + ;; in insert-directory. + (signal 'file-error + (list "Reading directory" + "Directory doesn't exist or is inaccessible" + file)))))) (declare-function dired-read-dir-and-switches "dired" (str)) (declare-function dired-goto-next-file "dired" ()) commit 4d00262a8ebd3c8a0f3679a710b6bb8657bf2ca1 Author: Eli Zaretskii Date: Fri Feb 15 12:22:49 2019 +0200 Support ~USER for some names on MS-Windows * src/w32.c (getpwnam): Support usernames provided through LOGNAME or USERNAME environment variables, to mimic what editfns.c:init_editfns does. diff --git a/src/w32.c b/src/w32.c index c75a4f918d..197f6ddee2 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2091,7 +2091,29 @@ getpwnam (char *name) return pw; if (xstrcasecmp (name, pw->pw_name)) - return NULL; + { + /* Mimic what init_editfns does with these environment + variables, so that the likes of ~USER is recognized by + expand-file-name even if $LOGNAME gives a name different from + the real username produced by the process token. */ + char *logname = getenv ("LOGNAME"); + char *username = getenv ("USERNAME"); + if ((logname || username) + && xstrcasecmp (name, logname ? logname : username) == 0) + { + static struct passwd alias_user; + static char alias_name[PASSWD_FIELD_SIZE]; + + memcpy (&alias_user, &dflt_passwd, sizeof dflt_passwd); + alias_name[0] = '\0'; + strncat (alias_name, logname ? logname : username, + PASSWD_FIELD_SIZE - 1); + alias_user.pw_name = alias_name; + pw = &alias_user; + } + else + return NULL; + } return pw; } commit f721084f788dbbbf114c47f87af7d5771b5fb769 Author: Victor J. Orlikowski Date: Sun Feb 10 11:13:57 2019 -0500 Avoid errors in erc-dcc.el when erc-dcc-verbose is non-nil * lisp/erc/erc-dcc.el (erc-dcc-get-filter): Don't assume STR is always a string. Use 'buffer-name' to get the DCC file name, as buffer-file-name is not set in the process buffer. Copyright-paperwork-exempt: yes diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index c530b26c05..2b41c8c705 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -989,17 +989,20 @@ rather than every 1024 byte block, but nobody seems to care." (let ((inhibit-read-only t) received-bytes) (goto-char (point-max)) - (insert (string-make-unibyte str)) + (if str + (insert (string-make-unibyte str))) (when (> (point-max) erc-dcc-receive-cache) (erc-dcc-append-contents (current-buffer) erc-dcc-file-name)) - (setq received-bytes (+ (buffer-size) erc-dcc-byte-count)) + (setq received-bytes (buffer-size)) + (if erc-dcc-byte-count + (setq received-bytes (+ received-bytes erc-dcc-byte-count))) (and erc-dcc-verbose (erc-display-message nil 'notice erc-server-process 'dcc-get-bytes-received - ?f (file-name-nondirectory buffer-file-name) + ?f (file-name-nondirectory (buffer-name)) ?b (number-to-string received-bytes))) (cond ((and (> (plist-get erc-dcc-entry-data :size) 0) @@ -1007,7 +1010,7 @@ rather than every 1024 byte block, but nobody seems to care." (erc-display-message nil '(notice error) 'active 'dcc-get-file-too-long - ?f (file-name-nondirectory buffer-file-name)) + ?f (file-name-nondirectory (buffer-name))) (delete-process proc)) (t (process-send-string commit 3cba92d42ecf2156296b5f05c07a3d1ded78218e Author: Daniel Lopez Date: Thu Feb 14 16:05:10 2019 +0000 Fix faces in compilation messages * lisp/progmodes/compile.el (compilation-parse-errors): Don't clobber the value of TYPE inside the loop. (Bug#34479) Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a5dcbd7d38..5312a55a25 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1429,17 +1429,17 @@ to `compilation-error-regexp-alist' if RULES is nil." file line end-line col end-col (or type 2) fmt)) (when (integerp file) - (setq type (if (consp type) - (compilation-type type) - (or type 2))) - (compilation--note-type type) - - (compilation--put-prop - file 'font-lock-face - (symbol-value (aref [compilation-info-face - compilation-warning-face - compilation-error-face] - type)))) + (let ((this-type (if (consp type) + (compilation-type type) + (or type 2)))) + (compilation--note-type 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) commit 834ca187b855b4a2c532b1660bf02de401344f0f Author: Gregor Zattler Date: Wed Feb 13 21:01:17 2019 +0100 * doc/misc/eshell.texi (Built-ins): Fix alias description Dear eamcs developers, eshells current documentation first states that alias definitions are not saved to an alias file, later that they are saved to an alias file. I tested it and the latter is correct. Please find attached a patch which fixes this. Thanks for working on emacs which is really great, Gregor >From 1fe51cc769ab7a30d0896fb3d6105c0561243fa7 Mon Sep 17 00:00:00 2001 From: Gregor Zattler Date: Wed, 13 Feb 2019 20:19:38 +0100 Subject: * doc/misc/eshell.texi (Built-ins): Fix alias description. Bring description of built-in 'alias' in line with (info "(eshell) Aliases"), which describes the actual behaviur. (cherry picked from commit a48099ce7ff63cda416a870766fe61f5b8ac7c2c) diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index d2ea738f8d..42250a4470 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -280,8 +280,7 @@ with no arguments, prints the current paths in this variable. @item alias @cmindex alias -Define an alias (@pxref{Aliases}). This does not add it to the aliases -file. +Define an alias (@pxref{Aliases}). This adds it to the aliases file. @item clear @cmindex clear commit 25d9fe24a657565761f79d7d96e22777a94aa84f Author: Katsumi Yamaoka Date: Thu Feb 14 02:16:05 2019 +0000 Work for empty MIME attachments (related to bug#34387) * mm-view.el (mm-inline-text): Make undisplayer do nothing if the part is empty. * mm-decode.el (mm-copy-to-buffer): Work for empty MIME part. * mml.el (mime-to-mml): Ditto. diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 5dad2acbdd..21552abae7 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -764,7 +764,7 @@ MIME-Version header before proceeding." (mb (mm-multibyte-p)) beg) (goto-char (point-min)) - (search-forward-regexp "^\n" nil t) + (search-forward-regexp "^\n" nil 'move) ;; There might be no body. (setq beg (point)) (with-current-buffer (generate-new-buffer " *mm*") diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index d588e9b9a8..03e1e11813 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -368,10 +368,12 @@ (enriched-decode (point-min) (point-max)))) (mm-handle-set-undisplayer handle - `(lambda () - (let ((inhibit-read-only t)) - (delete-region ,(copy-marker (point-min) t) - ,(point-max-marker)))))))) + (if (= (point-min) (point-max)) + #'ignore + `(lambda () + (let ((inhibit-read-only t)) + (delete-region ,(copy-marker (point-min) t) + ,(point-max-marker))))))))) (defun mm-insert-inline (handle text) "Insert TEXT inline from HANDLE." diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index f2b969a15b..d5588971e5 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -979,8 +979,10 @@ If HANDLES is non-nil, use it instead reparsing the buffer." (unless handles (setq handles (mm-dissect-buffer t))) (goto-char (point-min)) - (search-forward "\n\n" nil t) - (delete-region (point) (point-max)) + (if (search-forward "\n\n" nil 'move) + (delete-region (point) (point-max)) + ;; No content in the part that is the sole part of this message. + (insert (if (bolp) "\n" "\n\n"))) (if (stringp (car handles)) (mml-insert-mime handles) (mml-insert-mime handles t)) commit 58e0e929afd432190296e6a412ff2458420fcb95 Author: Jackson Ray Hamilton Date: Sat Feb 9 11:50:05 2019 -0800 Backport: js-indent-align-list-continuation: Make variable safe * lisp/progmodes/js.el (js-indent-align-list-continuation): Indicate variable is safe as a file-local variable. This fixes the js-indent-align-list-continuation-nil test when run with make. (cherry picked from commit dd319f2711f895eec87c1017b82cd9d88d9ecd0a) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 65ffb0e02f..14571a04e1 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -479,6 +479,7 @@ This applies to function movement, marking, and so on." "Align continuation of non-empty ([{ lines in `js-mode'." :version "26.1" :type 'boolean + :safe 'booleanp :group 'js) (defcustom js-comment-lineup-func #'c-lineup-C-comments commit 6d89120b156576ca24e03472563f5ea0f01313f8 Author: Eli Zaretskii Date: Wed Feb 13 17:39:31 2019 +0200 Avoid crashes upon C-g in nested invocations of 'read_char' * src/keyboard.c (read_char, read_event_from_main_queue): Ensure the global value of getcjmp is restored when the stack is unwound by the likes of 'throw', by calling record_unwind_protect_ptr instead of restoring the value manually. (Bug#34394) (restore_getcjmp): Argument is now 'void *', to match the signature of record_unwind_protect_ptr. (cherry picked from commit 10527fca66e39d7067986904161fa33741abcd26) diff --git a/src/keyboard.c b/src/keyboard.c index 49c687f69a..282eac72b9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -364,7 +364,7 @@ static Lisp_Object make_lispy_focus_out (Lisp_Object); #endif /* HAVE_WINDOW_SYSTEM */ static bool help_char_p (Lisp_Object); static void save_getcjmp (sys_jmp_buf); -static void restore_getcjmp (sys_jmp_buf); +static void restore_getcjmp (void *); static Lisp_Object apply_modifiers (int, Lisp_Object); static void restore_kboard_configuration (int); static void handle_interrupt (bool); @@ -2144,12 +2144,14 @@ read_event_from_main_queue (struct timespec *end_time, return c; /* Actually read a character, waiting if necessary. */ + ptrdiff_t count = SPECPDL_INDEX (); save_getcjmp (save_jump); + record_unwind_protect_ptr (restore_getcjmp, save_jump); restore_getcjmp (local_getcjmp); if (!end_time) timer_start_idle (); c = kbd_buffer_get_event (&kb, used_mouse_menu, end_time); - restore_getcjmp (save_jump); + unbind_to (count, Qnil); if (! NILP (c) && (kb != current_kboard)) { @@ -2638,10 +2640,12 @@ read_char (int commandflag, Lisp_Object map, { Lisp_Object tem0; + ptrdiff_t count = SPECPDL_INDEX (); save_getcjmp (save_jump); + record_unwind_protect_ptr (restore_getcjmp, save_jump); restore_getcjmp (local_getcjmp); tem0 = sit_for (Vecho_keystrokes, 1, 1); - restore_getcjmp (save_jump); + unbind_to (count, Qnil); if (EQ (tem0, Qt) && ! CONSP (Vunread_command_events)) echo_now (); @@ -2712,10 +2716,12 @@ read_char (int commandflag, Lisp_Object map, timeout = min (timeout, MOST_POSITIVE_FIXNUM / delay_level * 4); timeout = delay_level * timeout / 4; + ptrdiff_t count1 = SPECPDL_INDEX (); save_getcjmp (save_jump); + record_unwind_protect_ptr (restore_getcjmp, save_jump); restore_getcjmp (local_getcjmp); tem0 = sit_for (make_number (timeout), 1, 1); - restore_getcjmp (save_jump); + unbind_to (count1, Qnil); if (EQ (tem0, Qt) && ! CONSP (Vunread_command_events)) @@ -3325,7 +3331,7 @@ save_getcjmp (sys_jmp_buf temp) } static void -restore_getcjmp (sys_jmp_buf temp) +restore_getcjmp (void *temp) { memcpy (getcjmp, temp, sizeof getcjmp); } commit 3f4b8e9a299f88a8ea11c0ea6a281a34852e541a Author: Stefan Monnier Date: Tue Feb 12 16:33:23 2019 -0500 * src/data.c (Fmake_local_variable): Fix bug#34318 Revert part of ed962f2b8a. * test/src/data-tests.el (data-tests-make-local-forwarded-var): Add corresponding test. diff --git a/src/data.c b/src/data.c index 571114802a..ed6dedbe24 100644 --- a/src/data.c +++ b/src/data.c @@ -1954,6 +1954,16 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) (current_buffer, Fcons (Fcons (variable, XCDR (blv->defcell)), BVAR (current_buffer, local_var_alist))); + + /* If the symbol forwards into a C variable, then load the binding + for this buffer now, to preserve the invariant that forwarded + variables must always hold the value corresponding to the + current buffer (they are swapped eagerly). + Otherwise, if C code modifies the variable before we load the + binding in, then that new value would clobber the default binding + the next time we unload it. See bug#34318. */ + if (blv->fwd) + swap_in_symval_forwarding (sym, blv); } return variable; diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 0069ee84fe..f3b4262de4 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el @@ -508,4 +508,22 @@ comparing the subr with a much slower lisp implementation." (bound-and-true-p data-tests-foo2) (bound-and-true-p data-tests-foo3))))))) +(ert-deftest data-tests-make-local-forwarded-var () ;bug#34318 + ;; Boy, this bug is tricky to trigger. You need to: + ;; - call make-local-variable on a forwarded var (i.e. one that + ;; has a corresponding C var linked via DEFVAR_(LISP|INT|BOOL)) + ;; - cause the C code to modify this variable from the C side of the + ;; forwarding, but this needs to happen before the var is accessed + ;; from the Lisp side and before we switch to another buffer. + ;; The trigger in bug#34318 doesn't exist any more because the C code has + ;; changes. Instead I found the trigger below. + (with-temp-buffer + (setq last-coding-system-used 'bug34318) + (make-local-variable 'last-coding-system-used) + ;; This should set last-coding-system-used to `no-conversion'. + (decode-coding-string "hello" nil) + (should (equal (list last-coding-system-used + (default-value 'last-coding-system-used)) + '(no-conversion bug34318))))) + ;;; data-tests.el ends here commit b384996e86cb5172dd0d5283f178de7f2654a2f4 Author: Eli Zaretskii Date: Tue Feb 12 19:32:55 2019 +0200 Minor fixes in ELisp manual wrt syntax-table properties * doc/lispref/syntax.texi (Syntax Properties): Fix reference to syntax-table properties. (Bug#34455) (Control Parsing): Remove redundant @vindex entry. diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index 90d380f5b8..0c43a8fa32 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -556,8 +556,8 @@ the current syntax table in the usual way. @defvar parse-sexp-lookup-properties If this is non-@code{nil}, the syntax scanning functions, like -@code{forward-sexp}, pay attention to syntax text properties. -Otherwise they use only the current syntax table. +@code{forward-sexp}, pay attention to @code{syntax-table} text +properties. Otherwise they use only the current syntax table. @end defvar @defvar syntax-propertize-function @@ -927,9 +927,9 @@ nicely. @defvar multibyte-syntax-as-symbol If this variable is non-@code{nil}, @code{scan-sexps} treats all -non-@acronym{ASCII} characters as symbol constituents regardless -of what the syntax table says about them. (However, text properties -can still override the syntax.) +non-@acronym{ASCII} characters as symbol constituents regardless of +what the syntax table says about them. (However, @code{syntax-table +}text properties can still override the syntax.) @end defvar @defopt parse-sexp-ignore-comments @@ -939,7 +939,6 @@ whitespace by the functions in this section and by @code{forward-sexp}, @code{scan-lists} and @code{scan-sexps}. @end defopt -@vindex parse-sexp-lookup-properties The behavior of @code{parse-partial-sexp} is also affected by @code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}). commit 71fc6d204b5952fc1fdbe005cf16f09f6641d0f5 Author: Michael Albinus Date: Tue Feb 12 12:58:15 2019 +0100 * admin/notes/emba: New file. diff --git a/admin/notes/emba b/admin/notes/emba new file mode 100644 index 0000000000..cb0dbc4809 --- /dev/null +++ b/admin/notes/emba @@ -0,0 +1,64 @@ +-*- mode: outline; coding: utf-8 -*- + +Copyright (C) 2019 Free Software Foundation, Inc. +See the end of the file for license conditions. + +NOTES FOR EMACS CONTINUOUS BUILD ON EMBA + +A continuous build for Emacs can be found at +, a Gitlab instance. It watches the +Emacs git repository and starts a pipeline (jobset) if there are new +changes. This happens for all Emacs branches. + +* Mail notifications + +In addition to the web interface, emba can send notifications by email +when a job fails. It sends notifications about test status to +. + +If you want to receive these notifications, please subscribe at +. + +Alternatively, these notifications can be read via gmane at +. + +The messages contain a URL to the log file of the failed job, like +. + +* Emacs jobset + +The Emacs jobset is defined in the Emacs source tree, file +'.gitlab-ci.yml'. It could be adapted for every Emacs branch, see +. + +Every job runs in a Debian docker container. It uses the local clone +of the Emacs git repository to perform a bootstrap and test of Emacs. +This could happen for several jobs with changed configuration, compile +and test parameters. + +* Emba configuration + +The emba configuration files are hosted on +. + +* Identifying emba + +Lisp packages, Makefiles, scripts, and other software could determine +whether they run on emba by checking for the environment variable +EMACS_EMBA_CI. + + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . commit 3aaa2d2058125a755bd6226cb4009811089812f8 Author: Eli Zaretskii Date: Mon Feb 11 18:07:35 2019 +0200 Fix Hunspell invocation for discovering its dictionaries * lisp/textmodes/ispell.el (ispell-find-hunspell-dictionaries): Invoke Hunspell with the -a switch, to prevent it from initializing its curses UI. (Bug#34272) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 656c9fad93..237997d41d 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1114,12 +1114,19 @@ dictionary from that list was found." null-device t nil + "-D" + ;; Use -a to prevent Hunspell from + ;; trying to initialize its + ;; curses/termcap UI, which causes it + ;; to crash or fail to start in some + ;; MS-Windows ports. + "-a" ;; Hunspell 1.7.0 (and later?) won't ;; show LOADED DICTIONARY unless ;; there's at least one file argument ;; on the command line. So we feed ;; it with the null device. - "-D" null-device) + null-device) (buffer-string)) "[\n\r]+" t))