commit 5d8bb89f0fa7d5f2824a914ce2b7c3841112c7a1 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Tue Dec 27 10:12:06 2016 +0200 Fix expand-file-name on DOS_NT systems when /: escaping is used * src/fileio.c (Fexpand_file_name) [DOS_NT]: Don't expand "~" in file names escaped by "/:". Don't recursively expand default-directory escaped with "/:" which is not followed by a drive spec. (Bug#25183) diff --git a/src/fileio.c b/src/fileio.c index 3ba85b2b90..1a744e02e2 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -884,6 +884,11 @@ filesystem tree, not (expand-file-name ".." dirname). */) /* Detect MSDOS file names with drive specifiers. */ && ! (IS_DRIVE (o[0]) && IS_DEVICE_SEP (o[1]) && IS_DIRECTORY_SEP (o[2])) + /* Detect escaped file names without drive spec after "/:". + These should not be recursively expanded, to avoid + including the default directory twice in the expanded + result. */ + && ! (o[0] == '/' && o[1] == ':') #ifdef WINDOWSNT /* Detect Windows file names in UNC format. */ && ! (IS_DIRECTORY_SEP (o[0]) && IS_DIRECTORY_SEP (o[1])) @@ -1064,7 +1069,11 @@ filesystem tree, not (expand-file-name ".." dirname). */) newdir = newdirlim = 0; - if (nm[0] == '~') /* prefix ~ */ + if (nm[0] == '~' /* prefix ~ */ +#ifdef DOS_NT + && !is_escaped /* don't expand ~ in escaped file names */ +#endif + ) { if (IS_DIRECTORY_SEP (nm[1]) || nm[1] == 0) /* ~ by itself */ commit 34b30c1ca4ff2f01bf716542d3dc85ef300df75a Author: Bake Timmons <65pandas@gmail.com> Date: Tue Dec 27 06:39:02 2016 +0000 Fix `mail-sources' value of `(group)' in Gnus manual (bug#25275) * doc/misc/gnus.texi (Mail Source Specifiers): Replace wrong `mail-sources' value of `(group)' in Gnus manual with the correct `((group))' value. (bug#25275) (tiny change) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index c34dd7caf0..393787c33a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -14656,7 +14656,7 @@ an additional mail source for a particular group by including the @code{group} mail specifier in @code{mail-sources}, and setting a @code{mail-source} group parameter (@pxref{Group Parameters}) specifying a single mail source. When this is used, @code{mail-sources} is -typically just @code{(group)}; the @code{mail-source} parameter for a +typically just @code{((group))}; the @code{mail-source} parameter for a group might look like this: @lisp commit 49c9670535ecfb4ba4a4473862852ad80ad15abe Author: Bake Timmons <65pandas@gmail.com> Date: Tue Dec 27 06:38:41 2016 +0000 Fix bug in customizing `mail-sources' variable (bug#25274) * lisp/gnus/mail-source.el (mail-sources): Use list instead of cons for lone argument. (bug#25274) (tiny change) diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 59a97dbb8c..8b7c8e0847 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -66,7 +66,7 @@ See Info node `(gnus)Mail Source Specifiers'." (repeat :tag "List" (choice :format "%[Value Menu%] %v" :value (file) - (cons :tag "Group parameter `mail-source'" + (list :tag "Group parameter `mail-source'" (const :format "" group)) (cons :tag "Spool file" (const :format "" file) commit 65b997b95e284e2edc1266663e39791f68d76ad7 Author: Philipp Stephani Date: Wed Nov 23 20:29:36 2016 +0100 Checkdoc: Don't require a space before an arg list See Bug#24998. * lisp/emacs-lisp/checkdoc.el (checkdoc-defun-regexp): Don't require a space before a argument list. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--bug-24998): Add unit test. diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 769c2fe574..2c8bc020d3 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -296,7 +296,7 @@ problem discovered. This is useful for adding additional checks.") (defvar checkdoc-defun-regexp "^(def\\(un\\|var\\|custom\\|macro\\|const\\|subst\\|advice\\)\ -\\s-+\\(\\(\\sw\\|\\s_\\)+\\)[ \t\n]+" +\\s-+\\(\\(\\sw\\|\\s_\\)+\\)[ \t\n]*" "Regular expression used to identify a defun. A search leaves the cursor in front of the parameter list.") diff --git a/test/lisp/emacs-lisp/checkdoc-tests.el b/test/lisp/emacs-lisp/checkdoc-tests.el new file mode 100644 index 0000000000..18b5a499e0 --- /dev/null +++ b/test/lisp/emacs-lisp/checkdoc-tests.el @@ -0,0 +1,40 @@ +;;; checkdoc-tests.el --- unit tests for checkdoc.el -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Google Inc. + +;; 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 . + +;;; Commentary: + +;; Unit tests for lisp/emacs-lisp/checkdoc.el. + +;;; Code: + +(require 'checkdoc) + +(require 'elisp-mode) +(require 'ert) + +(ert-deftest checkdoc-tests--bug-24998 () + "Checks that Bug#24998 is fixed." + (with-temp-buffer + (emacs-lisp-mode) + (insert "(defun foo())") + (should-error (checkdoc-defun) :type 'user-error))) + +;;; checkdoc-tests.el ends here