Martin Rudalics [Sun, 1 Jul 2018 08:22:59 +0000 (10:22 +0200)]
Document internal use of 'above-suspended' z-group frame parameter
* src/w32fns.c (w32_dialog_in_progress, x_set_z_group):
* src/xterm.c (x_set_z_group): Clarify the internal use of
'above-suspended' when setting a frame's 'z-group' parameter.
Gemini Lasswell [Wed, 20 Jun 2018 20:58:33 +0000 (13:58 -0700)]
Increase max-lisp-eval-depth adjustment while in debugger (bug#31919)
* src/eval.c (call_debugger): Increase the amount of extra Lisp
evaluation depth given to the debugger to allow it to call cl-print.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Add a comment
to suggest updating call_debugger when changing print-level.
Eli Zaretskii [Fri, 29 Jun 2018 13:55:20 +0000 (16:55 +0300)]
Speed up replace-buffer-contents
* src/editfns.c (EXTRA_CONTEXT_FIELDS): Add a_unibyte and
b_unibyte members.
(rbc_quitcounter): New static variable.
(Freplace_buffer_contents): Initialize a_unibyte, b_unibyte, and
rbc_quitcounter. Inhibit modification hooks if they were not
already inhibited. Use rarely_quit to allow user to quit, to
avoid calling maybe_quit too frequently (which hurts performance).
Remove redundant assertions (which hurt performance too much).
Call signal_after_change and update_compositions after all the
changes are done.
(buffer_chars_equal): Remove redundant assertions (which hurt
performance). Avoid using BUF_FETCH_CHAR_AS_MULTIBYTE, which
hurts performance by referencing Lisp symbols; instead, use
lower-level macros with explicit tests to select which macro to
use. (Bug#31888)
Dmitry Gutov [Thu, 28 Jun 2018 00:05:19 +0000 (03:05 +0300)]
; Update some commentary
* lisp/vc/vc-git.el (vc-git-state): Remove outdated commentary.
(vc-git-dir-status-goto-stage): Move a TODO here.
(vc-git-conflicted-files): From here.
(vc-git-find-file-hook): Add a FIXME.
Noam Postavsky [Sat, 16 Jun 2018 22:59:43 +0000 (18:59 -0400)]
Detect a non-list package archive content properly (Bug#22311)
* lisp/emacs-lisp/package.el (package--download-one-archive): Use
`read' instead of `read-from-string'; the latter always returns a
cons, so the `listp' check on its return value doesn't make sense. It
was changed from `read' to `read-from-string' in 2015-04-01 "*
emacs-lisp/package.el: Implement asynchronous refreshing", but that
change was not needed because `read' works fine on strings as well as
buffers.
Before ido.el switch to lexical-binding, it was possible for other
packages to modify the 'fallback' variables declared inside
'ido-file-internal' and 'ido-buffer-internal'.
* lisp/ido.el (ido-fallback): New variable.
(ido-buffer-internal, ido-file-internal): Reset ido-fallback to nil
before prompting user. Use ido-fallback when ido-exit is 'fallback'.
(ido-fallback-command): Add optional FALLBACK-COMMAND argument.
Karl Fogel [Mon, 25 Jun 2018 17:23:23 +0000 (12:23 -0500)]
Tighten a cross-reference in documentation
* doc/lispref/internals.texi (Writing Emacs Primitives): Switch to
a simple parenthetical cross-reference, following up to my
commit 9a53b6d426 of 2018-06-24.
See discussion:
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00826.html
From: Eli Zaretskii
Subject: Re: [Emacs-diffs] \
emacs-26 9a53b6d: Say how to override a primitive interactive spec
To: Karl Fogel CC: Stefan Monnier, Emacs Devel
Date: Mon, 25 Jun 2018 17:41:53 +0300
Message-Id: <83r2kvrkr2.fsf@gnu.org>
Karl Fogel [Sun, 24 Jun 2018 12:10:43 +0000 (07:10 -0500)]
Say how to override a primitive interactive spec
* doc/lispref/internals.texi (Writing Emacs Primitives): Mention that
the `interactive-form' property can be used to override a primitive
interactive specification, and refer to the detailed documentation
for setting that property.
From this thread on Emacs Devel:
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00923.html
From: Eli Zaretskii
To: Karl Fogel CC: Juri Linkov, Emacs Devel
Subject: Re: [Emacs-diffs] \
master b88e7c8: Make transpose-regions interactive (Bug#30343)
Date: Thu, 29 Mar 2018 14:38:15 +0300
Message-Id: <834lkzdsd4.fsf@gnu.org>
Michael Albinus [Sun, 24 Jun 2018 08:24:26 +0000 (10:24 +0200)]
Fix Bug#31941
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): In case of
FILENAME being a directory, check whether `copy-directory' could
be avoided. Suggested by Stephen Nutt <stnutt@gmail.com>. (Bug#31941)
(tramp-do-copy-or-rename-file-directly): Call "cp" with "-r".
Leo Liu [Tue, 12 Jun 2018 04:24:09 +0000 (12:24 +0800)]
Fix previous change in minibuffer-default-add-dired-shell-commands
The mailcap minibuffer completion used dynamic binding. Locally set
a dynamic variable.
* lisp/dired-aux.el (minibuffer-default-add-dired-shell-commands):
Store list of files in 'minibuffer-completion-table'. (Bug#31794)
Eli Zaretskii [Sat, 23 Jun 2018 11:03:10 +0000 (14:03 +0300)]
Improve responsiveness while in 'replace-buffer-contents'
* src/editfns.c (buffer_chars_equal): Avoid calling
buf_charpos_to_bytepos when the buffer is plain-ASCII.
Suggested by Milan Stanojević <mstanojevic@janestreet.com>.
Call maybe_quit to improve responsiveness.
(Freplace_buffer_contents): Call maybe_quit. Warn in the doc
string that the function could be slow. (Bug#31888)
Eli Zaretskii [Fri, 22 Jun 2018 18:25:55 +0000 (21:25 +0300)]
Fix a typo in emacs-lisp-intro.texi
* doc/lispintro/emacs-lisp-intro.texi (kill-ring-yank-pointer):
Add a missing quote. Reported by Jean-Christophe Helary
<brandelune@gmail.com> in emacs-devel.
Noam Postavsky [Wed, 20 Jun 2018 12:40:51 +0000 (08:40 -0400)]
Change index of ";" to better reflect it's usage (Bug#31623)
* doc/lispref/objects.texi (Comments): "; for commenting" fits better
with the following text about how a semicolon begins a comment. Also
mention that only unescaped semicolons start a comment.
Noam Postavsky [Tue, 12 Jun 2018 22:41:46 +0000 (18:41 -0400)]
Fix #'fun handling inside `labels' (Bug#31792)
* lisp/emacs-lisp/cl.el (labels): Apply the equivalent of the
cl-labels change from 2015-01-16 "* lisp/emacs-lisp/cl-macs.el: Fix
last change".
* test/lisp/emacs-lisp/cl-tests.el (labels-function-quoting): New
test.
* lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Improve docstring,
link to relevant manual page.
* doc/misc/cl.texi (Function Bindings): Don't imply that function
cells of symbols are modified by cl-flet. Don't claim that cl-flet or
cl-labels affect references of the form (quote FUNC).
Aaron Jensen [Thu, 24 May 2018 10:45:03 +0000 (03:45 -0700)]
Prevent errant scroll on mouse click (Bug#31546)
* src/nsterm.m (ns_mouse_position): Use correct frame when determining
mouse position.
* lisp/mouse.el (mouse-drag-track): Only account for mode-line height
if `mode-line-format' is non-nil.
Paul Eggert [Sat, 16 Jun 2018 14:44:58 +0000 (07:44 -0700)]
Fix byte compilation of (eq foo 'default)
Backport from master.
Do not use the symbol ‘default’ as a special marker.
Instead, use a value that cannot appear in the program,
improving on a patch proposed by Robert Cochran (Bug#31718#14).
* lisp/emacs-lisp/bytecomp.el (byte-compile--default-val):
New constant.
(byte-compile-cond-jump-table-info)
(byte-compile-cond-jump-table): Use it instead of 'default.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(byte-opt-testsuite-arith-data): Add a test for the bug.
Eli Zaretskii [Fri, 15 Jun 2018 14:39:34 +0000 (17:39 +0300)]
Reject invalid 5-byte sequences when detecting UTF-8 encoding
* src/coding.c (detect_coding_utf_8): Reject multibyte sequences
whose leading byte is greater than MAX_MULTIBYTE_LEADING_CODE.
(Bug#31829)
* src/character.h (MAX_MULTIBYTE_LEADING_CODE): Add commentary
about the connection between the value of this macro and MAX_CHAR.
Robert Pluim [Fri, 15 Jun 2018 07:40:53 +0000 (00:40 -0700)]
Improve movemail default
* lisp/gnus/mail-source.el (mail-source-movemail-program):
Change default to "movemail".
(mail-source-movemail): Pass just mail-source-movemail-program to
call-process instead of fully specifying it relative to
exec-directory. Ensures that we will find Mailutils movemail if
it is installed. (Bug#31737)
Eli Zaretskii [Fri, 15 Jun 2018 07:32:45 +0000 (10:32 +0300)]
Delete description of deleted Customize functions
* doc/lispref/customize.texi (Variable Definitions): Remove the
description of 'custom-initialize-safe-set' and
'custom-initialize-safe-default', which were deleted in Emacs
23.2, and replace with the description of
'custom-initialize-delay'.
Paul Eggert [Sat, 26 May 2018 20:29:06 +0000 (13:29 -0700)]
Don’t set EMACS=t if Bash is 4.4 or newer
(Backport from master.)
(Thanks to Stefan Monnier for improvements to this patch.)
* lisp/term.el (term--bash-needs-EMACS-status): New var.
(term--bash-needs-EMACSp): New function.
(term-exec-1): Use it instead of always setting EMACS.
Eli Zaretskii [Thu, 14 Jun 2018 13:54:08 +0000 (16:54 +0300)]
Improve commentary in info.el
* lisp/info.el: Explain in commentary why some commands start with
"info-" and others with "Info-". See also
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00482.html.
Sam Steingold [Fri, 3 Nov 2017 16:00:35 +0000 (12:00 -0400)]
Finish the Bug#11728 work: hg & git
* lisp/vc/vc-git.el (vc-git--pushpull): Make `extra-args' a list.
Do not set `compilation-error-regexp-alist', this is done in
`vc-compilation-mode'.
(vc-git-error-regexp-alist): Tweak the regexp.
* lisp/vc/vc-hg.el (vc-hg-error-regexp-alist): Make non-trivial.
(vc-hg--pushpull): Accept `post-processing' argument.
Call them after the `command'.
(vc-hg-pull): Pass the `post-processing' commands that show which
are to be modified by the `update', and then run `update'.
Sam Steingold [Wed, 1 Nov 2017 23:13:46 +0000 (19:13 -0400)]
Fix Bug#11728: show files updated by git
* lisp/vc/vc-git.el (vc-git--pushpull): Accept extra-args and set
`compilation-error-regexp-alist' to `vc-git-error-regexp-alist'.
(vc-git-pull): Pass "--stat" as `extra-args' to `vc-git--pushpull'.
(vc-git-push): Pass "" as `extra-args' to `vc-git--pushpull'.
Noam Postavsky [Thu, 7 Jun 2018 01:25:52 +0000 (21:25 -0400)]
; Reduce quoting for SELECTOR in 'make -C test' (Bug#31744)
Before:
make -C test SELECTOR='\"foo\"'
make -C test SELECTOR='(quote (tag :some-tag))'
After:
make -C test SELECTOR='"foo"'
make -C test SELECTOR='(tag :some-tag)'
* test/Makefile.in: Use single quotes around the command line call to
ert, this means the user doesn't have to backslash escape double
quotes when writing lisp strings for the selector. Also wrap the
SELECTOR value in (quote ...) so the user won't have to type it
in (and not get tempted to use the '... reader syntax form which would
now fail to work due to using single quotes around the whole shell
arg).
* test/README: Update instructions accordingly.
Noam Postavsky [Thu, 7 Dec 2017 09:31:47 +0000 (04:31 -0500)]
Make 'tags' targets respect --with-silent-rules (Bug#31744)
* lwlib/Makefile.in (TAGS):
* lisp/Makefile.in (TAGS):
* src/Makefile.in (TAGS): Use AM_V_GEN and AM_V_at.
* src/Makefile.in: Note that TAGS are generated in build dir.
soap-client: Add byte-code compatibility function (Bug#31742)
* lisp/net/soap-client.el: Bump version to 3.1.4.
(soap-type-of): New function.
(soap-resolve-references, soap-decode-type)
(soap-encode-attributes, soap-encode-value): Replace aref
calls with calls to soap-type-of.
* lisp/net/soap-inspect.el (soap-sample-value, soap-inspect):
Replace aref calls with calls to soap-type-of.
Reuben Thomas [Fri, 16 Mar 2018 10:50:21 +0000 (10:50 +0000)]
Call enchant-lsmod correctly when Enchant is installed with a suffix
* lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Cope with a
version suffix on the binary name, so enchant-2 is converted to
enchant-lsmod-2, not enchant-2-lsmod. (Bug#31761)
Eli Zaretskii [Sat, 9 Jun 2018 12:41:21 +0000 (15:41 +0300)]
Update Unicode data files to version 11.0.0 of Unicode
* admin/unidata/UnicodeData.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/copyright.html:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/BidiBrackets.txt: Import from Unicode 11.0.
* admin/notes/unicode: Update the URL for OTF script tags.
* lisp/international/mule-cmds.el (ucs-names): Update unused ranges.
* lisp/international/fontset.el (script-representative-chars): Add
hanifi-rohingya, old-sogdian, sogdian, dogra, gunjala-gondi,
makasar, and medefaidrin.
(otf-script-alist): Add old-hungarian.
* lisp/international/characters.el (tbl): Add syntax entries for
Supplemental Mathematical Operators, Miscellaneous Symbols and
Arrows, and Supplemental Punctuation.
Update the list of wide characters.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part2): Update to match
admin/unidata/NormalizationTest.txt.
* doc/lispref/nonascii.texi (Character Properties): Update the
reference to the Unicode Standard.
* doc/misc/efaq.texi (New in Emacs 26):
* etc/NEWS: Mention compatibility with Unicode 11.0.
Martin Rudalics [Thu, 7 Jun 2018 07:59:38 +0000 (09:59 +0200)]
Fix unexpected jumps of window-point in 'set-window-configuration' (Bug#31695)
* src/window.c (Fset_window_configuration): Prevent that the
fix for Bug#12208 affects restoration of window points when
using separate minibuffer frames (Bug#31695).
Eli Zaretskii [Wed, 6 Jun 2018 15:28:44 +0000 (18:28 +0300)]
Fix cursor movement by 'next-logical-line' after 'next-line'
* src/indent.c (Fvertical_motion): Adjust TO_X when line-numbers
are being displayed. Remove unneeded "correction" of TO_X at the
goal line.
* lisp/simple.el (last--line-number-width): Remove unneeded
variable.
(line-move-visual): Account for line-number display width by
adjusting the pixel X coordinate that gets converted into
canonical columns passed to vertical-motion, instead of adjusting
temporary-goal-column (which then affects next commands, including
next-logical-line). (Bug#31723)
Allen Li [Sat, 8 Apr 2017 22:21:12 +0000 (15:21 -0700)]
Fix prompt in bookmark.el (Bug#24726)
* lisp/bookmark.el (bookmark-set-internal): Conform to the standard
default prompt format (per `minibuffer-electric-default-mode') which
does not use a colon.
* doc/emacs/display.texi (Useless Whitespace): Clarify that the
'empty' whitespace-style option highlights empty lines only at
BOB/EOB, as per the docstring of whitespace-style. (bug#31713)
Paul Eggert [Tue, 3 Apr 2018 15:12:41 +0000 (08:12 -0700)]
Port FC_COLOR change to older fontconfig
Problem reported by John ff in:
https://lists.gnu.org/r/emacs-devel/2018-04/msg00058.html
* src/ftfont.c (ftfont_spec_pattern) [!FC_COLOR]:
Don’t use FC_COLOR on older fontconfigs that don’t have it.
Robert Pluim [Tue, 3 Apr 2018 09:06:01 +0000 (11:06 +0200)]
Ignore color fonts when using Xft
* src/font.c (syms_of_font): New configuration variable
xft-ignore-color-fonts, default t.
* src/ftfont.c (ftfont_spec_pattern): Tell fontconfig to ignore
color fonts if xft-ignore-color-fonts is t. (Bug#30874, Bug#30045)
* etc/NEWS: Document xft-ignore-color-fonts.
Gemini Lasswell [Sun, 27 May 2018 18:38:00 +0000 (11:38 -0700)]
Make cl-print respect print-level and print-length (bug#31559)
* lisp/emacs-lisp/cl-print.el (cl-print--depth): New variable.
(cl-print-object) <cons>: Print ellipsis if printing depth greater
than 'print-level' or length of list greater than 'print-length'.
(cl-print-object) <vector>: Truncate printing with ellipsis if
vector is longer than 'print-length'.
(cl-print-object) <cl-structure-object>: Truncate printing with
ellipsis if structure has more slots than 'print-length'.
(cl-print-object) <:around>: Bind 'cl-print--depth'.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-3, cl-print-tests-4): New tests.
Phil Sainty [Thu, 3 May 2018 13:29:42 +0000 (01:29 +1200)]
Fix remote-host directory tracking for shells in `term' buffers
* lisp/term.el (term-handle-ansi-terminal-messages): Use an explicit
tramp method when constructing the tramp path for a non-local host,
as this is now mandatory. "-" is a pseudo-method for the user's
`tramp-default-method'. (Bug#31355)
Specify the remote username explicitly in all cases, as
`tramp-default-user' and `tramp-default-user-alist' could cause the
previous logic to fail.
Stefan Monnier [Fri, 23 Mar 2018 15:29:06 +0000 (11:29 -0400)]
Fix bug#30846, along with misc cleanups found along the way
* test/src/data-tests.el (data-tests-kill-all-local-variables): New test.
* src/buffer.c (swap_out_buffer_local_variables): Remove.
Fuse the body of its loop into that of reset_buffer_local_variables.
(Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
(reset_buffer_local_variables): Make sure the buffer's local binding
is swapped out before removing it from the alist (bug#30846).
Call watchers before actually killing the var.
* src/data.c (Fmake_local_variable): Simplify.
Use swap_in_global_binding to swap out any local binding, instead of
a mix of find_symbol_value followed by messing with where&found.
Don't call swap_in_symval_forwarding since the currently swapped
binding is never one we've modified.
(Fkill_local_variable): Use swap_in_global_binding rather than messing
with where&found to try and trick find_symbol_value into doing the same.
* src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.
Jay Kamat [Tue, 8 May 2018 19:04:00 +0000 (12:04 -0700)]
esh-opt.el: Fix improper parsing of first argument (Bug#28323)
Examples of broken behavior:
sudo -u root whoami
Outputs: -u
ls -I '*.txt' /dev/null
Errors with: *.txt: No such file or directory
* lisp/eshell/esh-opt.el (eshell--process-args): Refactor usage of
args to eshell--args, as we rely on modifications from
eshell--process-option and vice versa. These modifications were not
being propogated in the (if (= ai 0)) case, since popping the first
element of a list doesn't destructively modify the underlying list
object.
* lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Push each
element of list being printed onto cl-print--currently-printing.
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle-2): New
test.