commit d2270d8fc93b5fb0b82fec4d85d122ea4e38dff3 (HEAD, refs/remotes/origin/master) Author: Alan Third Date: Sat Feb 16 10:56:13 2019 +0000 Don't redraw the glyph on top of bar cursors * src/nsterm.m (ns_draw_window_cursor): Limit when we redraw the glyph. diff --git a/src/nsterm.m b/src/nsterm.m index ccf8ecc4d2..81d36be6cc 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3262,8 +3262,9 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. break; } - /* draw the character under the cursor */ - if (cursor_type != NO_CURSOR) + /* Draw the character under the cursor. Other terms only draw + the character on top of box cursors, so do the same here. */ + if (cursor_type == FILLED_BOX_CURSOR || cursor_type == HOLLOW_BOX_CURSOR) draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); ns_reset_clipping (f); commit eed512814c45cd5859a1814bf07ad18ea3fa3b1a Author: Arash Esbati Date: Fri Mar 8 22:01:01 2019 +0100 ; Improve matching of key-val labels yet more (bug#34629) * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Match explicitly for key-val labels in optional arguments of environments provided by "listings" and "breqn" packages and the macro "\ctable" from the package of the same name. Update docstring. diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index eb1dfc50a3..88ad4478b0 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -894,11 +894,25 @@ DOWNCASE t: Downcase words before using them." `(;; Normal \\label{foo} labels "\\\\label{\\(?1:[^}]*\\)}" ;; keyvals [..., label = {foo}, ...] forms used by ctable, - ;; listings, minted, ... + ;; listings, breqn, ... ,(concat ;; Make sure we search only for optional arguments of - ;; environments and don't match any other [ - "\\\\begin[[:space:]]*{\\(?:[^}]+\\)}[[:space:]]*" + ;; environments/macros and don't match any other [. ctable + ;; provides a macro called \ctable, listings/breqn have + ;; environments. Start with a backslash and a group for names + "\\\\\\(?:" + ;; begin, optional spaces and opening brace + "begin[[:space:]]*{" + ;; Build a regexp for env names + (regexp-opt '("lstlisting" "dmath" "dseries" "dgroup" "darray")) + ;; closing brace, optional spaces + "}[[:space:]]*" + ;; Now for macros + "\\|" + ;; Build a regexp for macro names; currently only \ctable + (regexp-opt '("ctable")) + ;; Close the group for names + "\\)" ;; Match the opening [ and the following chars "\\[[^][]*" ;; Allow nested levels of chars enclosed in braces @@ -912,13 +926,18 @@ DOWNCASE t: Downcase words before using them." ;; Match the label value; braces around the value are ;; optional. "{?\\(?1:[^] ,}\r\n\t%]+\\)}?" - ;; We are done. Such search until the next closing bracket + ;; We are done. Just search until the next closing bracket "[^]]*\\]")) "List of regexps matching \\label definitions. The default value matches usual \\label{...} definitions and -keyval style [..., label = {...}, ...] label definitions. It is -assumed that the regexp group 1 matches the label text, so you -have to define it using \\(?1:...\\) when adding new regexps. +keyval style [..., label = {...}, ...] label definitions. The +regexp for keyval style explicitly looks for environments +provided by the packages \"listings\" (\"lstlisting\"), +\"breqn\" (\"dmath\", \"dseries\", \"dgroup\", \"darray\") and +the macro \"\\ctable\" provided by the package of the same name. + +It is assumed that the regexp group 1 matches the label text, so +you have to define it using \\(?1:...\\) when adding new regexps. When changed from Lisp, make sure to call `reftex-compile-variables' afterwards to make the change commit 01b099bb3db740d53f3e79f3183767b071ddf6f9 Author: Stefan Monnier Date: Fri Mar 8 17:27:38 2019 -0500 * lisp/emacs-lisp/autoload.el (make-autoload): Don't add useless doc More specifically, don't add a useless '(fn)' to the docstring for functions which take no arguments. This should fix the 'No docstring slot for pcase--make-docstring' warning during bootstrap. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index a369d97212..19e1e93621 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -146,7 +146,7 @@ expression, in which case we want to handle forms differently." t)))) ;; Add the usage form at the end where describe-function-1 ;; can recover it. - (when (listp args) (setq doc (help-add-fundoc-usage doc args))) + (when (consp args) (setq doc (help-add-fundoc-usage doc args))) ;; (message "autoload of %S" (nth 1 form)) `(autoload ,(nth 1 form) ,file ,doc ,interactive ,type))) commit 76fdae8549ab54bd075520134deec0d69ac6987d Author: Stefan Monnier Date: Fri Mar 8 17:20:58 2019 -0500 * lisp/emacs-lisp/cursor-sensor.el: Fix sensor behavior with overlays (cursor-sensor--detect): Also consult overlay properties when checking to see if we just moved inside the same "element" as opposed to changing from one to another of the same type. diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el index a21d78998a..66b940f7fb 100644 --- a/lisp/emacs-lisp/cursor-sensor.el +++ b/lisp/emacs-lisp/cursor-sensor.el @@ -160,7 +160,7 @@ By convention, this is a list of symbols where each symbol stands for the (setcdr old nil)) (if (or (and (null new) (null (cdr old))) (and (eq new (cdr old)) - (eq (next-single-property-change + (eq (next-single-char-property-change start 'cursor-sensor-functions nil end) end))) ;; Clearly nothing to do. @@ -172,7 +172,7 @@ By convention, this is a list of symbols where each symbol stands for the (let ((pos start) (missing nil)) (while (< pos end) - (setq pos (next-single-property-change + (setq pos (next-single-char-property-change pos 'cursor-sensor-functions nil end)) (unless (memq f (get-char-property commit bec7fb2988c98a4103cc77bebc454c81a89e0f49 Author: Tassilo Horn Date: Fri Mar 8 19:59:32 2019 +0100 New command ido-switch-to-completions. * lisp/ido.el (ido-switch-to-completions): New command. diff --git a/lisp/ido.el b/lisp/ido.el index c268289a18..0854014581 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3965,8 +3965,24 @@ If `ido-change-word-sub' cannot be found in WORD, return nil." (exit-minibuffer) t)) +;; This is a shameless copy of `switch-to-completions'. +(defun ido-switch-to-completions () + "Select the window showing `ido-completion-buffer'." + (interactive) + (let ((window (or (get-buffer-window ido-completion-buffer 0) + ;; Make sure we have a completions window. + (progn (ido-completion-help) + (get-buffer-window ido-completion-buffer 0))))) + (when window + (select-window window) + ;; In the new buffer, go to the first completion. + ;; FIXME: Perhaps this should be done in `ido-completion-help'. + (when (bobp) + (next-completion 1))))) + + (defun ido-completion-help () - "Show possible completions in a \"*File Completions*\" buffer." + "Show possible completions in the `ido-completion-buffer'." (interactive) (setq ido-rescan nil) (let ((temp-buf (and ido-completion-buffer commit db9c924d3d53f46846ad8fd74a5d08f4586a520e Author: Paul Eggert Date: Fri Mar 8 09:08:46 2019 -0800 More regexp corrections and tweaks From suggestions by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2019-03/msg00131.html * lisp/arc-mode.el (archive-rar-summarize): * lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp): * lisp/language/ethio-util.el (ethio-fidel-to-tex-buffer): * lisp/nxml/rng-uri.el (rng-file-name-uri): * lisp/org/org-mobile.el (org-mobile-apply): * lisp/progmodes/cperl-mode.el (cperl-init-faces): * lisp/progmodes/fortran.el (fortran-fill): * lisp/progmodes/mantemp.el (mantemp-remove-comments) (mantemp-remove-memfuncs, mantemp-insert-cxx-syntax): * lisp/speedbar.el (speedbar-directory-buttons-follow): * lisp/vc/add-log.el (change-log-font-lock-keywords): Fix more regular expressions that seem to be typos or infelicities. diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 2afde7ee75..6a58d61a54 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -2016,7 +2016,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (call-process "lsar" nil t nil "-l" (or file copy)) (if copy (delete-file copy)) (goto-char (point-min)) - (re-search-forward "^\\(\s+=+\s+\\)+\n") + (re-search-forward "^\\(\s+=+\s*\\)+\n") (while (looking-at (concat "^\s+[0-9.]+\s+D?-+\s+" ; Flags "\\([0-9-]+\\)\s+" ; Size "\\([-0-9.%]+\\|-+\\)\s+" ; Ratio diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index fa3abfac58..baf44cb483 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -7376,9 +7376,8 @@ groups." :group 'gnus-article-buttons :type 'regexp) -;; Regexp suggested by Felix Wiemann in <87oeuomcz9.fsf@news2.ososo.de> (defcustom gnus-button-valid-localpart-regexp - "[a-z$%(*-=?[_][^<>\")!;:,{}\n\t @]*" + "[-a-z0-9$%(*+./=?[_][^<>\")!;:,{}\n\t @]*" "Regular expression that matches a localpart of mail addresses or MIDs." :version "22.1" :group 'gnus-article-buttons diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el index 512d49b9c5..04b15ddd9a 100644 --- a/lisp/language/ethio-util.el +++ b/lisp/language/ethio-util.el @@ -804,7 +804,7 @@ The 2nd and 3rd arguments BEGIN and END specify the region." ;; Special Ethiopic punctuation. (goto-char (point-min)) - (while (re-search-forward "\\ce[»\\.?]\\|«\\ce" nil t) + (while (re-search-forward "\\ce[».?]\\|«\\ce" nil t) (cond ((= (setq ch (preceding-char)) ?\») (delete-char -1) diff --git a/lisp/nxml/rng-uri.el b/lisp/nxml/rng-uri.el index d8f2884f5e..798475bbc3 100644 --- a/lisp/nxml/rng-uri.el +++ b/lisp/nxml/rng-uri.el @@ -30,9 +30,10 @@ Multibyte characters are left as is. Use `rng-uri-escape-multibyte' to escape them using %HH." (setq f (expand-file-name f)) (let ((url - (replace-regexp-in-string "[\000-\032\177<>#%\"{}|\\^[]`%?;]" - 'rng-percent-encode - f))) + ;; FIXME. Explain why the pattern doesn't also have "!$&'()*+,/:@=". + ;; See Internet RFC 3986 section 2.2. + (replace-regexp-in-string "[]\0-\s\"#%;<>?[\\^`{|}\177]" + 'rng-percent-encode f))) (concat "file:" (if (and (> (length url) 0) (= (aref url 0) ?/)) diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index 83dcc7b0d1..8b4e895388 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el @@ -845,11 +845,11 @@ If BEG and END are given, only do this in that region." (cl-incf cnt-error) (throw 'next t)) (move-marker bos-marker (point)) - (if (re-search-forward "^\\*\\* Old value[ \t]*$" eos t) + (if (re-search-forward "^\\** Old value[ \t]*$" eos t) (setq old (buffer-substring (1+ (match-end 0)) (progn (outline-next-heading) (point))))) - (if (re-search-forward "^\\*\\* New value[ \t]*$" eos t) + (if (re-search-forward "^\\** New value[ \t]*$" eos t) (setq new (buffer-substring (1+ (match-end 0)) (progn (outline-next-heading) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 0fe4b106c5..a9402e17a9 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -5736,9 +5736,9 @@ indentation and initial hashes. Behaves usually outside of comment." (if (eq (char-after (cperl-1- (match-end 0))) ?\{ ) 'font-lock-function-name-face 'font-lock-variable-name-face)))) - '("\\<\\(package\\|require\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t;]" ; require A if B; + '("\\<\\(package\\|require\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-Z_][a-zA-Z_0-9:]*\\)[ \t;]" ; require A if B; 2 font-lock-function-name-face) - '("^[ \t]*format[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t]*=[ \t]*$" + '("^[ \t]*format[ \t]+\\([a-zA-Z_][a-zA-Z_0-9:]*\\)[ \t]*=[ \t]*$" 1 font-lock-function-name-face) (cond ((featurep 'font-lock-extra) '("\\([]}\\\\%@>*&]\\|\\$[a-zA-Z0-9_:]*\\)[ \t]*{[ \t]*\\(-?[a-zA-Z0-9_:]+\\)[ \t]*}" diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index c1a267f4c5..b8aa521cf6 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -2052,7 +2052,7 @@ If ALL is nil, only match comments that start in column > 0." (when (<= (point) bos) (move-to-column (1+ fill-column)) ;; What is this doing??? - (or (re-search-forward "[-\t\n,'+./*)=]" eol t) + (or (re-search-forward "[-\t\n,'+/*)=]" eol t) (goto-char bol))) (if (bolp) (re-search-forward "[ \t]" opoint t)) diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el index 9beeb4aae6..4190a84727 100644 --- a/lisp/progmodes/mantemp.el +++ b/lisp/progmodes/mantemp.el @@ -89,7 +89,7 @@ (save-excursion (goto-char (point-min)) (message "Removing comments") - (while (re-search-forward "^[A-z.()+0-9: ]*`\\|'.*$" nil t) + (while (re-search-forward "^[a-zA-Z.()+0-9: ]*`\\|'.*$" nil t) (replace-match "")))) (defun mantemp-remove-memfuncs () @@ -99,14 +99,14 @@ (goto-char (point-min)) (message "Removing member function extensions") (while (re-search-forward - "^[A-z :&*<>~=,0-9+]*>::operator " nil t nil) + "^[a-zA-Z :&*<>~=,0-9+]*>::operator " nil t nil) (progn (backward-char 11) (delete-region (point) (line-end-position)))) ;; Remove other member function extensions. (goto-char (point-min)) (message "Removing member function extensions") - (while (re-search-forward "^[A-z :&*<>~=,0-9+]*>::" nil t nil) + (while (re-search-forward "^[a-zA-Z :&*<>~=,0-9+]*>::" nil t nil) (progn (backward-char 2) (delete-region (point) (line-end-position)))))) @@ -154,7 +154,7 @@ the lines." (goto-char (point-min)) (message "Inserting 'template' for functions") (while (re-search-forward - "^template class [A-z :&*<>~=,0-9+!]*(" nil t nil) + "^template class [a-zA-Z :&*<>~=,0-9+!]*(" nil t nil) (progn (beginning-of-line) (forward-word-strictly 1) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 46b3f2ea90..a7fd564e94 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3388,7 +3388,7 @@ expanded. INDENT is the current indentation level." "Speedbar click handler for default directory buttons. TEXT is the button clicked on. TOKEN is the directory to follow. INDENT is the current indentation level and is unused." - (if (string-match "^[A-z]:$" token) + (if (string-match "^[A-Za-z]:$" token) (setq default-directory (concat token "/")) (setq default-directory token)) ;; Because we leave speedbar as the current buffer, diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 9fe06bbf52..f9efd44c5c 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -239,7 +239,7 @@ a case simply use the directory containing the changed file." ;; wrongly with a non-date line existing as a random note. In ;; addition, using any kind of fixed setting like this doesn't ;; work if a user customizes add-log-time-format. - ("^[0-9-]+ +\\|^ \\{11,\\}\\|^\t \\{3,\\}\\|^\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\) [A-z][a-z][a-z] [0-9:+ ]+" + ("^[0-9-]+ +\\|^ \\{11,\\}\\|^\t \\{3,\\}\\|^\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\) [A-Z][a-z][a-z] [0-9:+ ]+" (0 'change-log-date) ;; Name and e-mail; some people put e-mail in parens, not angles. ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil