Commit graph

73224 commits

Author SHA1 Message Date
Lars Ingebrigtsen
138060e366 In Message, respect Content-Type provided by the user
* lisp/gnus/mml.el (mml-parse-1): Respect any Content-Type
inserted by the user instead of insisting on text/plain.
2019-07-04 16:08:22 +02:00
Alan Mackenzie
4bf4002906 Fix an infinite loop in c-end-of-macro. Should fix bug #36484
Also fix two faulty regexps, save-match-data, and check c-major-mode-is
'c++-mode where needed.

* lis/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re)
(c-last-open-c-comment-start-on-line-re): Handle repeated *s in regexp
correctly.

* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Protect
the match-data with save-match-data around regexp operations.
(c-end-of-macro): In the loop handling multiline block comments, check a
comment actually is multiline.

* lisp/progmodes/cc-mode.el (c-depropertize-CPP): Only call
c-depropertize-raw-strings-in-region in C++ Mode.
2019-07-04 13:18:51 +00:00
João Távora
5b48dab412 Fix Flymake's user-visible accessors of diagnostic positions
Diagnostics are supported by overlays, and they can legitimately move
around.  So flymake-diagnostic-beg and flymake-diagnostic-end must
look up the overlay positions, not the immutable slots of the
flymake--diag structure, which become stale.

* lisp/progmodes/flymake.el (version): Bump to 1.0.8.
(flymake-diagnostic-beg, flymake-diagnostic-end): Use diag's
overlay.
(flymake-show-diagnostic): Use flymake-diagnostic-end,
flymake-diagnostic-beg.
2019-07-04 00:38:46 +01:00
João Távora
22d99801ed Fix Flymake's treatment of region-specific reports
We're supposed to delete intersecting diagnostics in that situation,
but the intersection logic was way off.

* lisp/progmodes/flymake.el (version): Bump to 1.0.7.
(flymake--intersects-p): New helper.
(flymake--handle-report): Fix handling of :region.
2019-07-04 00:38:01 +01:00
Eric Abrahamsen
619592df9e Small fix to writing Gnus dribble change-level entries
* lisp/gnus/gnus-start.el (gnus-group-change-level): PREVIOUS needs to
  still be a string when the dribble entry is written, so don't
  convert it to an entry until after that's done. Also, we're not
  meant to write PREVIOUS itself, we're meant to write the group that
  comes _after_ it in the sort-order of gnus-group-list, so do that
  instead.
2019-07-03 12:56:00 -07:00
Stefan Kangas
22760ab357 Add tests for bookmark.el (Bug#36452)
* test/lisp/bookmark-resources/example.txt:
* test/lisp/bookmark-resources/test.bmk:
* test/lisp/bookmark-tests.el: New files.
* lisp/bookmark.el: Minor cleanups.
(bookmark-insert-annotation): Signal error on invalid bookmark.
(bookmark-write-file): Add newline at end of file.
2019-07-03 14:49:38 +03:00
Andreas Schwab
0a7bc33da7 Correct customize type for gnus-group-customize
* lisp/gnus/gnus-cus.el (gnus-extra-group-parameters): Add more
group parameters used by nnimap.
2019-07-02 19:59:10 +02:00
João Távora
5e88b50d54 Correctly reindent previous line in electric-indent-mode
Fixes: bug#35254

Do this even when electric-indent-inhibit is t, except when the
newline insertion is being performed by electric-layout-mode.

* lisp/electric.el (electric-indent-post-self-insert-function):
Reindent previous line unless operating under
electric-layout-mode.
(electric-layout-post-self-insert-function-1): Bind
electric-indent-inhibit to 'electric-layout-mode.

* test/lisp/electric-tests.el
(electric-layout-control-reindentation): New test.
2019-07-02 16:10:45 +01:00
João Távora
2a2a1bdb8f Protect Flymake from being corrupted by backends
A backend building a diagnostic with a nil :type would cause Flymake
to create a diagnostic without an overlay, confusing Flymake's
accounting of overlays and diagnostics

* lisp/progmodes/flymake.el (flymake--highlight-line): Return
non-nil unconditionally.
2019-07-02 16:10:22 +01:00
João Távora
1bf5be5d37 More carefully cleanup Flymake C/C++ backend's temp buffers
Sometimes the Flymake process dies by some means that doesn't involve
a sentinel call for the "exit" status, so we clean up the temporary
buffer as soon as we notice it's not process-alive-p anymore.

* lisp/progmodes/flymake-cc.el (flymake-cc): Broaden cleanup
conditions.
2019-07-02 16:09:59 +01:00
João Távora
1625fc184b Don't create nil-severity diagnostics in the Flymake C/C++ backend
* lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics): Use
`:error` as a diagnostic severity.
2019-07-02 16:09:52 +01:00
João Távora
f75e68fc9b Revert "Avoid occasional confusion of Flymake C/C++ backend"
This reverts commit 67c3a3af1d, which
creates more problems than it solves.
2019-07-02 15:20:16 +01:00
Alan Mackenzie
b25d58c956 CC Mode: Improve handling of unbalanced strings
* lisp/progmodes/cc-fonts.el (c-before-font-lock-functions): Add function
c-after-change-escape-NL-in-string into value for most languages.

* lisp/progmodes/cc-mode.el (c-after-change-escape-NL-in-string): New
function.
(c-before-change-check-unbalanced-strings): Handle the making and breaking of
escaped newlines, by removal or addition of text.
2019-07-02 12:33:01 +00:00
Mattias Engdegård
22b64f7bac Better error message for C-h P RET
Previously:
  package--incompatible-p: Wrong type argument: package-desc, nil
Now:
  No package specified

* lisp/emacs-lisp/package.el (describe-package): Don't use ## as input.
2019-07-02 10:57:39 +02:00
Glenn Morris
8d963ba25d ; Auto-commit of loaddefs files. 2019-07-01 06:26:54 -07:00
Sam Steingold
db83df1e29 Extract gnus-collect-urls from gnus-summary-browse-url
* lisp/gnus/gnus-sum.el (gnus-collect-urls): Extract from ...
(gnus-summary-browse-url): Use it here.
Extracting URLs from an article will be useful in BBDB interaction.
2019-07-01 09:15:38 -04:00
Alan Mackenzie
6d529b658a C++ Mode: change the default doc comment style from nothing to gtkdoc
Also amend a pertinent regular expression.  This fixes bug #11865.

* lisp/progmodes/cc-vars.el (c-doc-comment-style): Insert an entry for
c++-mode, namely gtkdoc.

* lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Amend the regexp
recognizing the introductory "/**" to allow subsequent characters on that
line.
2019-06-30 15:02:13 +00:00
Basil L. Contovounesios
f24d47359d ; Fix last change to profiler-report
* lisp/profiler.el (profiler-report): Make interactive
again (bug#22114).
2019-06-30 13:30:03 +01:00
Michael Albinus
10af8c5863 Release Tramp 2.4.2
* lisp/net/tramp.el: Bump version.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Add `add-name-to-file' error message.
(tramp--test-ignore-add-name-to-file-error): Make error handler
more explicit about the error.
2019-06-30 11:23:06 +02:00
Shuguang Sun
67b50770c0 Fix recent change in Tramp
* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-integration.el: Remove superfluous `progn' in
`with-eval-after-load'.
2019-06-29 12:18:59 +02:00
Lars Ingebrigtsen
497c120609 Cosmetic fix-up of message-forward-included-headers
* lisp/gnus/message.el (message-forward-included-headers): Use
consistent capitalization in the regexps.
2019-06-29 12:05:55 +02:00
Mattias Engdegård
f1d414b98f Allow empty argument to `regexp-opt-charset'
* test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-charset):
Handle nil argument, and use regexp-quote for singletons.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Expand tests.
2019-06-29 11:12:27 +02:00
Mattias Engdegård
d8aba87a0d Strength-reduce equal', eql', member' and memql'
When comparing against symbols, turn `equal' and `eql' into `eq',
and `member' and `memql' into `memq'.

* lisp/emacs-lisp/byte-opt.el (byte-optimize--constant-symbol-p)
(byte-optimize-equal, byte-optimize-member): New.
(member, memql, equal, eql): Use new byte-optimizers.
2019-06-28 22:47:27 +02:00
Stefan Kangas
d58fc4e8ec Document bookmark annotations in Emacs Manual (bug#36417)
* doc/emacs/regs.texi (Bookmarks): Document annotations.
* lisp/bookmark.el (bookmark-use-annotations): Clarify docstring.
2019-06-28 21:35:21 +03:00
Michael Albinus
aae5bf4438 Tramp requires Emacs 24.4
* doc/misc/tramp.texi (Frequently Asked Questions):
Use `with-eval-after-load'. in example.

* doc/misc/trampver.texi: Set variable emacsver.

* lisp/net/tramp.el (tramp-send-string, tramp-call-process)
(tramp-call-process-region, tramp-process-lines):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename)
(tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes)
(tramp-gvfs-handle-file-notify-add-watch)
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch, tramp-find-executable)
(tramp-set-remote-path)
(tramp-open-connection-setup-interactive-shell)
(tramp-maybe-open-connection, tramp-send-command):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process)
(tramp-smb-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl):
(tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'.

* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-ftp.el: Use `with-eval-after-load'.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection)
(tramp-cleanup-all-connections): Cancel timer.

* lisp/net/tramp-compat.el (subr-x): Require.
(default-toplevel-value): Don't make it a defalias.

* lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'.  Do
not special handle `split-string'.

* lisp/net/tramp.el: Require Emacs 24.4.
(tramp-password-prompt-regexp): Use `password-word-equivalents'.
(tramp-user-error): Use `user-error'.
(tramp-replace-environment-variables): Use `substitute-env-vars'.
(tramp-wait-for-regexp): Rearrange `with-current-buffer' call.
(tramp-get-local-gid): Use `group-gid'.

* lisp/net/trampver.el: Check for Emacs 24.4.

* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test03-file-name-host-rules)
(tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 16:32:12 +02:00
Lars Ingebrigtsen
c534a4a336 Doc fix for Gnus "very wide" reply commands
* lisp/gnus/gnus-msg.el (gnus-summary-very-wide-reply-with-original)
(gnus-summary-very-wide-reply): Clarify what a "very wide reply" is.
2019-06-28 16:20:05 +02:00
Lars Ingebrigtsen
86b28cbbf0 Revert "Fontify _emphasis_ in info nodes"
This reverts commit 72963b4e82.

The change incorrectly fontified whole sentences as emphasis.
2019-06-28 15:05:59 +02:00
Lars Ingebrigtsen
cfabacae02 Include To and Cc headers when forwarding with Message
* lisp/gnus/message.el (message-forward-included-headers): Include
more of the important headers when forwarded: To and Cc.
2019-06-28 15:01:36 +02:00
Michael Albinus
9fec778c07 * lisp/gnus/gnus-art.el (gnus-article-stop-animations):
Use `cancel-function-timers'.
2019-06-28 14:03:58 +02:00
Lars Ingebrigtsen
a7682bce3c Don't inhibit quit in Gnus when prefetching articles
* lisp/gnus/gnus-async.el (gnus-async-prefetch-next): Don't
inhibit quit when running `gnus-async-prefetch-article'.
2019-06-28 12:01:46 +02:00
Alex Branham
cb182ce6f8
* lisp/simple.el (undo): Make message less enthusiastic 2019-06-27 19:56:40 -05:00
Ola Nilsson
fa3af359df Allow underscore in defun-prompt-regex names for sh-script
* lisp/progmodes/sh-script.el (defun-prompt-regexp):
Allow underscore in function names.
2019-06-27 20:02:54 -04:00
Vasilij Schneidermann
9997429cb7 Allow for retrieving profiler logs after stopping
* lisp/profiler.el (profiler-cpu-log, profiler-memory-log): New
variables.
(profiler-cpu-profile): Work even if the profiler is no longer
running (bug#22114).
(profiler-memory-profile): Ditto.
(profiler-stop): Save the data.
(profiler-reset): Clear the saved data.
(profiler-report-cpu, profiler-report-memory): Report on the saved
data.
(profiler-report): Save the data here, too.
2019-06-27 21:00:36 +02:00
Dan Nicolaescu
b93e546388 Include the date in the bzr annotation buffer
* lisp/vc/vc-bzr.el (vc-bzr-annotate-command)
(vc-bzr-annotate-time)
(vc-bzr-annotate-extract-revision-at-line): Include a date in the
bzr annotation buffer (bug#5428).
2019-06-27 21:00:36 +02:00
Stefan Kangas
b98b843a5b Add new ispell-change-dictionary-hook (Bug#1110)
* lisp/textmodes/ispell.el (ispell-change-dictionary-hook): New hook.
(ispell-change-dictionary): Call new hook (bug#1110).
2019-06-27 21:00:35 +02:00
Thierry Volpiatto
f9744d23e5 Add a new regexp variable to control boring winner buffers
* doc/emacs/windows.texi (Window Convenience): Mention it.

* lisp/winner.el (winner-boring-buffers-regexp): New variable.

* lisp/winner.el (winner-set): Use it (bug#11151).
2019-06-27 21:00:35 +02:00
Lennart Borgman
c1234ca9c3 Add more fontification to regexp builder mode
* lisp/emacs-lisp/re-builder.el (reb-copy): Work in the presence
of newlines in the regexps.
(reb-change-syntax): Use a dedicated history variable.
(reb-fontify-string-re): Fontify sub-matches.
(reb-regexp-grouping-backslash, reb-regexp-grouping-construct):
New faces.
(reb-string-font-lock-keywords): New variable.
(reb-mark-non-matching-parenthesis): Match parenthesis.
(reb-restart-font-lock): New function.

* lisp/emacs-lisp/re-builder.el (reb-mode-map): Add divider some
dividers (bug#6347).
2019-06-27 19:08:42 +02:00
Lars Ingebrigtsen
2fbcda71a9 Rename displayor to displayer in CEDET
* doc/misc/sem-user.texi (Idle Completions Mode): Rename
displayor->displayer throughout.
(Idle Completions Mode): Ditto.

* lisp/cedet/semantic/complete.el: Rename displayor->displayer
throughout and add aliases for all the methods that used that name.
2019-06-27 18:13:18 +02:00
Dmitry Gutov
8a11e430ec Use default-indent-new-line' instead of indent-new-comment-line'
* lisp/simple.el (default-indent-new-line): Doc string fix.

* lisp/textmodes/refill.el (refill-post-command-function): Make
default-indent-new-line work as indent-new-comment-line.

* lisp/textmodes/refill.el (refill-post-command-function): Bind
`M-C-j' and `M-j' to default-indent-new-line instead of
indent-new-comment-line to allow overriding via
`comment-line-break-function' (bug#12413).
2019-06-27 16:57:47 +02:00
Lars Ingebrigtsen
50ade7afc1 Revert "Apply font-lock in hexl-mode buffers"
This reverts commit 573de396f0.

The change wasn't necessary -- the hexl-mode buffer is automatically fontified.
2019-06-27 16:28:22 +02:00
Aaron S. Hawley
d64c72f50c Allow generating wiki and mediawiki tables
* lisp/textmodes/table.el (table--generate-source-prologue)
(table--generate-source-epilogue)
(table--generate-source-scan-rows)
(table--generate-source-cells-in-a-row): Insert the wiki/mediawiki
separators.

* lisp/textmodes/table.el (table-source-languages): Add support
for wiki and mediawiki tables (bug#13287).

2019-06-27  Lars Ingebrigtsen  <larsi@gnus.org>

	* doc/emacs/text.texi (Table Misc): Mention the new wiki and
	mediawiki formats.
2019-06-27 13:55:04 +02:00
Wilfred Hughes
573de396f0 Apply font-lock in hexl-mode buffers
* lisp/hexl.el (hexl-mode): After setting font-lock-defaults, we
need to call `font-lock-ensure' to apply hexl-mode faces
(bug#24645).
2019-06-27 13:30:36 +02:00
Juanma Barranquero
e3b70e6b2d Add :local specifier to defcustom
* lisp/custom.el (custom-declare-variable): Allow the new :local
parameter (bug#14591).
(defcustom): Document it.
2019-06-27 13:26:45 +02:00
Paul Eggert
1d9bb2ff70 Tweak ‘error’ and ‘user-error’ doc strings
* lisp/net/tramp.el (tramp-user-error):
* lisp/subr.el (user-error):
Say that user errors are sometimes called pilot errors.
* lisp/subr.el (error, user-error):
Reorder wording to discuss mechanism first, then formatting advice,
rather than going back and forth between the two topics.
Tighten up the wording a bit.
2019-06-27 02:37:08 -07:00
Stefan Kangas
f90e0c5661 Clarify error and user-error docstrings
* lisp/subr.el (error, user-error)
* lisp/net/tramp.el (tramp-user-error): Change "pilot error" to "user
error" and improve documentation.
2019-06-27 02:37:08 -07:00
Mattias Engdegård
cda2f52b94 Document bug in `replace-regexp-in-string'
`replace-regexp-in-string' omits the first START characters of the
input string in its return value.  This is a clear bug, but fixing it
probably causes more trouble; document the behaviour instead (bug#36372).

* doc/lispref/searching.texi (Search and Replace)
* lisp/subr.el (replace-regexp-in-string):
Document current behaviour.
2019-06-26 19:39:32 +02:00
Stefan Monnier
85871ae9ce * lisp/textmodes/page-ext.el (sort-pages-buffer): Fix typo
Reported by Marco Wahl <marcowahlsoft@gmail.com>.
Update `Commentary:` to use the new command names.
(pages--ctl-x-ctl-p-map): Fix `mark-page` binding.
(pages-directory-mode-map): Update `add-new-page` => `pages-add-new-page`.
2019-06-26 12:49:01 -04:00
Andrzej P
d4a0e41829 Fix redisplay of registers in gdb-mi
* lisp/progmodes/gdb-mi.el (gdb-update): Call
gdb-get-changed-registers before updating the GDB-MI buffers.
(Bug#16366)

Copyright-paperwork-exempt: yes
2019-06-26 19:14:25 +03:00
Bruce Stephens
baee135c31 * lisp/calc/calc-ext.el (math-scalarp): Fix typo 2019-06-26 10:26:18 -04:00
Stefan Monnier
0b4e003766 Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"
This reverts commit 698ff554ac.
2019-06-26 10:24:59 -04:00