Paul Eggert [Fri, 4 Oct 2019 21:38:22 +0000 (14:38 -0700)]
Fix bugs found by 2019-09-29 regexp scanner
Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-09/threads.html
* lisp/calendar/iso8601.el (iso8601--year-match)
(iso8601--full-date-match, iso8601--without-day-match)
(iso8601--week-date-match, iso8601--ordinal-date-match)
(iso8601--zone-match):
* lisp/textmodes/rst.el (rst-re-alist-def):
Put ‘-’ at the end of bracketed ranges, following the style
suggestion in the Elisp manual.
(iso8601--time-match): Use \([0-9]*\) instead of \([0-9]+\)?
to pacify the regexp scanner.
(iso8601-parse-time): Adjust accordingly.
* lisp/language/burmese.el (burmese-composable-pattern):
* lisp/language/indian.el (devanagari-composable-pattern)
(bengali-composable-pattern, gurmukhi-composable-pattern)
(gujarati-composable-pattern, oriya-composable-pattern)
(telugu-composable-pattern, kannada-composable-pattern)
(malayalam-composable-pattern):
Prefer [ab] to [a-b] when the characters differ by 1,
to pacify the regexp scanner.
* lisp/language/burmese.el (burmese-composable-pattern):
Fix missing-‘\u’ typos.
* lisp/language/indian.el (gurmukhi-composable-pattern):
Fix missing-‘\’ typo.
* lisp/language/tibetan.el (tibetan-regexp):
Quote ‘+’ in regexp to pacify the regexp scanner. Simplify.
* lisp/textmodes/rst.el (rst-re-alist-def): Fix ‘[]-'...]’
typo by putting the ‘-’ at end of the bracketed expression.
Stefan Kangas [Fri, 9 Aug 2019 07:39:16 +0000 (09:39 +0200)]
Make mouse scroll show a message instead of dinging at buffer limits
* lisp/mwheel.el (mwheel-scroll): Show a message instead of dinging at
end of buffer and beginning of buffer. This should be less intrusive,
especially when using a trackpad. (Bug#16196)
Stefan Kangas [Tue, 20 Aug 2019 17:04:16 +0000 (19:04 +0200)]
Bind Scroll_Lock to scroll-lock-mode globally
* lisp/bindings.el (global-map): Bind Scroll_Lock to
scroll-lock-mode. (Bug#6861)
* lisp/scroll-lock.el (scroll-lock-mode): Note that the binding will
not work if 'w32-scroll-lock-modifier' is non-nil.
* etc/NEWS: Announce it.
Fix error in gnu compilation-mode regexp (bug#37582)
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Fix a mistake introduced when the regexp was translated to rx.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-test-error-regexps): Add test case.
* etc/compilation.txt: Add example.
* test/lisp/progmodes/compile-tests.el (compile-test-error-regexps):
Don't rely on compilation-num-errors (etc) all being zero, which they
aren't if the test has been run before.
(compile-tests--test-regexps-data): Change defvar to defconst.
Improve docstrings auto-generated by `define-minor-mode'
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring):
When using `easy-mmode--arg-docstring' to auto-generate a
docstring, refill it up to `emacs-lisp-docstring-fill-column'.
Dmitry Gutov [Thu, 3 Oct 2019 23:03:04 +0000 (02:03 +0300)]
Speed up project-files for Git projects
* lisp/progmodes/project.el (project-files): New method.
Implementation for VC projects that uses 'git ls-files' or 'hg
status --all' for listing. With gratitude to Tassilo Horn who has
done most of the legwork and wrote the first version of the code
(https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00069.html).
(project--vc-list-files): New function, to be used by the above.
(project--find-regexp-in-files):
Silence warnings about nonexistent files.
The last change to forward-button added support for help-echo values
that are functions. This patch fixes the arguments passed to such
functions and further adds support for help-echo values that are
forms (bug#37515).
* doc/lispref/display.texi (Button Properties): Fix description of
help-echo button property.
* lisp/button.el (button--help-echo): New function.
(forward-button): Use it.
(backward-button): Clarify help-echo reference in docstring.
* test/lisp/button-tests.el (button--help-echo-string)
(button--help-echo-form, button--help-echo-function): New tests.
* lisp/button.el: Use lexical-binding. Expand Keywords header.
Quote function symbols as such. Use ;;;-comments where appropriate.
(button): Remove outdated commentary of defface.
(define-button-type, make-button, insert-button, make-text-button)
(insert-text-button): Clarify in docstring that PROPERTIES argument
is a plist.
(button-type-subtype-p, button-has-type-p): Do not overspecify
return value in docstring.
(button-put): Fix typo in commentary.
Fix bytecomp.el warning a different way than the previous patch
* lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode-map):
No need to use set-keymap-parent here; `define-derived-mode' will
do that automatically.
* lisp/net/shr.el (shr-dom-to-xml): Include an XML declaration if
we're encoding the data.
(shr-parse-image-data): Add comment about why encoding is necessary.
* lisp/net/shr.el (shr-dom-to-xml): For SVG images, take an
optional charset parameter to return unibyte data.
(shr-parse-image-data): Use it.
(shr-tag-svg): Ditto.
(svg--wrap-svg): Revert previous kludge.
Alan Mackenzie [Thu, 3 Oct 2019 12:50:08 +0000 (12:50 +0000)]
C++ Mode: Fontify correctly declarators with identifier preceded by &
The problem was bar in the following being spuriously recognised as a
function, and foo as a type, as though the & were a *: Foo foo (&bar);.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New variable
got-function-name-prefix, which is set when an operator like * (but not &)
precedes the putative identifer in parentheses. Test this variable when
deciding whether or not to "move the type backwards" to the previous
identifier.
* lisp/progmodes/cc-langs.el (c-type-decl-operator-prefix-key): New lang const
and var.
Michael Albinus [Thu, 3 Oct 2019 08:44:02 +0000 (10:44 +0200)]
Further adaptions for shadowfile-tests.el
* test/lisp/shadowfile-tests.el: Change some traces.
(shadow-test-remote-temporary-file-directory): Adapt also remote
home directory.
(shadow--tests-cleanup): Cleanup Tramp.
Stefan Kangas [Thu, 3 Oct 2019 02:08:11 +0000 (04:08 +0200)]
Don't use obsolete name in em-cmpl.el
* lisp/eshell/em-cmpl.el (eshell-complete-lisp-symbol): Update
reference to 'elisp-completion-at-point' from its obsolete name.
Reported by Carlos Pita <carlosjosepita@gmail.com>. (Bug#31906)
Eric Abrahamsen [Tue, 1 Oct 2019 23:25:11 +0000 (16:25 -0700)]
Gnus registry shutdown should also run the unload-hook
* lisp/gnus/gnus-registry.el (gnus-registry-clear): Clearing the
registry should also run the unload hooks.
(gnus-registry-article-marks-to-names,
gnus-registry-article-marks-to-chars): Now we can use a more general
test here.
* lisp/image-mode.el (image-mode--mark-file): New function.
(image-mode-unmark-file, image-mode-mark-file)
(image-mode-copy-file-name-as-kill): New commands and keystrokes.
* lisp/vc/ediff-help.el (ediff-set-help-overlays): Only put the
mouse-face overlay on the actual commands (bug#5079). This avoids
a problem when you have very wide frames: The leading blank
portion of the buffer would get the mouse highlights.
Make the help page mention the customizeable global mode variable
* lisp/help-fns.el (help-fns--customize-variable): Factor out into
own function for reuse.
(help-fns--globalized-minor-mode): Use it to mention the
equivalent variable.
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Mark globalized minor modes as such (bug#7177).
Add a new command in *Compile-Log* buffers to re-byte-compile
* lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-recompile):
New command (bug#4516).
(emacs-lisp-compilation--current-file)
(emacs-lisp-compilation-mode-map): New variables with new `g'
binding.
(byte-compile-log-file): Set variable so that `g' can recompile it.
Stephen Gildea [Tue, 1 Oct 2019 03:22:51 +0000 (20:22 -0700)]
Move undocumented time-stamp formats closer to format-time-string
* time-stamp.el (time-stamp-string-preprocess): Update some undocumented
formatting characters of time-stamp format for closer (still incomplete)
alignment with format-time-string. They have displayed a warning since
Emacs 20 (released in 1997), so it is unlikely anyone is using them.
* time-stamp-tests.el: Update tests to match new expectations.
Stephen Gildea [Tue, 1 Oct 2019 03:06:16 +0000 (20:06 -0700)]
time-stamp doc: recommend formats closer to format-time-string
* time-stamp.el (time-stamp-format, time-stamp-pattern): Update
recommended (documented) formats. No code changes, just documentation.
All recommended formats are compatible at least as far back as Emacs
22.1 (released in 2007) and are now closer to compatibility with
format-time-string.
* time-stamp-tests.el: Update test comments to match.
Stefan Monnier [Mon, 30 Sep 2019 19:08:41 +0000 (15:08 -0400)]
* lisp/gnus/mm-uu.el: Use lexical-binding and cl-defstruct
(mm-uu-type-alist): Make functions visible to byte-compiler.
(mm-uu-entry): New defstruct.
(mm-uu-configure): Use mapconcat.
(mm-uu-dissect): Avoid setq on `func`.
Fix problem with non-ASCII MML description strings
* lisp/gnus/mml.el (mml-insert-tag): Quote non-ASCII parameters.
(mml-insert-mime-headers): Make it possible to have non-ASCII
descriptions (bug#37555).
Make elisp- and emacs-index-search and default to the thing under point
* lisp/menu-bar.el (elisp-index-search): Default to the thing
under point interactively (bug#1119).
(emacs-index-search): Ditto.
(emacs-index--prompt): New helper function.
Refactor mm-decode and friends to be explicit about when errors happen
* lisp/gnus/mm-decode.el (mm-sec-status):
(mm-sec-error): New functions to handle decryption problems more
explicitly (bug#18393).
(mm-possibly-verify-or-decrypt): Use the `sec-error' data to
determine whether the operation failed or not.
Change the commands in image-converter--converters to lists
* lisp/image/image-converter.el (image-converter--converters):
Change format of the commands to lists.
(image-converter--probe, image-converter--convert): Adjust usages.
Stefan Monnier [Sun, 29 Sep 2019 22:15:56 +0000 (18:15 -0400)]
* lisp/nxml/rng-valid.el: Use define-minor-mode
Remove redundant `:group`s.
(rng-validate-mode): Use define-minor-mode.
(rng-validate-clear): Let-bind rng-current-schema instead of passing
a `no-change-schema` argument.
Tom Willemse [Sun, 11 Oct 2015 22:45:49 +0000 (00:45 +0200)]
Fix indenting in perl functions with doc-comments
* lisp/progmodes/perl-mode.el (perl-calculate-indent): Skip
doc-comments as well as comments and skip the entire comment, not just
the line. (Bug#21647)