Noam Postavsky [Sun, 16 Sep 2018 23:39:06 +0000 (19:39 -0400)]
Clarify condition-case docstring
* src/eval.c (Fcondition_case): Note that it handles non-error symbols
too.
Noam Postavsky [Mon, 17 Sep 2018 00:12:33 +0000 (20:12 -0400)]
; Add FIXME regarding previous change
Pierre Lorenzon [Wed, 29 Aug 2018 03:28:32 +0000 (05:28 +0200)]
Update pconf for compile.el mode-line-process changes
* lisp/cedet/ede/pconf.el (ede-proj-configure-synchronize): Check the
first list element of mode-line-process (Bug#32564).
Copyright-paperwork-exempt: yes
Paul Eggert [Sun, 16 Sep 2018 20:41:21 +0000 (13:41 -0700)]
* src/thread.h: Do not include systime.h; no longer needed.
Paul Eggert [Sun, 16 Sep 2018 15:52:16 +0000 (08:52 -0700)]
Don’t assume obsolescent setitimer function
* src/atimer.c (start_atimer, debug_timer_callback):
Don’t assume support for setitimer merely because struct
itimerspec works. POSIX no longer requires support for the
obsolescent setitimer function.
Paul Eggert [Sun, 16 Sep 2018 06:17:15 +0000 (23:17 -0700)]
Simplify get_up_time on GNU/Linux
* src/sysdep.c (get_up_time) [GNU_LINUX && HAVE_LONG_LONG_INT]:
Omit unused locals.
Paul Eggert [Sat, 15 Sep 2018 22:00:54 +0000 (15:00 -0700)]
Go back to old method for nnmaildir names
* lisp/gnus/nnmaildir.el (nnmaildir-request-accept-article):
Omit leading 0s after "M" in file name.
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00660.html
Paul Eggert [Sat, 15 Sep 2018 21:10:49 +0000 (14:10 -0700)]
Fix icalendar tests to match new behavior
* test/lisp/calendar/icalendar-tests.el (icalendar--create-uid):
Do not intrude into or rely upon undocumented internal
implementation details of icalendar--create-uid.
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00660.html
Glenn Morris [Sat, 15 Sep 2018 16:30:02 +0000 (09:30 -0700)]
; * etc/NEWS: assoc-delete-all fix
This is a mess. This function was added in master in
afba4ccb8b8,
undocumented. It was then tweaked and documented in
9824885fabe.
Much later in
cc233365a92 the original untweaked and undocumented
version was backported to emacs-26. This was independently
redocumented in emacs-26 in
cc8f334d2da, which conflicted with the
interface changes that had been made on master.
Glenn Morris [Sat, 15 Sep 2018 16:20:32 +0000 (09:20 -0700)]
Merge from origin/emacs-26
e133b63 (origin/emacs-26) Avoid adverse side effects of fixing bug#21824
cc8f334 Document changes called out in NEWS
20ecc52 ; * etc/NEWS: Document recent change in 'thing-at-point'.
1fc5283 ; INSTALL: Fix a typo in the last commit.
24f240d Tiny doc updates re yum/dnf etc
41c2d25 Remove unused variable
1e3b3fa Fix (thing-at-point 'list) regression (Bug#31772)
219893a Clarify meaning of '*'
41cdda2 * etc/PROBLEMS: Document Ubuntu 16.04 issue.
1c22f03 Increase default value for imenu-auto-rescan-maxout
ee84389 Improve recent change to ELisp manual
ff374e4 * doc/lispref/display.texi (SVG Images): Improve wording.
3a0caf6 * doc/lispref/display.texi (SVG Images): Fix a typo. (Bug#32...
Conflicts:
doc/lispref/lists.texi
etc/NEWS
Noam Postavsky [Sat, 15 Sep 2018 13:44:30 +0000 (09:44 -0400)]
Don't call modification hooks unprepared
Inhibit modification hooks when performing message coalescing because
in that case, we aren't doing the necessary preparation for running
modification hooks (i.e., we pass PREPARE=false for the insert_1_both
and del_range_both calls). See also Bug#30823 and Bug#21824.
* src/xdisp.c (message_dolog): Let-bind inhibit-modification-hooks
to t around del_range_both calls.
Wenjamin Petrenko [Sat, 8 Sep 2018 14:27:56 +0000 (17:27 +0300)]
Make 'filesets-save-config' save filesets added by 'filesets-add-buffer'
* lisp/filesets.el (filesets-set-config): Use 'customize-set-variable'
so that filesets are saved by 'customize-save-customized' in
'filesets-save-config'. (Bug#20630)
Copyright-paperwork-exempt: yes
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)
Eli Zaretskii [Sat, 15 Sep 2018 08:51:34 +0000 (11:51 +0300)]
Document changes called out in NEWS
* doc/lispref/lists.texi (Association Lists): Document
'assoc-delete-all'.
* doc/lispref/minibuf.texi (Minibuffers): Adapt menu.
(Multiple Queries): Document 'read-answer'.
* etc/NEWS: Reflect the above documentation in the respective
entries.
Eli Zaretskii [Sat, 15 Sep 2018 08:07:16 +0000 (11:07 +0300)]
; * etc/NEWS: Document recent change in 'thing-at-point'.
Eli Zaretskii [Sat, 15 Sep 2018 07:52:55 +0000 (10:52 +0300)]
; INSTALL: Fix a typo in the last commit.
Glenn Morris [Fri, 14 Sep 2018 15:54:28 +0000 (08:54 -0700)]
Tiny doc updates re yum/dnf etc
* INSTALL: Mention dnf and Debian unversioned emacs package.
* doc/misc/efaq.texi (Installing Emacs): Mention dnf.
Stefan Monnier [Fri, 14 Sep 2018 15:52:15 +0000 (11:52 -0400)]
* lisp/progmodes/idlw-shell.el: Use lexical-binding
(idlwave-shell-source-frame): Remove unused var 'frame'.
(idlwave-shell): Remove unused arg 'quick'.
(idlwave-shell-complete-filename, idlwave-shell-edit-default-command-line)
(idlwave-shell-retall, idlwave-shell-closeall): Remove unused arg 'arg'.
(idlwave-shell-move-to-bp): Remove unused var 'got-bp'.
(zmacs-regions): Declare.
(idlwave-shell-update-bp-overlays): Remove unused var 'win'.
(idlwave-shell-delete-expression-overlay)
(idlwave-shell-mouse-nop): Delete function. Use 'ignore' instead.
(idlwave-shell-delete-output-overlay): Ignore 'ignore' commands rather
than idlwave-shell-mouse-nop commands.
(idlwave-shell-mode-map, idlwave-shell-electric-debug-mode-map):
Move (part of) the initialization into the declaration.
(idlwave-shell-electric-debug-mode-on-hook)
(idlwave-shell-electric-debug-mode-off-hook): Keep them empty, move
code into the minor mode's definition instead.
(idlwave-shell-electric-debug-mode): Don't use advice needlessly.
Stefan Monnier [Fri, 14 Sep 2018 15:25:16 +0000 (11:25 -0400)]
* lisp/progmodes/ada-mode.el (comment-region): Avoid defadvice
Don't load 'advice' if it won't be used!
Stefan Monnier [Fri, 14 Sep 2018 15:14:02 +0000 (11:14 -0400)]
* lisp/eshell/em-dirs.el (eshell-expand-multiple-dots): Avoid defadvice.
Stefan Monnier [Fri, 14 Sep 2018 15:05:33 +0000 (11:05 -0400)]
* lisp/mail/feedmail.el: Use lexical-binding
(feedmail-queue-buffer-file-name): Improve advising example.
(feedmail-vm-mail-mode): Improve auto-mode-alist example.
(feedmail-queue-runner-prompt): Remove unused function.
Leo Liu [Fri, 14 Sep 2018 14:44:09 +0000 (22:44 +0800)]
Remove unused variable
* lisp/progmodes/prolog.el (prolog-hungry-delete-key-flag): Remove.
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.
Stefan Monnier [Fri, 14 Sep 2018 14:23:39 +0000 (10:23 -0400)]
* lisp/progmodes/js.el (js--fill-c-advice): New function
(c-forward-sws, c-backward-sws, c-beginning-of-macro): Use it.
(js-fill-paragraph): Rename from js-c-fill-paragraph.
Robert Pluim [Fri, 14 Sep 2018 13:57:14 +0000 (15:57 +0200)]
Clarify meaning of '*'
* doc/misc/dired-x.texi (Shell Command Guessing): Clarify meaning
of '*'. (Bug#32733)
Michael Albinus [Fri, 14 Sep 2018 08:03:27 +0000 (10:03 +0200)]
; Instrument autorevert-tests.el
Paul Eggert [Fri, 14 Sep 2018 00:31:58 +0000 (17:31 -0700)]
Simplify use of timestamps
* lisp/calendar/icalendar.el (icalendar--create-uid):
* lisp/gnus/nnmaildir.el (nnmaildir-request-accept-article):
Simplify by using format-time-string.
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
Simplify by using float-time and time-less-p.
Paul Eggert [Thu, 13 Sep 2018 21:28:56 +0000 (14:28 -0700)]
Fix (floor
54043195528445955 3.0) bug
* src/floatfns.c (rounding_driver): Fix rounding error
that can occur when both args have values exactly
representable as integers but at least one arg is a float.
* test/src/floatfns-tests.el (big-round): New test.
Stephen Berman [Thu, 13 Sep 2018 20:19:22 +0000 (22:19 +0200)]
Fix wdired handling of symlinks when restoring filename property
* lisp/wdired.el (wdired--restore-dired-filename-prop): Use
dired-permission-flags-regexp instead of dired-filename to test
whether the file is a symlink, since calling file-symlink-p on the
latter may fail in wdired-mode (bug#32673).
Stefan Monnier [Thu, 13 Sep 2018 01:47:39 +0000 (21:47 -0400)]
(viper-read-key, viper-read-key-sequence): Remove
Ever since the time-dependent ESC handling was moved to input-decode-map,
viper-read-key-sequence has been obsolete. Clean up accordingly.
* lisp/emulation/viper-keym.el: Use lexical-binding.
(viper-overriding-map): Remove.
* lisp/emulation/viper-macs.el: Use lexical-binding and 'read-key'.
* lisp/emulation/viper-util.el: Use lexical-binding.
(viper-read-key, viper-read-key-sequence): Remove.
* lisp/emulation/viper.el (viper-non-hook-settings): Remove obsolete advice.
Katsumi Yamaoka [Thu, 13 Sep 2018 00:02:21 +0000 (00:02 +0000)]
No need to run gnus-article-highlight (bug#32706)
* lisp/gnus/deuglify.el (gnus-outlook-display-article-buffer):
No need to run gnus-article-highlight (bug#32706).
Juri Linkov [Wed, 12 Sep 2018 22:09:53 +0000 (01:09 +0300)]
* lisp/vc/vc-git.el (vc-git-grep): Set dir to default-directory
when it's not available (like it's implemented in lgrep/rgrep)
to prevent error in case of `C-u C-u vc-git-grep'.
Juri Linkov [Wed, 12 Sep 2018 21:50:22 +0000 (00:50 +0300)]
* lisp/dired-x.el (dired-jump): Support archive-subfile-mode
exactly like tar-subfile-mode is already supported.
Juri Linkov [Wed, 12 Sep 2018 21:47:03 +0000 (00:47 +0300)]
* lisp/simple.el (next-error-no-select): Set display-buffer-overriding-action
to display-buffer-reuse-window (bug#32607).
Paul Eggert [Wed, 12 Sep 2018 14:53:43 +0000 (07:53 -0700)]
* etc/PROBLEMS: Document Ubuntu 16.04 issue.
Alex Branham [Fri, 31 Aug 2018 13:05:06 +0000 (08:05 -0500)]
Increase default value for imenu-auto-rescan-maxout
* lisp/imenu.el (imenu-auto-rescan-maxout): Increase default value to
600000. (Bug#18426)
* doc/emacs/programs.texi (imenu-auto-rescan-maxout): Add
documentation for imenu-auto-rescan-maxout.
Copyright-paperwork-exempt: yes
Katsumi Yamaoka [Wed, 12 Sep 2018 07:21:15 +0000 (07:21 +0000)]
Don't highlight article if gnus-visual-p is nil (bug#32706)
* lisp/gnus/deuglify.el (gnus-outlook-display-article-buffer):
Don't highlight article if gnus-visual-p is nil (bug#32706).
Filipp Gunbin [Tue, 11 Sep 2018 18:43:41 +0000 (21:43 +0300)]
Fix incorrect spelling of dabbrev-ignored-buffer-regexps in docstrings.
* lisp/dabbrev.el (dabbrev-check-all-buffers, dabbrev-expand): Fix docstrings.
Paul Eggert [Tue, 11 Sep 2018 18:34:05 +0000 (11:34 -0700)]
Minor rounding_driver simplification
* src/floatfns.c (rounding_driver): Omit last arg, which is
now unused. All callers changed.
Signal overflow-error for bignum overflow
Paul Eggert [Tue, 11 Sep 2018 18:30:48 +0000 (11:30 -0700)]
Fix (round 1e+INF) core dump
* src/bignum.c (double_to_integer): Signal an error
if D cannot be converted, instead of dumping core.
* test/src/floatfns-tests.el (special-round): New test.
Paul Eggert [Tue, 11 Sep 2018 18:21:11 +0000 (11:21 -0700)]
Use overflow-error for bignum overflow
This better corresponds to what emacs-26 did in the
rare cases where it checked for integer overflow.
* src/alloc.c (range_error): Remove.
All uses changed to overflow_error.
* src/eval.c (overflow_error): New function.
Eli Zaretskii [Tue, 11 Sep 2018 18:33:28 +0000 (21:33 +0300)]
Improve recent change to ELisp manual
* doc/lispref/commands.texi (Keyboard Events): Add index entry
for "character event". (Bug#32562)
Michael Albinus [Tue, 11 Sep 2018 09:46:32 +0000 (11:46 +0200)]
Precise Secret Service API in auth.texi (Bug#29575)
* doc/misc/auth.texi (Secret Service API): Item labels are not
unique. Document this. (Bug#29575)
Eli Zaretskii [Tue, 11 Sep 2018 07:30:25 +0000 (10:30 +0300)]
* doc/lispref/display.texi (SVG Images): Improve wording.
Eli Zaretskii [Tue, 11 Sep 2018 07:12:49 +0000 (10:12 +0300)]
* doc/lispref/display.texi (SVG Images): Fix a typo. (Bug#32690)
Paul Eggert [Tue, 11 Sep 2018 04:22:05 +0000 (21:22 -0700)]
Adjust to TIMESPEC_HZ renaming
Adjust to lib/timespec.h’s renaming of TIMESPEC_RESOLUTION and
LOG10_TIMESPEC_RESOLUTION to TIMESPEC_HZ and
LOG10_TIMESPEC_HZ. The old names were misnomers.
All uses changed.
Paul Eggert [Tue, 11 Sep 2018 04:16:03 +0000 (21:16 -0700)]
Update from Gnulib
This incorporates:
2018-09-10 timespec: fix resolution confusion
2018-09-09 mktime: simplify in prep for glibc merge
2018-09-07 intprops: minor clarification of code
2018-09-06 stddef: Override max_align_t on NetBSD 8.0/x86
2018-09-06 fcntl: Fix F_DUPFD_CLOEXEC behaviour on Haiku
2018-09-06 strtoll, strtoull: Rely on limits-h module
2018-09-06 limits-h: Provide numerical limits macros
2018-09-06 fcntl: Don't access nonexistent optional argument
2018-09-02 mktime: fix unlikely race+overflow bug
2018-08-31 mktime, timegm: simplify glibc time64_t
2018-08-31 mktime, timegm: simplify merge to glibc
* build-aux/config.guess, build-aux/config.sub:
* lib/dtotimespec.c, lib/fcntl.c, lib/intprops.h:
* lib/limits.in.h, lib/mktime-internal.h, lib/mktime.c:
* lib/stat-time.h, lib/strtol.c, lib/timegm.c:
* lib/timespec-add.c, lib/timespec-sub.c, lib/timespec.h:
* lib/utimens.c, m4/limits-h.m4, m4/stddef_h.m4:
Copy from Gnulib.
Glenn Morris [Mon, 10 Sep 2018 20:12:38 +0000 (13:12 -0700)]
Merge from origin/emacs-26
7efcdf7 (origin/emacs-26) Clarify completion text in the ELisp manual
30b0b0e Fix handling of abbreviated control command in gdb-mi.el
5cf282d Clarify documentation of functions reading character events
96281c5 Record :version for built-in variables while dumping
82160cf * src/process.c (connect_network_socket): Fix memory leak. (...
6c616e4 * Makefile.in (appdatadir): Use the non-obsolete location "me...
9618e16 Better fix for bug#32550
30d94e4 Fix Bug#32550
57bcdc7 Don't call XGetGeometry for frames without outer X window (Bu...
82fc6b6 * lisp/calculator.el: Fix doc typo.
ddc7c64 Standardize calc bug reporting instructions
Conflicts:
lisp/cus-start.el
Glenn Morris [Mon, 10 Sep 2018 20:08:50 +0000 (13:08 -0700)]
; Merge from origin/emacs-26
The following commit was skipped:
f9efbb5 ; Auto-commit of loaddefs files.
Glenn Morris [Mon, 10 Sep 2018 19:01:07 +0000 (15:01 -0400)]
* lisp/thread.el: Remove more useless runtime requires.
Glenn Morris [Mon, 10 Sep 2018 18:55:14 +0000 (14:55 -0400)]
Remove useless requires of subr-x at runtime
* lisp/thread.el, lisp/net/nsm.el, lisp/erc/erc.el:
Don't require subr-x at runtime.
Karl Fogel [Mon, 10 Sep 2018 17:17:06 +0000 (12:17 -0500)]
Fix build error: use string :version in defcustom
* lisp/textmodes/flyspell.el (flyspell-case-fold-duplications): Use a
string value for the :version keyword to `defcustom'. Otherwise,
building Emacs will fail with an error like this:
Scanning ./textmodes for custom
Scanning ./url for custom
Scanning ./vc for custom
Generating ./cus-load.el...
Version must be a string
make[2]: *** [Makefile:152: cus-load.el] Error 255
This follows up to Reuben Thomas's commit
61f3a4b4fc of 10 Sep 2018.
Paul Eggert [Mon, 10 Sep 2018 15:59:39 +0000 (08:59 -0700)]
Fix misleading name ‘double_to_bignum’
* src/bignum.c (double_to_integer): Rename from double_to_bignum,
since the result is not necessarily a bignum. All uses changed.
Paul Eggert [Mon, 10 Sep 2018 15:49:04 +0000 (08:49 -0700)]
* src/charset.c (Fencode_char): Tweak comment.
Reuben Thomas [Mon, 10 Sep 2018 14:06:02 +0000 (15:06 +0100)]
Add flyspell option to ignore duplicates of different case
* lisp/textmodes/flyspell.el (flyspell-case-fold-duplications): Add
option.
Eli Zaretskii [Mon, 10 Sep 2018 13:20:42 +0000 (16:20 +0300)]
Clarify completion text in the ELisp manual
* doc/lispref/minibuf.texi (Programmed Completion): Clarify
text. Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
Eli Zaretskii [Mon, 10 Sep 2018 13:11:05 +0000 (16:11 +0300)]
Fix handling of abbreviated control command in gdb-mi.el
* lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp):
Support unambiguous abbreviations of commands. (Bug#32576)
Eli Zaretskii [Mon, 10 Sep 2018 12:44:48 +0000 (15:44 +0300)]
Avoid compiler warnings due to get_proc_addr
* src/w32common.h (get_proc_addr): Add prototype, to shut up
GCC compilation warning. Reported by Martin Rudalics
<rudalics@gmx.at>.
Stefan Monnier [Mon, 10 Sep 2018 12:11:26 +0000 (08:11 -0400)]
* src/charset.c (Fencode_char): Explain when/why bignums are used
Martin Rudalics [Mon, 10 Sep 2018 12:07:05 +0000 (14:07 +0200)]
Fix last change of 'run_window_size_change_functions'
* src/window.c (run_window_size_change_functions): Fix two
type mixups in last change. Reported by Michael Albinus
<michael.albinus@gmx.de> on emacs-devel.
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)
Martin Rudalics [Mon, 10 Sep 2018 08:05:20 +0000 (10:05 +0200)]
Handle buffer-local 'window-size-change-functions' specially (Bug#32637)
* src/window.c (run_window_size_change_functions): Run a
buffer-local value once per each frame and only if at least
one window showing the buffer on that frame has changed its
size. (Bug#32637)
* doc/lispref/windows.texi (Window Hooks): Describe new
behavior of buffer-local 'window-size-change-functions'.
Gemini Lasswell [Sun, 9 Sep 2018 15:19:54 +0000 (08:19 -0700)]
Merge branch 'scratch/list-threads'
Gemini Lasswell [Sat, 8 Sep 2018 00:41:24 +0000 (17:41 -0700)]
Use thread-live-p instead of obsolete thread-alive-p
* lisp/thread.el (thread-list--get-status)
(thread-list--send-signal, thread-list-pop-to-backtrace)
(thread-list-backtrace--revert-hook-function)
(thread-list-backtrace--insert-header): Use thread-live-p instead of
thread-alive-p.
Gemini Lasswell [Wed, 5 Sep 2018 23:55:45 +0000 (16:55 -0700)]
Improve documentation of thread list buffer
* doc/lispref/threads.texi (The Thread List): Cross-reference
'Basic Thread Functions'. Use defvar for thread-list-refresh-seconds.
Improve descriptions of the backtrace and signal commands.
Gemini Lasswell [Sun, 12 Aug 2018 02:19:23 +0000 (19:19 -0700)]
Add tests for list-threads and the *Threads* buffer
* test/lisp/thread-tests.el: New file.
Gemini Lasswell [Thu, 23 Aug 2018 19:19:04 +0000 (12:19 -0700)]
Add check in list-threads for --without-threads configuration
* lisp/thread.el (list-threads): Signal an error if the Emacs configuration
doesn't have threads.
Gemini Lasswell [Tue, 14 Aug 2018 18:08:28 +0000 (11:08 -0700)]
Document list-threads and its buffer
* doc/lispref/threads.texi (Threads): Add menu item.
(The Thread List): New node.
* doc/lispref/elisp.texi (Top): Add menu item.
Gemini Lasswell [Thu, 9 Aug 2018 21:21:57 +0000 (14:21 -0700)]
Show backtraces of threads from thread list buffer
* src/eval.c (backtrace_thread_p, backtrace_thread_top)
(backtrace_thread_next, Fbacktrace_frames_from_thread): New functions.
* lisp/thread.el (thread-list-mode-map): Add keybinding and
menu item for 'thread-list-pop-to-backtrace'.
(thread-list-mode): Make "Thread Name" column wide enough
for the result of printing a thread with no name with 'prin1'.
(thread-list--get-entries): Use 'thread-list--name'.
(thread-list--send-signal): Remove unnecessary calls to 'threadp'.
(thread-list-backtrace--thread): New variable.
(thread-list-pop-to-backtrace): New command.
(thread-list-backtrace--revert-hook-function)
(thread-list--make-backtrace-frame)
(thread-list-backtrace--insert-header, thread-list--name): New
functions.
Gemini Lasswell [Tue, 14 Aug 2018 18:06:04 +0000 (11:06 -0700)]
Make small fixes to Edebug and debugger documentation
* doc/lispref/elisp.texi (Top): Update menu.
* doc/lispref/edebug.texi (Edebug Misc): Index
edebug-backtrace-show-instrumentation and
edebug-backtrace-hide-instrumentation.
Gemini Lasswell [Mon, 13 Aug 2018 22:45:11 +0000 (15:45 -0700)]
Make list-threads refresh the *Threads* buffer if it already exists
* lisp/thread.el (list-threads): Call revert-buffer instead of waiting
for the timer function to do it.
Gemini Lasswell [Wed, 1 Aug 2018 16:25:28 +0000 (09:25 -0700)]
Improve docstrings of thread-list functions
* lisp/thread.el (thread-list--timer-func): Change
argument from 'buf' to 'buffer'.
(thread-list--get-entries, thread-list--get-status): Improve
docstring.
(thread-list--send-signal): Change argument from 'sgnl' to
'signal'. Tell the user when the thread is no longer alive.
Gemini Lasswell [Wed, 1 Aug 2018 16:22:32 +0000 (09:22 -0700)]
Make lisp/thread.el the new home for thread-related Lisp functions
* lisp/emacs-lisp/thread-list.el: Remove.
* lisp/emacs-lisp/thread.el: Remove.
* lisp/thread.el: New file.
Gemini Lasswell [Sat, 28 Jul 2018 22:18:49 +0000 (15:18 -0700)]
Add list-threads command and thread-list-mode
* lisp/emacs-lisp/thread-list.el: New file.
Eli Zaretskii [Sat, 8 Sep 2018 09:20:55 +0000 (12:20 +0300)]
Fix documentation for conversion to bignums
* src/xselect.c (selection_data_to_lisp_data):
* src/w32fns.c (Fw32_read_registry):
* src/process.c (Fprocess_id):
* src/font.c (Ffont_variation_glyphs, Finternal_char_font):
* src/fns.c (Fsafe_length):
* src/editfns.c (Fuser_uid, Fuser_real_uid, Fgroup_gid)
(Fgroup_real_gid, Femacs_pid):
* src/dired.c (Ffile_attributes):
* src/charset.c (Fencode_char): Update commentary and doc
strings for recent changes that produce bignums where
previously cons cells of integers were produced.
Paul Eggert [Fri, 7 Sep 2018 18:16:45 +0000 (11:16 -0700)]
* src/puresize.h (BASE_PURESIZE): Bump to
2000000.
Needed on Fedora 28 x86.
Paul Eggert [Fri, 7 Sep 2018 16:50:19 +0000 (09:50 -0700)]
One more GC-aligned struct
* src/lisp.h (struct Lisp_Sub_Char_Table):
Mark this with GCALIGNED_STRUCT, too.
Paul Eggert [Fri, 7 Sep 2018 16:17:25 +0000 (09:17 -0700)]
Fix overenthusiastic header size check
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00222.html
* doc/lispref/internals.texi (Garbage Collection):
Document vector sizes and slot counts more accurately.
* src/lisp.h: Omit header_size sanity check that was too picky.
Add some less-picky checks.
Eli Zaretskii [Fri, 7 Sep 2018 14:41:21 +0000 (17:41 +0300)]
Read Windows OS info for report-emacs-bug from Registry
* lisp/w32-fns.el (w32--os-description): New function.
* lisp/mail/emacsbug.el (report-emacs-bug--os-description):
Use 'w32--os-description' instead of launching the
'systeminfo' program, which can be very slow, and is also
missing on versions of Windows before XP Professional.
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.
Paul Eggert [Fri, 7 Sep 2018 02:17:14 +0000 (19:17 -0700)]
Shrink pseudovectors a bit
sizeof (struct Lisp_Marker) was 32 on x86, where 24 would do.
Problem noted by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00165.html
* src/bignum.h (struct Lisp_Bignum):
* src/frame.h (struct frame):
* src/lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
(struct Lisp_Char_Table, struct Lisp_Hash_Table)
(struct Lisp_Marker, struct Lisp_Overlay)
(struct Lisp_Misc_Ptr, struct Lisp_User_Ptr)
(struct Lisp_Finalizer, struct Lisp_Float)
(struct Lisp_Module_Function):
* src/process.h (struct Lisp_Process):
* src/termhooks.h (struct terminal):
* src/thread.h (struct thread_state, struct Lisp_Mutex)
(struct Lisp_CondVar):
* src/window.c (struct save_window_data):
* src/window.h (struct window):
* src/xterm.h (struct scroll_bar):
* src/xwidget.h (struct xwidget, struct xwidget_view):
Add GCALIGNED_STRUCT attribute.
* src/lisp.h (GCALIGNED_UNION_MEMBER): Renamed from GCALIGNED_UNION.
All uses changed.
(GCALIGNED_STRUCT_MEMBER, GCALIGNED_STRUCT, GCALIGNED): New macros.
All uses of open-coded GCALIGNED changed to use GCALIGNED.
(union vectorlike_header): No longer GC-aligned.
(PSEUDOVECSIZE): Yield 0 for pseudovectors without Lisp
objects that place a member before where the first Lisp object
member would be.
YAMAMOTO Mitsuharu [Thu, 6 Sep 2018 23:35:36 +0000 (08:35 +0900)]
* src/process.c (connect_network_socket): Fix memory leak. (Bug#32604)
Michael Albinus [Thu, 6 Sep 2018 10:16:00 +0000 (12:16 +0200)]
Fix Bug#31704
* lisp/eshell/esh-proc.el (eshell-gather-process-output): Do not
let `expand-file-name' prefix remote file names with MS Windows
volume letter.
* lisp/net/tramp.el (tramp-eshell-directory-change):
Use `path-separator' as it does eshell. (Bug#31704)
Michael Albinus [Thu, 6 Sep 2018 08:12:02 +0000 (10:12 +0200)]
* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file): Extend test.
Paul Eggert [Wed, 5 Sep 2018 23:19:47 +0000 (16:19 -0700)]
Fix timer.el minor rounding error
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Fix rounding error by using integers rather than floats.
* test/lisp/emacs-lisp/timer-tests.el (timer-test-multiple-of-time):
New test.
Glenn Morris [Wed, 5 Sep 2018 20:37:56 +0000 (16:37 -0400)]
* 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."
Stephen Gildea [Mon, 3 Sep 2018 00:06:29 +0000 (17:06 -0700)]
Do not call mh-next-msg from mh-junk-process-* fns
* mh-junk.el (mh-junk-process-blacklist, mh-junk-process-whitelist): Do
not call mh-next-msg. Now that these functions are called from
mh-execute-commands, they should not change the current message pointer.
The calls to mh-next-msg are probably left over from when blacklist and
whitelist message processing was done immediately.
Paul Eggert [Wed, 5 Sep 2018 07:21:02 +0000 (00:21 -0700)]
Improve (round FIXNUM FIXNUM) performance
* src/floatfns.c (rounding_driver):
New arg fixnum_divide. All callers changed.
(ceiling2, floor2, truncate2, round2): New functions.
Not that new, actually; these are essentially taken from Emacs 26.
(Fceiling, Ffloor, Fround, Ftruncate): Use them.
Paul Eggert [Wed, 5 Sep 2018 02:14:01 +0000 (19:14 -0700)]
Fix format-time-string bignum bug
The problem can occur on 32-bit platforms with current timestamps.
* src/editfns.c (disassemble_lisp_time, decode_time_components):
Support seconds counts that are bignums.
* test/src/editfns-tests.el (editfns-tests--have-leap-seconds):
New function.
(format-time-string-with-bignum-on-32-bit): New test.
Paul Eggert [Wed, 5 Sep 2018 02:14:01 +0000 (19:14 -0700)]
Simplify bignum->intmax conversion
* src/lisp.h (integer_to_intmax, integer_to_uintmax): New functions.
* src/data.c (cons_to_unsigned, cons_to_signed)
(arith_driver):
* src/dbusbind.c (xd_extract_signed, xd_extract_unsigned):
* src/dispnew.c (sit_for):
* src/editfns.c (styled_format):
* src/emacs-module.c (module_extract_integer):
* src/fileio.c (file_offset):
* src/font.c (font_unparse_xlfd, Fopen_font):
* src/xdisp.c (calc_line_height_property):
* src/process.c (handle_child_signal):
Federico Tedin [Sat, 1 Sep 2018 21:46:16 +0000 (18:46 -0300)]
Add variable vc-git-grep-template
* lisp/vc/vc-git.el (vc-git-grep-template): New variable, allows
changing the default arguments passed to git-grep when using
'vc-git-grep'.
* etc/NEWS: Mention 'vc-git-grep-template'. (Bug#32549)
Noam Postavsky [Sun, 2 Sep 2018 22:56:38 +0000 (18:56 -0400)]
Handle non-error signals in emacsclient --eval (Bug#10989)
* lisp/server.el (server-process-filter): Handle any signal, not just
errors.
Noam Postavsky [Fri, 10 Aug 2018 01:26:30 +0000 (21:26 -0400)]
Allow t as a catch-all condition-case handler (Bug#24618)
* src/eval.c (find_handler_clause): Accept a handler of t as always
matching.
(Fcondition_case):
* doc/lispref/control.texi (Handling Errors): Document this.
* etc/NEWS: Announce it.
Paul Eggert [Tue, 4 Sep 2018 18:49:41 +0000 (11:49 -0700)]
Fix (round FLOAT BIGNUM) bug
* src/floatfns.c (rounding_driver): Fix bug when one
argument is a float and the other is a bignum.
* test/src/floatfns-tests.el (bignum-round): Test for the bug.
Paul Eggert [Tue, 4 Sep 2018 17:24:51 +0000 (10:24 -0700)]
Tweak nthcdr for bignum efficiency
* src/fns.c (Fnthcdr): Use mpz_tdiv_ui and mpz_tdiv_r
instead of mpz_mod_ui and mpz_mod, as they are more efficient.
Suggested by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00073.html
Paul Eggert [Tue, 4 Sep 2018 16:30:57 +0000 (09:30 -0700)]
Fix bignum initialization
Problem reported by Andy Moreton in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00072.html
and crystal-ball diagnosis by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00075.html
* src/alloc.c (xrealloc_for_gmp, xfree_for_gmp): Move to bignum.c.
(init_alloc): Move bignum initialization to init_bignum.
* src/bignum.c (init_bignum): Rename from init_bignum_once.
All users changed.
* src/emacs.c (main): Call init_bignum after init_alloc,
instead of calling init_bignum_once after init_bignum.
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)
Martin Rudalics [Tue, 4 Sep 2018 06:53:49 +0000 (08:53 +0200)]
Don't call XGetGeometry for frames without outer X window (Bug#32615)
* src/xfns.c (frame_geometry): Don't call XGetGeometry when
FRAME has no outer X window; return nil instead. (Bug#32615)
Paul Eggert [Tue, 4 Sep 2018 01:37:40 +0000 (18:37 -0700)]
Speed up (+ 2 2) by a factor of 10
Improve arithmetic performance by avoiding bignums until needed.
Also, simplify bignum memory management, fixing some unlikely leaks.
This patch improved the performance of (+ 2 2) by a factor of ten
on a simple microbenchmark computing (+ x 2), byte-compiled,
with x a local variable initialized to 2 via means the byte
compiler could not predict: performance improved from 135 to 13 ns.
The platform was Fedora 28 x86-64, AMD Phenom II X4 910e.
Performance also improved 0.6% on ‘make compile-always’.
* src/bignum.c (init_bignum_once): New function.
* src/emacs.c (main): Use it.
* src/bignum.c (mpz): New global var.
(make_integer_mpz): Rename from make_integer. All uses changed.
* src/bignum.c (double_to_bignum, make_bignum_bits)
(make_bignum, make_bigint, make_biguint, make_integer_mpz):
* src/data.c (bignum_arith_driver, Frem, Flogcount, Fash)
(expt_integer, Fadd1, Fsub1, Flognot):
* src/floatfns.c (Fabs, rounding_driver, rounddiv_q):
* src/fns.c (Fnthcdr):
Use mpz rather than mpz_initting and mpz_clearing private
temporaries.
* src/bignum.h (bignum_integer): New function.
* src/data.c (Frem, Fmod, Fash, expt_integer):
* src/floatfns.c (rounding_driver):
Use it to simplify code.
* src/data.c (FIXNUMS_FIT_IN_LONG, free_mpz_value):
Remove. All uses removed.
(floating_point_op): New function.
(floatop_arith_driver): New function, with much of the guts
of the old float_arith_driver.
(float_arith_driver): Use it.
(floatop_arith_driver, arith_driver):
Simplify by assuming NARGS is at least 2.
All callers changed.
(float_arith_driver):
New arg, containing the partly converted value of the next arg.
Reorder args for consistency. All uses changed.
(bignum_arith_driver): New function.
(arith_driver): Use it. Do fixnum-only integer calculations
in intmax_t instead of mpz_t, when they fit.
Break out mpz_t calculations into bignum_arith_driver.
(Fquo): Use floatop_arith_driver instead of float_arith_driver,
since the op is known to be valid.
(Flogcount, Fash): Simplify by coalescing bignum and fixnum code.
(Fadd1, Fsub1): Simplify by using make_int.