commit adab672edb3fad0851a52e3b6ccf3ac31c80b025 (HEAD, refs/remotes/origin/master) Author: Eric Abrahamsen Date: Thu Aug 5 17:53:05 2021 -0700 Further fix to filtering Gnus search group names * lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Group names in the GROUPS argument may be prefixed or not, depending on which server we're searching, so always enforce prefix policy within the function. diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 53af2f6fe6..8182630dfe 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1358,6 +1358,7 @@ Returns a list of [group article score] vectors." server query &optional groups) (let ((prefix (or (slot-value engine 'remove-prefix) "")) + (groups (mapcar #'gnus-group-short-name groups)) artlist article group) (goto-char (point-min)) ;; Prep prefix, we want to at least be removing the root @@ -1384,7 +1385,6 @@ Returns a list of [group article score] vectors." nil t) nil t) nil t)) - (setq group (gnus-group-full-name group server)) (setq article (file-name-nondirectory f-name) article ;; TODO: Provide a cleaner way of producing final @@ -1404,10 +1404,12 @@ Returns a list of [group article score] vectors." (setq artlist (gnus-search-grep-search engine artlist grep-reg))) ;; Munge into the list of vectors expected by nnselect. (mapcar (pcase-lambda (`(,_ ,article ,group ,score)) - (vector group article - (if (numberp score) - score - (string-to-number score)))) + (vector + (gnus-group-full-name group server) + article + (if (numberp score) + score + (string-to-number score)))) artlist))) (cl-defmethod gnus-search-indexed-extract ((_engine gnus-search-indexed)) commit 85c8a9cd0cff0e2f6d5470423731d9f1e87e2cde Author: Eli Zaretskii Date: Sat Aug 7 14:29:45 2021 +0300 Fix files-tests broken on MS-Windows by a recent change * test/lisp/files-tests.el (files-colon-path): Use path-separator, and account for drive letters in absolute file names on MS-Windows. (Bug#49918) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 523f51e019..a612c0617d 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1462,9 +1462,11 @@ See ." '("x:/foo/bar/baz/"))) (should (equal (parse-colon-path "/foo//bar/baz") '("/foo/bar/baz/")))) - - (should (equal (parse-colon-path ".:/tmp") - '("./" "/tmp/")))) + (let* ((path (concat "." path-separator "/tmp")) + (parsed-path (parse-colon-path path)) + (name-start (if (memq system-type '(windows-nt ms-dos)) 2))) + (should (equal (car parsed-path) "./")) + (should (equal (substring (cadr parsed-path) name-start) "/tmp/")))) (ert-deftest files-test-magic-mode-alist-doctype () "Test that DOCTYPE and variants put files in mhtml-mode." commit e1ce9904aa5511468d295cac3221cb77de994331 Author: Lars Ingebrigtsen Date: Sat Aug 7 13:02:01 2021 +0200 Fix prin1 problem in package-quickstart-refresh * lisp/emacs-lisp/package.el (package-quickstart-refresh): Bind print-length/print-level before using prin1-to-string (bug#49924). diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 37dcbe36c8..dfd2148aa6 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4169,7 +4169,9 @@ activations need to be changed, such as when `package-load-list' is modified." ;; Prefer uncompiled files (and don't accept .so files). (let ((load-suffixes '(".el" ".elc"))) (locate-library (package--autoloads-file-name pkg)))) - (pfile (prin1-to-string file))) + (pfile (let ((print-length nil) + (print-level nil)) + (prin1-to-string file)))) (insert "(let ((load-true-file-name " pfile ")\ (load-file-name " pfile "))\n") (insert-file-contents file) commit bc1ffc5f6e4f560dec04637e1aeadb7a5db918c4 Author: Lars Ingebrigtsen Date: Sat Aug 7 12:59:22 2021 +0200 Fix print-length issue in comp-run-async-workers * lisp/emacs-lisp/comp.el (comp-run-async-workers): Bind print-length/print-level to ensure there's no truncation (bug#49922). diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 638d4b274c..a04413b6f0 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3936,7 +3936,9 @@ display a message." (concat "emacs-async-comp-" (file-name-base source-file) "-") nil ".el")) - (expr-strings (mapcar #'prin1-to-string expr)) + (expr-strings (let ((print-length nil) + (print-level nil)) + (mapcar #'prin1-to-string expr))) (_ (progn (with-temp-file temp-file (mapc #'insert expr-strings)) commit 6a3920c07eaae58408dd27e7db22bff7ad4d1f80 Author: Lars Ingebrigtsen Date: Sat Aug 7 12:55:39 2021 +0200 Make `q' in `org-agenda' work even with `debug-on-error' set * lisp/org/org-agenda.el (org-agenda-get-restriction-and-command): Using `error' here will trigger users with `debug-on-error' so use `user-error' instead (bug#49920). It would probably be preferable to rewrite this to not use the error system to do control flow. diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 8a4aa2b1be..3acc18715d 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -3205,7 +3205,7 @@ s Search for keywords M Like m, but only TODO entries (delete-window) (org-agenda-get-restriction-and-command prefix-descriptions)) - ((equal c ?q) (error "Abort")) + ((equal c ?q) (user-error "Abort")) (t (user-error "Invalid key %c" c)))))))) (defun org-agenda-fit-window-to-buffer () commit 9a6fc638433c19021278616019ef5064740f86fe Author: Lars Ingebrigtsen Date: Sat Aug 7 12:50:56 2021 +0200 Fix problem with relative directories in CDPATH * lisp/files.el (parse-colon-path): Allow relative directories (like ".") in CDPATH (bug#49918). diff --git a/lisp/files.el b/lisp/files.el index c260795691..b58f90db48 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -782,7 +782,10 @@ nil (meaning `default-directory') as the associated list element." (let ((spath (substitute-env-vars search-path))) (mapcar (lambda (f) (if (equal "" f) nil - (let ((dir (expand-file-name (file-name-as-directory f)))) + (let ((dir (file-name-as-directory f))) + (when (file-name-absolute-p dir) + ;; Expand "~". + (setq dir (expand-file-name dir))) ;; Previous implementation used `substitute-in-file-name' ;; which collapse multiple "/" in front. Do the same for ;; backward compatibility. diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 640f7d8420..523f51e019 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1461,7 +1461,10 @@ See ." (should (equal (parse-colon-path "x:/foo//bar/baz") '("x:/foo/bar/baz/"))) (should (equal (parse-colon-path "/foo//bar/baz") - '("/foo/bar/baz/"))))) + '("/foo/bar/baz/")))) + + (should (equal (parse-colon-path ".:/tmp") + '("./" "/tmp/")))) (ert-deftest files-test-magic-mode-alist-doctype () "Test that DOCTYPE and variants put files in mhtml-mode." commit c62e805d80fc5d47325ed0ee84a7f3879e85cbd9 Author: Tomasz Konojacki Date: Sat Aug 7 12:36:22 2021 +0200 perl-mode: fix variable fontification * lisp/progmodes/perl-mode.el: Handle variables first to avoid conflicting with keywords. This fixes cases like "$package" (bug#49906). Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index f49ee4cb2b..4e14c30bc5 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -178,6 +178,14 @@ (defconst perl-font-lock-keywords-2 (append + '(;; Fontify function, variable and file name references. They have to be + ;; handled first because they might conflict with keywords. + ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face) + ;; Additionally fontify non-scalar variables. `perl-non-scalar-variable' + ;; will underline them by default. + ("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-variable-name-face) + ("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)" + (2 'perl-non-scalar-variable))) perl-font-lock-keywords-1 `( ;; Fontify keywords, except those fontified otherwise. ,(concat "\\<" @@ -188,15 +196,6 @@ ;; ;; Fontify declarators and prefixes as types. ("\\<\\(has\\|local\\|my\\|our\\|state\\)\\>" . font-lock-keyword-face) ; declarators - ;; - ;; Fontify function, variable and file name references. - ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face) - ;; Additionally fontify non-scalar variables. `perl-non-scalar-variable' - ;; will underline them by default. - ;;'("[$@%*][#{]?\\(\\sw+\\)" 1 font-lock-variable-name-face) - ("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-variable-name-face) - ("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)" - (2 'perl-non-scalar-variable)) ("<\\(\\sw+\\)>" 1 font-lock-constant-face) ;; ;; Fontify keywords with/and labels as we do in `c++-font-lock-keywords'. diff --git a/test/lisp/progmodes/perl-mode-tests.el b/test/lisp/progmodes/perl-mode-tests.el index f63f8ad725..3f4af5e1f6 100644 --- a/test/lisp/progmodes/perl-mode-tests.el +++ b/test/lisp/progmodes/perl-mode-tests.el @@ -21,6 +21,13 @@ (require 'perl-mode) +(ert-deftest perl-test-lock () + (with-temp-buffer + (perl-mode) + (insert "$package = foo;") + (font-lock-ensure (point-min) (point-max)) + (should (equal (get-text-property 4 'face) 'font-lock-variable-name-face)))) + ;;;; Re-use cperl-mode tests (defvar cperl-test-mode) commit b8e3b0f157db29aa7cf42783f12f87815547efb6 Author: Mattias EngdegÄrd Date: Sat Aug 7 11:11:52 2021 +0200 ; * lisp/replace.el (occur-1): Remove old fringe arrow. diff --git a/lisp/replace.el b/lisp/replace.el index 54d652b2ed..ee46286a75 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1898,6 +1898,7 @@ See also `multi-occur'." ;; Make the default-directory of the *Occur* buffer match that of ;; the buffer where the occurrences come from (setq default-directory source-buffer-default-directory) + (setq overlay-arrow-position nil) (if (stringp nlines) (fundamental-mode) ;; This is for collect operation. (occur-mode)) commit 8ce7a697ca8d654271021a9580ed1054df58100e Author: Lars Ingebrigtsen Date: Sat Aug 7 11:56:37 2021 +0200 Allow building on MacOS with MacPorts and libgccjit * configure.ac: Check for the "port" command (MacPorts). Add the required lib/include directories for nativecomp. * src/Makefile.in (LIBGCCJIT_CFLAGS, LIBGCCJIT_LIBS): Split into two parts to allow including -L/-I for MacPorts. (LIBES): Adjust. (EMACS_CFLAGS): Ditto. diff --git a/configure.ac b/configure.ac index 79cc56f9a7..be97d9c8a0 100644 --- a/configure.ac +++ b/configure.ac @@ -1334,6 +1334,9 @@ if test -n "$BREW"; then [`$BREW --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH]) fi +# Check MacPorts on macOS. +AC_PATH_PROG(HAVE_MACPORTS, port) + ## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. : ${MAKEINFO:=makeinfo} case `($MAKEINFO --version) 2>/dev/null` in @@ -3807,7 +3810,8 @@ source on this site: .])]) HAVE_NATIVE_COMP=no -LIBGCCJIT_LIB= +LIBGCCJIT_LIBS= +LIBGCCJIT_CFLAGS= if test "${with_native_compilation}" != "no"; then if test "${HAVE_PDUMPER}" = no; then AC_MSG_ERROR(['--with-nativecomp' requires '--with-dumping=pdumper']) @@ -3827,6 +3831,20 @@ if test "${with_native_compilation}" != "no"; then fi fi + # Ensure libgccjit installed by MacPorts can be found. + if test -n "$HAVE_MACPORTS"; then + # Determine which gcc version has been installed (gcc11, for + # instance). + PORT_PACKAGE=$(port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \ + awk '{ print $1; }') + MACPORTS_LIBGCCJIT_INCLUDE=$(dirname $(port contents $PORT_PACKAGE | \ + grep libgccjit.h)) + MACPORTS_LIBGCCJIT_LIB=$(dirname $(port contents $PORT_PACKAGE | \ + grep libgccjit.dylib)) + CFLAGS="$CFLAGS -I${MACPORTS_LIBGCCJIT_INCLUDE}" + LDFLAGS="$LDFLAGS -L${MACPORTS_LIBGCCJIT_LIB}" + fi + # Check if libgccjit is available. AC_CHECK_LIB(gccjit, gcc_jit_context_acquire, [], [libgccjit_not_found]) AC_CHECK_HEADERS(libgccjit.h, [], [libgccjit_dev_not_found]) @@ -3841,17 +3859,24 @@ if test "${with_native_compilation}" != "no"; then mingw32) ;; # OpenBSD doesn't have libdl, all the functions are in libc netbsd|openbsd) - LIBGCCJIT_LIB="-lgccjit" ;; + LIBGCCJIT_LIBS="-lgccjit" ;; *) - LIBGCCJIT_LIB="-lgccjit -ldl" ;; + LIBGCCJIT_LIBS="-lgccjit -ldl" ;; esac NEED_DYNLIB=yes AC_DEFINE(HAVE_NATIVE_COMP, 1, [Define to 1 if native compiler is available.]) + + # Ensure libgccjit installed by MacPorts can be found. + if test -n "$HAVE_MACPORTS"; then + LIBGCCJIT_CFLAGS="$LIBGCCJIT_CFLAGS -I${MACPORTS_LIBGCCJIT_INCLUDE}" + LIBGCCJIT_LIBS="-L${MACPORTS_LIBGCCJIT_LIB} $LIBGCCJIT_LIBS" + fi fi AC_DEFINE_UNQUOTED(NATIVE_ELISP_SUFFIX, ".eln", [System extension for native compiled elisp]) AC_SUBST(HAVE_NATIVE_COMP) -AC_SUBST(LIBGCCJIT_LIB) +AC_SUBST(LIBGCCJIT_CFLAGS) +AC_SUBST(LIBGCCJIT_LIBS) DYNLIB_OBJ= if test "${NEED_DYNLIB}" = yes; then diff --git a/src/Makefile.in b/src/Makefile.in index 22c7aeed5c..732cd8f099 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -326,7 +326,8 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ LIBGMP = @LIBGMP@ -LIBGCCJIT = @LIBGCCJIT_LIB@ +LIBGCCJIT_LIBS = @LIBGCCJIT_LIBS@ +LIBGCCJIT_CFLAGS = @LIBGCCJIT_CFLAGS@ ## dynlib.o if necessary, else empty DYNLIB_OBJ = @DYNLIB_OBJ@ @@ -367,7 +368,7 @@ EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ -I$(lib) -I$(top_srcdir)/lib \ $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ - $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ + $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(LIBGCCJIT_CFLAGS) $(DBUS_CFLAGS) \ $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) $(XDBE_CFLAGS) \ $(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ @@ -516,7 +517,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(HARFBUZZ_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \ $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \ - $(JSON_LIBS) $(LIBGMP) $(LIBGCCJIT) + $(JSON_LIBS) $(LIBGMP) $(LIBGCCJIT_LIBS) ## FORCE it so that admin/unidata can decide whether this file is ## up-to-date. Although since charprop depends on bootstrap-emacs,