commit e775ef2f57e7889e29edbf44e6f6a2deb79d2635 (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Fri Jun 11 14:06:29 2021 -0400 * lisp/emacs-lisp/benchmark.el (benchmark-elapse): Tweak diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index 439d3bd363..64c628822d 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -37,8 +37,7 @@ "Return the time in seconds elapsed for execution of FORMS." (declare (indent 0) (debug t)) (let ((t1 (make-symbol "t1"))) - `(let (,t1) - (setq ,t1 (current-time)) + `(let ((,t1 (current-time))) ,@forms (float-time (time-since ,t1))))) commit 87bd14ca8bdecda6964aeb3c323faee846a8c1b8 Author: Harald Jörg Date: Fri Jun 11 13:52:45 2021 +0200 ; perl-mode.el: Allow newline between quote-likes and delimiter * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Allow newline between a quote-like operator and its delimiter (Bug#22355). * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-22355): Test case for the fix. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl: Test resource for a quote-like with newline before the delimiter. diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index a20887621e..f49ee4cb2b 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -285,7 +285,7 @@ (put-text-property (match-beginning 2) (match-end 2) 'syntax-table (string-to-syntax "\"")) (perl-syntax-propertize-special-constructs end))))) - ("\\(^\\|[?:.,;=|&!~({[ \t]\\|=>\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" + ("\\(^\\|[?:.,;=|&!~({[ \t]\\|=>\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\(?:\\s-\\|\n\\)*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" ;; Nasty cases: ;; /foo/m $a->m $#m $m @m %m ;; \s (appears often in regexps). diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl new file mode 100644 index 0000000000..f54d55241d --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl @@ -0,0 +1,14 @@ +# The source file contains non-ASCII characters, supposed to be saved +# in UTF-8 encoding. Tell Perl about that, just in case. +use utf8; + +# Following code is the example from the report Bug#22355 which needed +# attention in perl-mode. + +printf qq +{ + + + 台灣 %s 廣播電台 + +}, uc( substr( $ARGV[0], 0, 2 ) ), $year + 1900, $mon + 1, $mday; diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index dcf4f398c2..4d2bac6ee4 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -377,6 +377,17 @@ documentation it does the right thing anyway." (cperl-indent-command) (forward-line 1)))) +(ert-deftest cperl-test-bug-22355 () + "Verify that substitutions are fontified directly after \"|&\". +Regular expressions are strings in both perl-mode and cperl-mode." + (with-temp-buffer + (insert-file-contents (ert-resource-file "cperl-bug-22355.pl")) + (funcall cperl-test-mode) + (goto-char (point-min)) + ;; Just check for the start of the string + (search-forward "{") + (should (nth 3 (syntax-ppss))))) + (ert-deftest cperl-test-bug-23992 () "Verify that substitutions are fontified directly after \"|&\". Regular expressions are strings in both perl-mode and cperl-mode." commit 56e21ab2e1bf4836573acfeb1e36716526a183b9 Author: Robert Pluim Date: Fri Jun 11 11:30:13 2021 +0200 ; Improve delete-window-choose-selected documentation * doc/lispref/windows.texi (Deleting Windows): Improve delete-window-choose-selected documentation. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 6792d1b2d2..3b6f74b89c 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1320,23 +1320,23 @@ Parameters}. When @code{delete-window} deletes the selected window of its frame, it has to make another window the new selected window of that frame. The -following option allows to choose which window gets selected instead. +following option allows configuring which window is chosen. @defopt delete-window-choose-selected -This option allows to specify which window should become a frame's +This option allows specifying which window should become a frame's selected window after @code{delete-window} has deleted the previously selected one. Possible choices are @itemize @item @code{mru} -(the default) to choose the most recently used window on that frame. +(the default) choose the most recently used window on that frame. @item @code{pos} -to choose the window comprising the frame coordinates of point of the +choose the window comprising the frame coordinates of point of the previously selected window on that frame. @item @code{nil} -to choose the first window (the window returned by +choose the first window (the window returned by @code{frame-first-window}) on that frame. @end itemize