1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

134408 commits

Author SHA1 Message Date
Paul Eggert
a381285617 Improve rounding in recent timer fix
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Use more-precise arithmetic to handle some boundary cases better
when rounding errors occur (Bug#33071).
* test/lisp/emacs-lisp/timer-tests.el:
(timer-next-integral-multiple-of-time-3):
New test, to test one of the boundary cases.
(timer-next-integral-multiple-of-time-2):
Redo so as to not assume a particular way of rounding 0.01.
2018-10-22 19:34:49 -07:00
Paul Eggert
8602bd8559 Fix epg bug with (TICKS . HZ) timestamp
Problem reported by Joseph Mingrone in:
https://lists.gnu.org/r/emacs-devel/2018-10/msg00380.html
* lisp/epg.el (epg--time-from-seconds): Just use a seconds count;
don’t generate an obsolete-format timestamp.
2018-10-22 11:00:15 -07:00
Stefan Monnier
7d5919e5e7 * src/minibuf.c (read_minibuf_noninteractive): Remove unused args. 2018-10-22 09:50:08 -04:00
Michael Albinus
1d2b386ec4 Improve Tramp backward compatibility
* lisp/net/tramp-compat.el: (tramp-unload-file-name-handlers):
Declare it, for backward compatibility.
2018-10-22 09:05:48 +02:00
Glenn Morris
969b561972 ; Auto-commit of loaddefs files. 2018-10-21 17:40:13 -04:00
Stefan Monnier
08192e4009 Always define 'define-fringe-bitmap'
* lisp/cus-start.el: Test 'fringe-bitmaps' to see if fringe.c was compiled.

* lisp/fringe.el: Use lexical-binding.
(define-fringe-bitmap): Provide a fallback implementation.

* lisp/progmodes/flymake.el (flymake-double-exclamation-mark):
Define unconditionally.

* lisp/progmodes/gdb-mi.el (define-fringe-bitmap): Don't declare any more.
(breakpoint, hollow-right-triangle): Define unconditionally.
2018-10-21 14:36:10 -04:00
Stefan Monnier
17252062b0 * lisp/vc/diff-mode.el: Improve diff-font-lock-prettify
A few tweaks to the previous code for corner case problems, and a new
feature, which is to move the +/- signs to the left fringe.

(diff--font-lock-cleanup, diff--filter-substring): New functions.
(diff-mode): Use them.
(diff--font-lock-refined): Mark the overall overlays as `diff-mode
fine` as well, so they get properly cleaned up when changing mode.
(diff-fringe-add, diff-fringe-del, diff-fringe-rep, diff-fringe-nul):
New bitmaps.
(diff--font-lock-prettify): Move the +/- signs to the fringe.
(diff-wiggle): Use 'user-error'.
2018-10-21 11:05:49 -04:00
Michael Albinus
67d3b40e0c Expand host names in Tramp's ad-hoc multi-hop file names
* doc/misc/tramp.texi (Quick Start Guide): Improve wording.
(Change file name syntax): Say, that `tramp-file-name-regexp' is
not constant.
(Ad-hoc multi-hops): Explain host name expansion.

* etc/NEWS: Mention that host names in Tramp ad-hoc multi-hop file
names must match the previous hop for methods like "su" or "sudo".
Fix typos.

* lisp/net/tramp.el (tramp-find-method, tramp-find-user):
Adapt docstring.
(tramp-find-host): Mark default value.
(tramp-dissect-file-name): Expand host name for hops.
(tramp-dissect-hop-name, tramp-make-tramp-hop-name): New defuns.
(tramp-clear-passwd): Simplify.

* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test26-file-name-completion): Extend tests.
2018-10-20 13:38:31 +02:00
Eli Zaretskii
efb214622a Fix 'timer-next-integral-multiple-of-time'
* lisp/emacs-lisp/timer.el
(timer-next-integral-multiple-of-time): Fix recent change for
fractional values of SECS.  (Bug#33071)
* test/lisp/emacs-lisp/timer-tests.el
(timer-next-integral-multiple-of-time-2): New test.
2018-10-20 12:52:52 +03:00
Stefan Monnier
d684f5d5bc * lisp/mail/smtpmail.el: (smtpmail-send-queued-mail): Avoid 'load'
(smtpmail-send-it): Send metadata directly to the
files without bothering to write it into a temp buffer.
2018-10-19 22:31:35 -04:00
Stefan Monnier
32e411943d * emacs-lisp/package.el (package-get-version): Change into a function
(package-quickstart-refresh): Mangle string so it doesn't turn into
a false positive for "no-byte-compile: t".
2018-10-19 18:10:42 -04:00
Alan Mackenzie
7cfe2dc415 In edebug in GUIs, move focus to the selected frame.
Thus when entering edebug, the focus will be moved to the frame with the
source being debugged, and when its finished, the focus will move back.
Commands edebug-visit-eval-list (`E') and edebug-bounce-point (`p') have been
likewise amended.

* src/keyboard.c (readable_events): Handle FOCUS_OUT_EVENT as an invisible
event.  This prevents input-pending-p returning t when one of these events
arrives, and thus obviates an instant termination of sit-for when there's no
"real" event waiting.

* lisp/emacs-lisp/edebug.el (edebug-focus-frame): New function.
(edebug-default-enter, edebug--display-1, edbug-where, edebug-bounce-point)
(edebug-visit-eval-list): Call edebug-focus-frame to move focus into the
window newly selected by edebug-pop-to-buffer.
2018-10-19 17:44:31 +00:00
Paul Eggert
d2a07b9a82 Fix struct thread alignment on FreeBSD x86
Problem reported by Joseph Mingrone in:
https://lists.gnu.org/r/emacs-devel/2018-10/msg00238.html
While we’re at it, apply a similar fix to struct Lisp_Subr; this
removes the need for GCALIGNED_STRUCT_MEMBER and thus can shrink
struct Lisp_Subr a bit.
* configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Bring back this macro.
Although used only for performance (not to actually align
structures), we might as well take advantage of it.
* src/lisp.h (GCALIGNED_STRUCT_MEMBER): Remove; all uses removed.
(union Aligned_Lisp_Subr): New type, like struct Lisp_Subr but aligned.
* src/lisp.h (XSUBR, DEFUN):
* src/lread.c (defsubr): Use it.  All callers changed.
* src/thread.c (union aligned_thread_state): New type.
(main_thread): Now of this type, so it’s aligned.
All uses changed.
* src/xmenu.c (syms_of_xmenu) [USE_GTK || USE_X_TOOLKIT]:
Adjust to union Aligned_Lisp_Subr change.
2018-10-19 09:26:50 -07:00
Eli Zaretskii
fc3f937055 ; * etc/NEWS (value): Fix punctuation of a recently added entry. 2018-10-19 16:55:17 +03:00
Alan Mackenzie
487931cd06 In follow mode windows in a GUI, don't display inactive cursors
This is done by setting cursor-in-non-selected-windows buffer locally.

* lisp/follow.el (follow-hide-ghost-cursors): New customizable option.
(follow-mode): Create and set, or kill buffer-local copy of
cursor-in-non-selected-windows when the mode gets enabled or disabled.
(follow-prev-buffer): New variable.
(follow-adjust-window): Manipulate cursor-in-non-selected-windows when the
current buffer changes, to ensure that cursors stay visible in non-selected
follow window groups.

* etc/NEWS: Add an entry for this change.
2018-10-19 09:54:31 +00:00
Martin Rudalics
2510126388 Have 'split-window' handle 'up' and 'down' values (Bug#32790)
* lisp/window.el (split-window): Handle values of 'up' and 'down'
for SIDE argument (Bug#32790).
(window-in-direction): Amend doc-string as of yesterday's change.
2018-10-19 08:51:03 +02:00
Juri Linkov
7aaf9d8a7d * lisp/emacs-lisp/lisp.el (delete-pair): Add optional prefix arg.
(Bug#32896)
2018-10-19 02:09:15 +03:00
Juri Linkov
e37825fe2a Use buffer objects for non-writable states in window-state-get.
* lisp/window.el (window--state-get-1): Use buffer objects for
buffer, next-buffers, prev-buffers if 'writable' is nil.  (Bug#32850)
2018-10-19 02:01:54 +03:00
Stefan Monnier
f35916ce51 * lisp/emacs-lisp/package.el (package-get-version): New macro 2018-10-18 12:17:52 -04:00
Martin Rudalics
46106eec16 Have 'window-in-direction' handle 'up' and 'down' values (Bug#32790)
* lisp/window.el (window-in-direction): Handle values of 'up'
and 'down' for DIRECTION argument (Bug#32790).  Suggested by
Juri Linkov <juri@linkov.net>.
* lisp/windmove.el (windmove-find-other-window): Don't convert
first argument of 'window-in-direction'.
2018-10-18 09:11:30 +02:00
Paul Eggert
e511b9dd6a Bring back nocombreloc if dumping
Without this patch, Emacs dumps core on Fedora 28 x86-64
when configured via "CC='gcc -m32' --enable-gcc-warnings
--without-imagemagick --without-gif --with-modules
PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig".
and then when run normally in a windowing system.
'make check' and 'emacs -nw' work OK even without the patch.
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Prepend
-znocombreloc if supported and if dumping.  This mostly
reverts 2018-06-15T21:37:39!eggert@cs.ucla.edu "Remove old
combreloc hack".
2018-10-17 17:57:45 -07:00
Eli Zaretskii
7356743232 Avoid assertion violation when comparing with main-thread
* src/thread.c (unmark_main_thread): New function.
* src/lisp.h (unmark_main_thread): Prototype it.
* src/alloc.c (garbage_collect_1): Call it after sweeping.
(Bug#33073)

* test/src/thread-tests.el (threads-test-bug33073): New test.
2018-10-17 18:19:47 +03:00
Federico Tedin
134ba45bf0 Allow two mouse functions to work with Rectangle Mark mode
* lisp/mouse.el (mouse-save-then-kill): Make
mouse-save-then-kill work with rectangular regions, including
when mouse-drag-copy-region is set to t. (Bug#31240)
(mouse-drag-and-drop-region): Allow dragging and dropping
rectangular regions. (Bug#31240)
* rect.el (rectangle-intersect-p)
(rectangle-position-as-coordinates): New functions.
2018-10-17 08:34:51 +02:00
Juri Linkov
e64065bbbd Use next-buffers and prev-buffers in window-state-get and window-state-put
* lisp/window.el (window--state-get-1): Get next-buffers and prev-buffers.
(window--state-put-2): Set next-buffers and prev-buffers.  (Bug#32850)
2018-10-17 01:36:33 +03:00
Michael Albinus
84efc93a55 Fix Bug#32983
* lisp/net/soap-client.el: Bump version to 3.1.5.
(soap-parse-server-response): Handle also "multipart/related"
Content-Type.  (Bug#32983)
2018-10-16 19:44:16 +02:00
Glenn Morris
722833d30e Merge from origin/emacs-26
73babba (origin/emacs-26) Clarify documentation of fractional vertica...
b20c51d * lisp/isearch.el (isearch-cmds): Recall absent isearch--stat...
700acbd doc/lispref/edebug.texi (Specification List) Remove obstrusiv...
1902450 Fix wording in module API documentation
e724a8f Fix redisplay of glyphless characters
8fc892d Update --without-toolkit-scroll-bars doc
80e0bfa Call GTK functions only on GTK scrollbars
91c4c46 Update the description of startup in ELisp manual
18b42c6 Use the 'line-number' face for line-number fields past EOB
a6ab8db Ensure NS frame is redrawn correctly  after scroll

Conflicts:
	lisp/isearch.el
2018-10-16 08:08:04 -07:00
Michael Albinus
76a6417baf Add process thread to list-processes
* lisp/simple.el (process-menu-mode, list-processes--refresh):
Add process thread.
2018-10-16 15:58:45 +02:00
Stefan Monnier
e07ced013c * doc/lispref/display.texi (Fringe Bitmaps): Remove redundant items 2018-10-15 22:44:37 -04:00
Stefan Monnier
6716eb24cf * lisp/image-mode.el (image-toggle-display-image): Avoid string-make-unibyte 2018-10-15 22:31:54 -04:00
Stefan Monnier
d9d5b2b7af * lisp/progmodes/octave.el: Register on auto-mode-alist
(octave-maybe-mode): New function.
2018-10-15 21:24:14 -04:00
Stefan Monnier
5a4bfbbd45 * etc/NEWS.18: Tweak header to be more like the others 2018-10-15 20:16:28 -04:00
Juri Linkov
987956ae24 * lisp/image-mode.el (image--imagemagick-wanted-p): Check for file extension.
(Bug#32994)
(image-toggle-display-text): Let-bind create-lockfiles to nil
like in image-toggle-display-image.
2018-10-16 01:30:56 +03:00
Stefan Monnier
96df6043bd * lisp/textmodes/tex-mode.el (tex-uptodate-p): Recognize [N.N] pages 2018-10-15 16:30:52 -04:00
Alan Mackenzie
1439d89f4d In follow mode, prevent the cursor resting on a partially displayed line
This fixes bug #32848

* lisp/follow.el (follow-adjust-window): If point ends up in a partially
displayed line in a left hand or middle window, move it one line forward, to
prevent unwanted scrolling should make-cursor-line-fully-visible be non-nil.
2018-10-15 19:48:25 +00:00
Alan Mackenzie
73babba26a Clarify documentation of fractional vertical scrolling and some doc strings
* doc/lispref/windows.texi (vertical scrolling): Clarify the meaning of
vertical scrolling by referring to tall screen lines, images, and the display
action.  Clarify an ambiguous English tense.

* src/window.c (window-vscroll, set-window-vscroll): Amend doc strings to
refer to display.
2018-10-15 19:04:05 +00:00
Charles A. Roelli
b20c51d62f * lisp/isearch.el (isearch-cmds): Recall absent isearch--state slot. 2018-10-15 19:51:47 +02:00
Paul Eggert
3d91dc1bb5 Update lib/regex from glibc via Gnulib
This syncs recent refactorings from glibc, and incorporates:
2018-10-15 libc-config: merge from glibc
2018-10-15 regex: depend on libc-config
* .gitignore: Do not ignore m4/_*.m4.
* lib/cdefs.h: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/libc-config.h, m4/__inline.m4: New files, copied from Gnulib.
* lib/regcomp.c, lib/regex.c, lib/regex_internal.c:
* lib/regex_internal.h, lib/regexec.c:
Copy from glibc via Gnulib.
2018-10-15 00:57:57 -05:00
Paul Eggert
6b8fd34c4a Update from Gnulib
This is minor refactoring that should not affect Emacs builds.
It incorporates:
2018-10-12 Make better use of Autoconf
* m4/environ.m4, m4/fsusage.m4, m4/manywarnings.m4, m4/socklen.m4:
Copy from Gnulib.
2018-10-14 22:12:46 -05:00
Alan Mackenzie
aba7910e36 Add ~44 edebug specs to CC Mode.
* lisp/progmodes/cc-cmds.el, lisp/progmodes/cc-defs.el
lisp/progmodes/cc-engine.el, lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el: Add lots of edebug specs.

* lisp/progmodes/cc-engine.el (c-state-maybe-marker): Tidy up so as to
evaluate an argument only once at runtime.
2018-10-15 00:45:24 +00:00
Stefan Monnier
8c68e4afa8 * src/buffer.c (Fmove_overlay): Don't call Fdelete_overlay
... because the data structure is not in a consistent state.

* test/src/buffer-tests.el (overlay-evaporation-after-killed-buffer):
New test.
2018-10-14 16:44:21 -04:00
Alan Mackenzie
700acbd991 doc/lispref/edebug.texi (Specification List) Remove obstrusive blank line 2018-10-14 18:22:23 +00:00
Paul Eggert
f1ea2b9e6b Fix lisp_eval_depth in unwind-protect cleanup
Problem reported by Paul Pogonyshev (Bug#33034).
* src/lisp.h (union specbinding): New member unwind.eval_depth.
* src/eval.c (record_unwind_protect, set_unwind_protect): Set it.
(do_one_unbind): Use it.
2018-10-14 09:54:58 -07:00
Eli Zaretskii
190245035f Fix wording in module API documentation
* doc/lispref/internals.texi (Module Functions): Fix confusing
wording.  Reported by Basil L. Contovounesios <contovob@tcd.ie>.
2018-10-14 19:12:49 +03:00
Eli Zaretskii
e724a8f669 Fix redisplay of glyphless characters
* src/conf_post.h (bool_bf): Use 'unsigned int' in the MinGW
builds.  Suggested by Tom Tromey <tom@tromey.com>.  (Bug#33017)
* src/dispnew.c (scrolling_window): Update commentary
regarding xwidget builds.
2018-10-13 19:47:01 +03:00
OGAWA Hirofumi
f3c13bb38e Fix sieve-mode font lock
* lisp/net/sieve-mode.el (sieve-font-lock-keywords): Fix the
definition of font-lock faces.  (Bug#32881)
2018-10-13 12:14:52 +03:00
Robert Pluim
8fc892df37 Update --without-toolkit-scroll-bars doc
* configure.ac (--without-toolkit-scroll-bars): Update list of
affected toolkits.
2018-10-13 10:53:30 +02:00
OGAWA Hirofumi
4824d37041 Fix sieve-upload when sieve-buffer is nil
* lisp/net/sieve.el (sieve-upload): Don't rely on sieve-buffer being
non-nil.  (Bug#32880)

Copyright-paperwork-exempt: yes
2018-10-13 11:51:06 +03:00
Robert Pluim
80e0bfa96d Call GTK functions only on GTK scrollbars
* src/gtkutil.c (xg_set_background_color) [USE_TOOLKIT_SCROLL_BARS]:
Don't call GTK functions on non-GTK scrollbars (Bug#32975).
2018-10-13 10:44:37 +02:00
Eli Zaretskii
91c4c46fd5 Update the description of startup in ELisp manual
* doc/lispref/os.texi (Startup Summary): Remove stale
reference to window-system-initialization-alist.  Reported by
Zhang Haijun <ccsmile2008@outlook.com>.
2018-10-13 11:36:04 +03:00
Eli Zaretskii
95f69e7db2 Improve 'json-insert' so it doesn't cons a string from JSON
* src/json.c (struct json_buffer_and_size): New member
inserted_bytes.
(json_insert): Instead of creating a string and inserting it
into the current buffer, copy the unibyte text into the gap.
(struct json_insert_data): New member inserted_bytes.
(json_insert_callback): Update commentary.  Pass the
inserted_bytes value to json_insert and on its return copy the
updated value back into DATA.
(Fjson_insert): Decode the unibyte text inserted into the gap.
Call before-change-functions and after-change-functions only
once, before and after processing the insertion of the entire
JSON representation.

* test/src/json-tests.el (json-insert/throw): Adapt to the
modified implementation of json-insert: it no longer calls the
modification hooks once for each inserted chunk of JSON
representation.
2018-10-13 10:13:10 +03:00