Alan Mackenzie [Wed, 28 Oct 2020 10:22:37 +0000 (10:22 +0000)]
CC Mode: Only recognize foo (*bar) as a function pointer when followed by (
* lisp/progmodes/cc-engine.el (c-forward-over-decl-or-cast-1): (after CASE 2)
test variables got-suffix-after-parens and at-decl-end before invoking
c-fdoc-shift-type-backward.
Don't skip empty lines when fitting mini frame to buffer (Bug#44080)
* lisp/window.el (fit-mini-frame-to-buffer,
window--resize-mini-frame, fit-frame-to-buffer,
fit-frame-to-buffer-1): By default, fit a mini frame without skipping its
buffer's leading or trailing empty lines.
* src/frame.c (resize-mini-frames): Update doc-string.
* lisp/cus-start.el (resize-mini-frames): Update for customize.
* doc/lispref/minibuf.texi (resize-mini-frames): Update description.
Eli Zaretskii [Mon, 26 Oct 2020 16:01:13 +0000 (18:01 +0200)]
Improve documentation of display-fill-column-indicator
* lisp/display-fill-column-indicator.el
(display-fill-column-indicator-mode): Mention the globalized
version in the doc string.
* doc/emacs/display.texi (Displaying Boundaries): Improve and
clarify the documentation of display-fill-column-indicator.
Suggest using the minor mode as the primary means for turning the
feature on.
Paul Eggert [Sat, 24 Oct 2020 22:34:12 +0000 (15:34 -0700)]
Use WebKit sandboxing
* src/xwidget.c (Fmake_xwidget): Enable sandboxing if WebKit 2.26
or later. Do this early, as required for sandboxing (Bug#43071). Co-authored-by: Qiantan Hong <qhong@mit.edu>
Copyright-paperwork-exempt: yes
Eli Zaretskii [Wed, 21 Oct 2020 15:32:51 +0000 (18:32 +0300)]
Avoid rare crashes while producing line numbers
* src/xdisp.c (maybe_produce_line_number): Prevent freeing of
realized faces for as long as we are using lnum_face_id and
current_lnum_face_id for producing glyphs. (Bug#44111)
Eli Zaretskii [Fri, 16 Oct 2020 07:02:50 +0000 (10:02 +0300)]
Fix posn-at-x-y in builds --without-x
* src/keyboard.c (make_lispy_position): Don't exclude the
window_or_frame = frame case from TTY-only builds. Reported by
Jared Finder <jared@finder.org>.
* doc/lispref/commands.texi (Click Events): Document the format of
POSITION in click events on the frame's internal border.
Gregory Heytings [Sun, 11 Oct 2020 14:36:44 +0000 (17:36 +0300)]
Fix 'message' when there's active minibuffer on another frame
* lisp/minibuffer.el (set-minibuffer-message): Don't reuse the
active minibuffer for displaying messages unless the active
minibuffer is on the same frame as the selected window.
* lisp/ebuff-menu.el (electric-buffer-list): Ensure that point is
restored, which isn't always the case if
global-display-line-numbers-mode (bug#43755). This enables
selecting buffers again.
Robert Pluim [Fri, 2 Oct 2020 08:47:06 +0000 (10:47 +0200)]
Don't error if no GPG signing key configured
* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Partially revert
"Make mml-secure-epg-sign bug out if we can't find an identity".
It causes signing to fail for people who have not set up
mml-secure-{smime,openpgp}-sign-with-sender, which is a regression
from Emacs-26 (Bug#40118). In such a situation gpg will use its
default key.
Do not merge to master. On master Emacs will query the user.
* lisp/progmodes/sql.el (sql-add-product): Re-correct argument
spec. Previous change was due to my mistake; I have
resolved back to the prior behavior (Bug#39960).
* test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
test to insure I don't make the same mistake again.
Gemini Lasswell [Thu, 1 Oct 2020 17:59:58 +0000 (19:59 +0200)]
Restore some public debugging functions removed in Emacs 27
* lisp/emacs-lisp/backtrace.el (backtrace--to-string): New function.
(backtrace-to-string): Use it. Fix whitespace (bug#40728).
* lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function.
Mark it as obsolete.
(debugger-toggle-locals, debug-help-follow): New aliases.
Eli Zaretskii [Sun, 27 Sep 2020 06:09:27 +0000 (09:09 +0300)]
Minor copyedits in the Emacs user manual
* doc/emacs/emacs.texi (Top): Remove "real-time" from the Emacs
description; add "advanced", to be consistent with what we say in
the Introduction section. (Bug#43633)
Eli Zaretskii [Sat, 26 Sep 2020 08:50:15 +0000 (11:50 +0300)]
Enable "Continue Tags Search" menu item only when it can be used
* lisp/menu-bar.el (menu-bar-search-menu) <tags-continue>: Enable
only when there was a previous tags search. (Bug#43569)
(menu-bar-replace-menu) <tags-repl-continue>: Enable only when
there was a previous tags-replace.
Paul Eggert [Sat, 26 Sep 2020 07:31:17 +0000 (00:31 -0700)]
Fix soap-client URL
* lisp/net/soap-client.el (soap-create-envelope):
Fix URL that I broke in 2019-09-23T06:53:30Z!eggert@cs.ucla.edu.
Problem reported by Thomas Fitzsimmons.
Paul Eggert [Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)]
Fix out-of-source ‘make check’ emacs-module-tests
Problem reported by Koki Fukuda in:
https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
* test/Makefile.in (MODULE_CFLAGS):
Include from the same directories included from in ../src.
* test/src/emacs-module-tests.el (module/describe-function-1):
Strip path to source directory.
Eli Zaretskii [Fri, 25 Sep 2020 08:55:51 +0000 (11:55 +0300)]
Avoid infinite recursion with 'relative' line numbers display
* src/xdisp.c (display_count_lines_visually): Bind
'display-line-numbers' to 'relative' around 'start_display' as
well, since that can invoke 'move_it_to' internally, thus
causing infinite recursion. (Bug#43589)
Eli Zaretskii [Fri, 18 Sep 2020 19:50:36 +0000 (22:50 +0300)]
Improve documentation of 'max-mini-window-height'
* src/xdisp.c (syms_of_xdisp):
* doc/lispref/minibuf.texi (Minibuffer Windows): More accurate
wording in the documentation of 'max-mini-window-height', to
clarify the meaning of an integer value.
Daniel Martín [Fri, 18 Sep 2020 11:36:47 +0000 (13:36 +0200)]
Use modern constant names for the NS pasteboard
Use the same pasteboard constant names defined in
ns_drag_types. (Bug#43470).
* src/nsterm.m: Rename NSURLPboardType to NSPasteboardTypeURL,
NSStringPboardType to NSPasteboardTypeString, and
NSTabularTextPboardType to NSPasteboardTypeTabularText
Alan Mackenzie [Fri, 4 Sep 2020 19:10:17 +0000 (19:10 +0000)]
C++ Mode: handle comma separated brace initializers.
This includes both indentation and fontification.
* lisp/progmodes/cc-engine.el (c-do-declarators): Handle brace initializers
without = correctly.
(c-looking-at-or-maybe-in-bracelist): Use c-do-declarators with a simple
inline function to check that after-type-id-pos points to the start of a
declarator.
* lisp/progmodes/cc-langs.el (c-recognize-bare-brace-inits): New lang
const/variable.
Michael Albinus [Thu, 3 Sep 2020 11:56:13 +0000 (13:56 +0200)]
Fix bug in dbus.el; do not merge with master
* lisp/net/dbus.el (dbus-register-property)
(dbus-property-handler): Handle properties of the same interface
at different object paths properly. (Bug#43146)
Stefan Kangas [Tue, 1 Sep 2020 09:39:22 +0000 (11:39 +0200)]
Fix help message with help-window-select
* lisp/help.el (help-print-return-message):
(help-window-display-message): Recommend 'scroll-up-command' instead
of 'scroll-up' when 'help-window-select' is non-nil. (Bug#43122)
Paul Eggert [Mon, 24 Aug 2020 20:12:51 +0000 (13:12 -0700)]
Fix replace-region-contents performance bug
Backport from master.
* src/editfns.c (rbc_quitcounter): Remove; the quitcounter
is now part of the context.
(EXTRA_CONTEXT_FIELDS): Remove unused member early_abort_tests.
Add jmp, quitcounter.
(Freplace_buffer_contents): Use setjmp/longjmp to recover from
a compareseq that runs too long. Omit unnecessary rarely_quit
call.
(buffer_chars_equal): Occasionally check for early abort and
longjmp out if so (Bug#43016).
Michael Albinus [Tue, 25 Aug 2020 13:18:57 +0000 (15:18 +0200)]
Sync with Tramp 2.4.5-pre
* doc/misc/tramp.texi: Adapt Tramp and Emacs version numbers.
(Remote processes): Describe `process-file-return-signal-string'
and $INSIDE_EMACS.
(Frequently Asked Questions): Mention Emacs 28.
Describe `tramp-smb-options'.
* doc/misc/trampver.texi: Change version to "2.4.5-pre".
* lisp/net/tramp-adb.el (process-file-return-signal-string): Declare.
(tramp-adb-handle-write-region): Flush the cache after the file
has been written.
(tramp-adb-handle-set-file-modes, tramp-adb-handle-set-file-times):
Add optional _FLAG.
(tramp-adb-handle-copy-file, tramp-adb-handle-rename-file)
(tramp-adb-handle-process-file): Use `tramp-file-local-name'.
(tramp-adb-get-signal-strings): New defun.
(tramp-adb-handle-process-file): Use it.
(tramp-adb-handle-make-process): Implement `stderr'. Use
`insert-file-contents-literally'.
(tramp-adb-send-command-and-check): Add optional argument
EXIT-STATUS.
(tramp-adb-handle-process-file): Use it.
* lisp/net/tramp-rclone.el (tramp-rclone-flush-directory-cache):
Fix a problem with older Emacsen.
* lisp/net/tramp-sh.el (process-file-return-signal-string): Declare.
(tramp-sh-extra-args): Add "-noediting" as bash arg.
(tramp-hexdump-encode, tramp-hexdump-awk-encode)
(tramp-od-encode, tramp-od-awk-encode): New defconst.
(tramp-awk-encode, tramp-awk-decode): Adapt.
(tramp-awk-coding-test): Remove.
(tramp-remote-coding-commands): Add hexdump/awk encoding. (Bug#35639)
(tramp-find-inline-encoding): Adapt handling of awk, hexdump and od.
(tramp-get-remote-busybox, tramp-get-remote-awk)
(tramp-get-remote-hexdump, tramp-get-remote-od): New defuns.
(tramp-sh-handle-make-symbolic-link):
(tramp-do-copy-or-rename-file-directly)
(tramp-sh-handle-process-file, tramp-set-remote-path)
(tramp-find-inline-encoding, tramp-get-remote-touch):
Use `tramp-file-local-name'.
(tramp-do-file-attributes-with-stat): Simplify shell command.
Suppress errors (interpret as nil).
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times):
Add optional _FLAG.
(tramp-sh-handle-make-process): Do not visit with
`insert-file-contents'. Delete tmp file only if exists. Support
`stderr' as file name. Delete temporary stderr file. Flush
connection properties in time.
(tramp-sh-get-signal-strings): New defun.
(tramp-sh-handle-process-file): Use it.
(tramp-sh-handle-write-region): Copy to temp file only if FILENAME
exists. (Bug#40156)
(tramp-set-remote-path): Send the command in several chunks if it
is too large. (Bug#42538)
(tramp-open-connection-setup-interactive-shell): Move up "set +o
vi +o emacs" command. (Bug#39399)
(tramp-send-command-and-read): Suppress `signal-hook-function'
when reading expression.
(tramp-send-command-and-check): Add optional argument EXIT-STATUS.
(tramp-sh-handle-process-file): Use it. (Bug#41099)
* lisp/net/tramp-smb.el (tramp-smb-conf): Fix docstring.
(tramp-smb-options): New defcustom.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl, tramp-smb-maybe-open-connection):
Use it.
(tramp-smb-errors): Add "NT_STATUS_INVALID_PARAMETER".
(tramp-smb-handle-make-symbolic-link)
(tramp-smb-handle-process-file): Use `tramp-file-local-name'.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
(tramp-sudoedit-handle-set-file-uid-gid):
Use `tramp-unquote-file-local-name'.
(tramp-sudoedit-handle-make-symbolic-link):
Use `tramp-file-local-name'.
(tramp-sudoedit-handle-file-system-info): Fix a scoping error.
(tramp-sudoedit-handle-set-file-modes):
(tramp-sudoedit-handle-set-file-times): Add optional _FLAG.
* lisp/net/tramp.el: Bump version to 2.4.5-pre.
(tramp-file-local-name, tramp-unquote-file-local-name): New defuns.
(tramp-set-connection-local-variables-for-buffer)
(tramp-equal-remote, tramp-handle-make-auto-save-file-name):
Use `tramp-tramp-file-p'.
(tramp-parse-file): Use `insert-file-contents-literally'.
(tramp-handle-file-modes, tramp-handle-file-times):
Add optional _FLAG.
(tramp-handle-shell-command): Fix `window-start' in output buffer.
(Bug#39171)
Handle `shell-command-dont-erase-buffer'. (Bug#39067)
Reorganize error-buffer handling. Set `default-directory'.
(Bug#39253)
(tramp-handle-shell-command, tramp-handle-start-file-process):
Implement asynchronous `error-buffer'.
(tramp-action-process-alive): Read pending output.
(tramp-read-passwd): Use `tramp-compat-temporary-file-directory'.
(Bug#39389, Bug#39489)
(tramp-interrupt-process): Improve command.
* lisp/net/trampver.el: Change version to "2.4.5-pre".
(tramp-repository-branch, tramp-repository-version):
Bind `debug-on-error' to nil.
* test/lisp/net/tramp-tests.el (tramp-get-remote-gid)
(process-file-return-signal-string)
(shell-command-dont-erase-buffer): Declare.
(tramp-test10-write-region, tramp-test28-process-file)
(tramp-test29-start-file-process, tramp-test30-make-process)
(tramp-test31-interrupt-process, tramp-test32-shell-command):
Extend test.
(tramp-test10-write-region, tramp-test21-file-links): Use function
symbols.
(tramp-test18-file-attributes): Check `file-ownership-preserved-p'
only if possible.
(tramp--test-async-shell-command): New defun.
(tramp--test-shell-command-to-string-asynchronously): Use it.
(tramp-test32-shell-command-dont-erase-buffer): New test.
While equal is symmetric, member is not; in the latter case the
arguments must be a variable and a constant list, in that order.
Reported by Ikumi Keita.
* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix):
Don't treat equality and member predicates in the same way; only
the former are symmetric in their arguments.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Add test cases.
Paul Eggert [Mon, 17 Aug 2020 23:21:36 +0000 (16:21 -0700)]
Let Emacs start even if curdir is inaccessible
* lisp/startup.el (normal-top-level): Also delete PWD if
file-attributes fails for either $PWD or default-directory,
instead of failing out of the top level.
This fixes a regression from Emacs 26 (Bug#42903).