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)
Fix linear equation system solving in Calc (bug#35374)
* lisp/calc/calcalg2.el (math-try-solve-for):
To solve Ax^n=0 where A is a nonzero constant and x the variable to
solve for, solve x^n=0 instead of solving A=0 (which obviously fails)
or something equally stupid.
* test/lisp/calc/calc-tests.el (calc-test-solve-linear-system): New.
Stephen Gildea [Sat, 28 Sep 2019 22:46:27 +0000 (15:46 -0700)]
Reorganize time-stamp tests
* time-stamp-tests.el: Group tests by when the format was or will be
documented. Add tests for a few more undocumented, volatile formats.
Change AM hours test time to be a different hour from PM test time.
(Making these changes to the tests now will minimize test changes
needed later with anticipated code changes.)
Stefan Kangas [Mon, 16 Sep 2019 07:29:48 +0000 (09:29 +0200)]
Improve sorting in package list (Bug#37419)
* lisp/emacs-lisp/package.el (package-menu-mode): Allow sorting by
version or description.
(package-menu--version-predicate): Fix sorting by version.
(package-menu--description-predicate): Fix sorting by description.
(package-menu--archive-predicate): Fall back to sorting by name if
archive is the same.
(package-menu--name-predicate, package-menu--status-predicate): Add
doc string.
* etc/NEWS: Announce the above changes.
Eli Zaretskii [Sat, 28 Sep 2019 14:43:15 +0000 (17:43 +0300)]
More improvements of doc strings in text-property-search.el
* lisp/emacs-lisp/text-property-search.el (text-property-search-forward)
(text-property-search-backward): Further improvements of doc
strings. (Bug#37488)
Stefan Kangas [Fri, 13 Sep 2019 19:23:24 +0000 (21:23 +0200)]
Add bug reporting and link the manual on the about screen
* lisp/startup.el (fancy-about-text, normal-about-screen): Clarify
that "Contribute" also describes how to report bugs. Add new link
"Emacs Manual". (Bug#20697)
Don't discard customizations in progress when adding comments (Bug#5358)
* lisp/cus-edit.el (custom-comment-show): Add docstring. Save the
widget value in the :shown-value property, before redrawing.
(custom-variable-modified-p): New function, to complement the return
values of custom-variable-state.
(custom-variable-state-set): Use it.
(custom-face-value-create): Add children to the custom-face widget
before setting the state, to be able to check for user edits.
(custom-face-state-set): Check for user edits before calling
custom-face-state (bug#5358).
* test/lisp/custom-tests.el
(custom-test-show-comment-preserves-changes): New test.