Eli Zaretskii [Sat, 15 Sep 2018 09:21:12 +0000 (12:21 +0300)]
Avoid adverse side effects of fixing bug#21824
* test/src/buffer-tests.el
(overlay-modification-hooks-deleted-overlay): New test.
* src/buffer.c (report_overlay_modification): Don't bypass all
the overlay-modification hooks; instead, invoke each function
only if the buffer associated with the overlay is the current
buffer. (Bug#30823)
Leo Liu [Fri, 14 Sep 2018 14:31:50 +0000 (22:31 +0800)]
Fix (thing-at-point 'list) regression (Bug#31772)
* lisp/thingatpt.el (thing-at-point-bounds-of-list-at-point): Revert
to pre 26.1 behavior. Return whole sexp at point if no enclosing
list.
(list-at-point): New optional arg to ignore comments and strings.
* test/lisp/thingatpt-tests.el
(thing-at-point-bounds-of-list-at-point): Fix and augment tests.
Eli Zaretskii [Mon, 10 Sep 2018 09:46:22 +0000 (12:46 +0300)]
Clarify documentation of functions reading character events
* doc/lispref/help.texi (Describing Characters):
* doc/lispref/commands.texi (Keyboard Events)
(Reading One Event, Classifying Events): Make the distinction
between characters and character events more explicit.
* src/keymap.c (Ftext_char_description)
(Fsingle_key_description):
* src/lread.c (Fread_char, Fread_char_exclusive): Doc fixes,
to make a clear distinction between a character input event
and a character code. (Bug#32562)
Eli Zaretskii [Fri, 7 Sep 2018 07:35:59 +0000 (10:35 +0300)]
Record :version for built-in variables while dumping
* lisp/cus-start.el (standard): Record the ':version; of the
symbols when dumping, so that 'describe-variable' could tell
which built-in variables were added/changed in recent
versions.
* Makefile.in (appdatadir): Use the non-obsolete location "metainfo".
; https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
; "AppStream tools scan the /usr/share/appdata/ path for legacy
; compatibility as well. It should not be used anymore by new
; software though, even on older Linux distributions (like RHEL 7
; and Ubuntu 16.04 LTS) the metainfo path is well supported. Support
; for the legacy path might be dropped completely in future."
Stefan Monnier [Tue, 4 Sep 2018 16:03:52 +0000 (12:03 -0400)]
Better fix for bug#32550
* lisp/rfn-eshadow.el (rfn-eshadow-overlay): Give it a global default.
* lisp/net/tramp.el (rfn-eshadow-overlay): Declare it as dynamically scoped.
(tramp-rfn-eshadow-update-overlay): Revert the corresponding part of
last change.
Michael Albinus [Tue, 4 Sep 2018 09:59:39 +0000 (11:59 +0200)]
Fix Bug#32550
* lisp/net/tramp.el (tramp-rfn-eshadow-setup-minibuffer): Do not
use `symbol-value'.
(tramp-rfn-eshadow-update-overlay): Do not use `symbol-value'. Do
not let-bind `rfn-eshadow-overlay', assign it directly (due to
lexical binding). (Bug#32550)
* doc/misc/calc.texi (Reporting Bugs): Use standard commands.
* lisp/calc/calc-misc.el (report-calc-bug, calc-report-bug):
* lisp/calc/calc.el (calc-bug-address): Change to be
obsolete aliases for standard Emacs bug reporting items.
Michael Albinus [Fri, 31 Aug 2018 08:47:03 +0000 (10:47 +0200)]
Rename thread-alive-p to thread-live-p
* doc/lispref/threads.texi (Basic Thread Functions): Use thread-live-p.
* etc/NEWS: 'thread-alive-p' has been renamed to 'thread-live-p'.
* src/thread.c (thread_live_p): Rename from thread_alive_p. Adapt
all callees.
(Fthread_live_p): Rename from Fthread_alive_p.
(syms_of_threads): Make thread-alive-p an alias of thread-live-p.
* test/src/thread-tests.el (all): Replace `thread-alive-p' by
`thread-live-p'.
(threads-live): Rename from `threads-alive'.
Miciah Masters [Mon, 11 Dec 2017 00:56:48 +0000 (19:56 -0500)]
rcirc: Document /reconnect as a built-in command (Bug#29656)
The change "New command rcirc-cmd-reconnect" from 2014-04-09 (shipped
in Emacs 25.1) added a /reconnect command to rcirc but did not
document it and did not delete the example /reconnect command
definition in the manual.
* doc/misc/rcirc.texi (rcirc commands): Document the built-in /reconnect
command.
(Hacking and Tweaking): Delete example reconnect command.
Noam Postavsky [Wed, 15 Aug 2018 03:26:50 +0000 (23:26 -0400)]
Fix math-imaginary-i check
Reported by Bastian Erdnüß at
<https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00300.html>.
* lisp/calc/calc-cplx.el (math-imaginary-i): Check for a value
of (polar 1 <quarter-circle>).
Noam Postavsky [Thu, 15 Feb 2018 00:58:07 +0000 (19:58 -0500)]
; Let pre-commit git hook check merged in changes (Bug#29197)
* build-aux/git-hooks/pre-commit: If GIT_MERGE_CHECK_OTHER is 'true',
check changes against the merge target, rather than the current
branch. Include file name when giving error message about
non-standard characters.
Sergey Vinokurov [Sun, 19 Aug 2018 20:31:01 +0000 (21:31 +0100)]
Fix detection of freed emacs_values (Bug#32479)
* src/emacs-module.c (module_free_global_ref): Compare a value to be
freed with all entries of the list.
* test/data/emacs-module/mod-test.c (Fmod_test_globref_free): New
function.
(emacs_module_init): Make it accessible from Lisp.
* test/src/emacs-module-tests.el (mod-test-globref-free-test): New
test which uses it.
Eli Zaretskii [Sat, 25 Aug 2018 12:26:41 +0000 (15:26 +0300)]
Avoid crashes with very wide TTY frames on MS-Windows
* src/w32console.c <glyph_base>: Reduce the number of elements
to 80.
<glyphs, glyphs_len>: New static variables.
(w32con_clear_end_of_line): If the line is wider than the
current size of the "empty row" in 'glyphs', reallocate
'glyphs' to support the full width of the frame. This
avoids segfaults when the frame is wider than 256 columns.
(Bug#32445)
Eli Zaretskii [Thu, 23 Aug 2018 17:02:27 +0000 (20:02 +0300)]
Clarify in the Emacs manual that ChangeLog files are not used
* doc/emacs/trouble.texi (Sending Patches): Use "commit log"
instead of "change log", to avoid the interpretation that we
are talking about literal ChangeLog files. (Bug#32359)
Paul Eggert [Sun, 12 Aug 2018 22:28:20 +0000 (15:28 -0700)]
Port better to x86 -fexcess-precision=fast
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00380.html
* src/data.c (arithcompare): Work around incompatibility
between gcc -fexcess-precision=fast and the C standard on x86,
by capturing the results of floating-point comparisons before
the excess precision spontaneously decays. Although this fix
might not work in general, it does work here and is probably
good enough for the platforms we care about.
Paul Eggert [Mon, 13 Aug 2018 16:36:11 +0000 (09:36 -0700)]
Add comment about floating point test
* test/src/data-tests.el (data-tests--float-greater-than-fixnums):
New constant.
(data-tests-=, data-tests-<, data-tests->, data-tests-<=)
(data-tests->=, data-tests-min): Use it.
Tino Calancha [Mon, 13 Aug 2018 10:24:31 +0000 (19:24 +0900)]
Ibuffer: Add toggle ibuffer-do-toggle-lock
Toggle the locked status in marked buffers or the buffer
at point (Bug#32421).
* lisp/ibuffer.el (ibuffer-do-toggle-lock): New command.
(ibuffer-mode-map): Bind it to 'L'.
(ibuffer-mode-operate-map): Add entries for
`ibuffer-do-toggle-read-only' and `ibuffer-do-toggle-lock'.
* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.2):
Announce the change.
Tino Calancha [Mon, 13 Aug 2018 10:22:49 +0000 (19:22 +0900)]
Ibuffer: Detect correctly the buffers running a process
* lisp/ibuffer.el (filename-and-process): Store the process buffer
as a text property; check for such property to detect a buffer
with a process (Bug#32420).
Michael Albinus [Sun, 12 Aug 2018 16:15:24 +0000 (18:15 +0200)]
Backport fix for Bug#32226
* test/lisp/shadowfile-tests.el: Set Tramp variables for hydra.
(shadow-test06-literal-groups, shadow-test07-regexp-groups)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Use `set-visited-file-name' instead of setting the value in
`buffer-file-name' directly.
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Test for writable temporary directory. Suppress errors in
cleanup. (Bug#32226)
Do not consider external packages to be removable (Bug#27822)
Packages which are not directly user-installed shouldn't be autoremoved,
since they can be setup through a different path (via
`package-directory-list') where we have no authority over.
* lisp/emacs-lisp/package.el (package--user-installed-p): New
function.
(package--removable-packages): Use it.
Eli Zaretskii [Sat, 11 Aug 2018 09:01:37 +0000 (12:01 +0300)]
Better support utf-8-with-signature and utf-8-hfs in HTML
* lisp/international/mule.el (sgml-html-meta-auto-coding-function):
Support UTF-8 with BOM and utf-8-hfs as variants of UTF-8, and
obey the buffer's encoding if it is one of these variants, instead
of re-encoding in UTF-8 proper. (Bug#20623)
Eli Zaretskii [Sat, 11 Aug 2018 08:38:43 +0000 (11:38 +0300)]
Don't use -Wabi compiler option
* configure.ac: Add -Wabi to the list of disabled warning
options. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00123.html.
Filipp Gunbin [Tue, 15 May 2018 00:02:49 +0000 (03:02 +0300)]
Fix bugs in `auth-source-netrc-parse-one'.
* lisp/auth-source.el (auth-source-netrc-parse-one): Ensure that match
data is not overwritten in `auth-source-netrc-parse-next-interesting'.
Ensure that blanks are skipped before and after going over comments
and eols.
* test/lisp/auth-source-tests.el (auth-source-test-netrc-parse-one): New test.
Eli Zaretskii [Thu, 9 Aug 2018 15:08:35 +0000 (18:08 +0300)]
Fix copying text properties by 'format'
* src/editfns.c (styled_format): Add the spec beginning index
to the info recorded for each format spec, and use it to
detect the case that a format spec and its text property end
where the next spec with another property begins. (Bug#32404)
* test/src/editfns-tests.el (format-properties): Add tests for
bug#32404.
* lisp/startup.el (command-line-1) <initial-buffer-choice>: Make the
messages conform to Emacs conventions, and show the invalid return
value in the message.
Fix emacsclient check for term.el buffer (Bug#21041)
* lib-src/emacsclient.c (find_tty): Check for any TERM value with
prefix of "eterm", not just "eterm" itself. Also check for ",term:"
in INSIDE_EMACS value.
Eli Zaretskii [Tue, 7 Aug 2018 15:35:12 +0000 (18:35 +0300)]
Fix Flyspell mode when several languages are mixed in a buffer
* lisp/textmodes/flyspell.el (flyspell-external-point-words):
Handle "misspelled" words that actually belong to a language
unsupported by the current dictionary. (Bug#32280) Fix the test
for Ispell the program.
Eli Zaretskii [Thu, 2 Aug 2018 13:58:44 +0000 (16:58 +0300)]
Avoid assertion violations in maybe_produce_line_number
* src/xdisp.c (redisplay_window): Make sure desired_matrix is
cleared before calling try_window. This is important when
display-line-numbers is non-nil, because line-number display code
assumes each glyph row is completely cleared when it is called to
produce a line number. (Bug#32358)
Eli Zaretskii [Thu, 2 Aug 2018 13:29:54 +0000 (16:29 +0300)]
Avoid assertion violations in set_text_properties_1
* src/textprop.c (set_text_properties): If the call to
modify_text_properties modifies the interval tree as side effect,
recalculate the correct interval for START and END. (Bug#32265)
Stephen Berman [Sat, 28 Jul 2018 21:58:15 +0000 (23:58 +0200)]
Fix use of non-nil wdired-use-interactive-rename
This is a fairly minimal fix for the release branch; a more
comprehensive fix is on master, so do not merge this to master.
* lisp/wdired.el (wdired-search-and-rename): Remove dired-filename
text property in order to find new filename when it only partially
replaces old filename (bug#32173). If user quits before renaming
succeeds, restore the dired-filename text property.
Don't fail to indent-sexp before a full sexp (Bug#31984)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only signal error if the
initial forward-sexp fails. Suppress scan-error forn any of the
forward-sexp calls after that.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-cant-go): New
test.
Eli Zaretskii [Fri, 27 Jul 2018 10:04:19 +0000 (13:04 +0300)]
Fix calls to modifications hooks in replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Call the modification
hooks on the entire region where replacements could have taken
place. The previous attempts of being more accurate just
introduced bugs. (Bug#32278)
Eli Zaretskii [Fri, 27 Jul 2018 06:47:37 +0000 (09:47 +0300)]
Display raw bytes as belonging to 'eight-bit' charset
* lisp/descr-text.el (describe-char):
* lisp/simple.el (what-cursor-position): Display characters in the
range #x3FFF80..#x3FFF9F as belonging to charset 'eight-bit', not
'tis620-2533'.
* lisp/international/mule-diag.el (describe-character-set):
Improve description of :supplementary-p.
Let bookmark-jump override window-point (Bug#31751)
* lisp/bookmark.el (bookmark-jump): Use pop-to-buffer-same-window
instead of switch-to-buffer, the latter obeys
switch-to-buffer-preserve-window-point and so loses the bookmark's
point.
Omit keymap from subword-mode docstring (Bug#32212)
* lisp/progmodes/subword.el (subword-mode): Remove listing of
subword-mode-map bindings, since it is empty as of 2014-03-23 "Merge
capitalized-words-mode and subword-mode".
Tino Calancha [Thu, 15 Feb 2018 00:09:50 +0000 (09:09 +0900)]
Prevent line-mode term from showing user passwords
For buffers whose mode derive from comint-mode, the user password is
read from the minibuffer and it's hidden. A buffer in term-mode and
line submode, instead shows the passwords. Make buffers in line
term-mode to hide passwords too (Bug#30190).
* lisp/term.el (term-send-invisible): Prefer the more robust
`read-passwd' instead of `term-read-noecho'.
(term-watch-for-password-prompt): New function.
(term-emulate-terminal): Call it each time we receive non-escape
sequence output.
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Look for a sexp that
ends after the current line.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-go): New test.