1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00
Commit graph

40495 commits

Author SHA1 Message Date
Jonathan Kyle Mitchell
9f25231f35 Avoid infloop in redisplay due to faulty mode-line properties
* xdisp.c (safe_set_text_properties): New function.
(display_mode_element): Call Fset_text_properties through
internal_condition_case_n, using safe_set_text_properties as a
wrapper.  (Bug#32038)
2018-07-14 14:26:04 +03:00
Glenn Morris
cda7e1850f Merge from origin/emacs-26
17ebb6e (origin/emacs-26) Use consistent function names in thread-tes...
1c86229 Fix format error in Faccept_process_output
b38b91a Lessen stack consumption in recursive read1
3eb4603 Match w32 paths in grep sans --null hits (Bug#32051)
5cc7c4b Fix previous make-network-process change
d6a1b69 Another documentation improvement in flyspell.el
9b49a8e Improve documentation of Flyspell
3744fda Provide feature 'threads
ef9025f Save the server alias on reconnect (Bug#29657)
db3874b Refer to "proper lists" instead of "true lists"
35e0305 Avoid turning on the global-minor-mode recursively
51bf4e4 Fix Bug#32085
2018-07-13 09:28:15 -07:00
Michael Albinus
1c862297e4 Fix format error in Faccept_process_output
* src/process.c (Faccept_process_output): Do not use format spec
"%p", it isn't valid for error().
2018-07-13 14:27:33 +02:00
Paul Eggert
b38b91a834 Lessen stack consumption in recursive read1
* src/lread.c (read1): Shrink local buffer size from
MAX_ALLOCA to 128 (Bug#31995).
2018-07-12 20:23:47 -07:00
Noam Postavsky
5cc7c4b48a Fix previous make-network-process change
* src/process.c (Fmake_network_process): On 2018-07-09 "Explicitly
reject :server and :nowait (Bug#31903)", the sense of the SERVER check
was accidentally reversed so that we ended up looking for the wrong
ADDRESS.  Reported by T.V Raman in
<https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00437.html>.
2018-07-12 19:43:00 -04:00
Michael Albinus
3744fda5fa Provide feature 'threads
* src/thread.c (syms_of_threads): Provide feature "threads".

* test/src/thread-tests.el (top): Declare the functions.
(all): Use (featurep 'threads) check.
2018-07-12 10:49:06 +02:00
Noam Postavsky
6b8349a902 Merge from emacs-26
db3f779780 ; Test for Bug#32014
90d95b000c Explicitly reject :server and :nowait (Bug#31903)
917158f8c9 Fix Bug#32090

# Conflicts:
#	src/process.c
2018-07-09 20:06:27 -04:00
Noam Postavsky
7bcb697e19 Merge from emacs-26
65889a6d12 Fix bootstrap infloop in GNU/Linux alpha
48efd1c98b Minor fix of a recent documentation change
3302b7cd7f Mention the NSM in the gnutls variable doc strings
40c2ce743b Remove test code from last commit
e02d8e29c6 Fix Bug#32084
da5d6dbe39 Fix (length NON-SEQUENCE) documentation
2018-07-09 20:03:30 -04:00
Noam Postavsky
90d95b000c Explicitly reject :server and :nowait (Bug#31903)
* src/process.c (Fmake_network_process): Explicitly check for and
signal an error when passed both :server and :nowait non-nil.  In
Emacs 25, :nowait would be ignored in this case, but as of Emacs 26.1
this gives an error, albeit an unclear one.  Also remove obsolete
comment regarding configurations lacking non-blocking mode, the
corresponding code was removed in 2012-11-17 "Assume POSIX 1003.1-1988
or later for fcntl.h."
2018-07-09 19:39:03 -04:00
Paul Eggert
65889a6d12 Fix bootstrap infloop in GNU/Linux alpha
* src/emacs.c (main): Do not re-exec if EMACS_HEAP_EXEC
is already set (Bug#32083).
2018-07-08 09:04:51 -07:00
Eli Zaretskii
9c985a3d7a Minor improvements in recent NSM documentation changes
* doc/emacs/misc.texi (Network Security): Improve wording and
markup of last change.

* src/gnutls.c (Fgnutls_peer_status): Doc fix.

* etc/NEWS: Improve wording of last change.
2018-07-08 17:46:32 +03:00
Lars Ingebrigtsen
f9649f0e14 NSM-related doc fixes
* src/gnutls.c (Fgnutls_peer_status): Mention :certificates in the
doc string.

* etc/NEWS: Mention how to switch off the additional TLS checks.
2018-07-08 13:30:08 +02:00
Glenn Morris
d3e0fdc24f Merge from origin/emacs-26
a427de9 (origin/emacs-26) Fix bug #11732
3a04e15 Improve documentation of 'emacs-lock-mode'
9d6ca5a * lisp/imenu.el (imenu-generic-expression): Doc fix.  (Bug#32...
fdd7e7d Improve indexing of 'eval-defun' in ELisp manual
10af989 Fix (length CIRCULAR) documentation
271d1f7 Tramp editorials
4abf94f Clarify and improve doc strings of 'eval-last-sexp' and friends
6cfc7a7 Automate upload of Emacs manuals to gnu.org
b73cde5 Fix MH-E mail composition with GNU Mailutils (SF#485)
0dce5e5 Speed up 'replace-buffer-contents' some more
00fdce0 * doc/emacs/docstyle.texi: Avoid messing up the html output.

Conflicts:
	admin/make-tarball.txt
2018-07-07 09:27:44 -07:00
Eli Zaretskii
a427de9c86 Fix bug #11732
* src/w32fns.c (w32_wnd_proc): Fix handling of Windows input
methods.  (Bug#11732)
2018-07-07 14:30:00 +03:00
John Shahid
ea2f96837d Keep interactive uses of 'recenter' backward compatible (Bug#31325)
* window.c (Frecenter): Change the interactive spec to always pass
a non-nil value to the REDISPLAY argument when called interactively.
* window.el (recenter-top-bottom): Make sure 'recenter's second
argument is non-nil everywhere.
* windows.texi (Textual Scrolling): Update documentation of
'recenter'.
2018-07-07 12:07:47 +03:00
Eli Zaretskii
c73cf3548e Fix recent change in window.c
* src/window.c (scroll_command): Fix minor inefficiency in
last change: don't call Fset_buffer if the buffer is already set to be
what we want.  (Bug#31988)
2018-07-07 10:45:45 +03:00
Basil L. Contovounesios
6c60c4e2ff Fix scrolling
* src/window.c (scroll_command): Fix scrolling.
2018-07-06 16:23:21 -07:00
Eli Zaretskii
0dce5e5920 Speed up 'replace-buffer-contents' some more
* src/editfns.c (EXTRA_CONTEXT_FIELDS): New members beg_a and beg_b.
(Freplace_buffer_contents): Set up ctx.beg_a and ctx.beg_b.
(buffer_chars_equal): Use ctx->beg_a and ctx->beg_b instead of
calling BUF_BEGV, which is expensive.  This speeds up the recipe
in bug#31888 by 30%.
2018-07-03 22:16:20 +03:00
Paul Eggert
9d274c3e1c Fix typo in --with-x-toolkit=no code
* src/xmenu.c (pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]:
Fix type typo introduced by 2018-06-14T22:59:08!eggert@cs.ucla.edu.
2018-07-03 11:55:01 -07:00
Glenn Morris
02f2f336af Merge from origin/emacs-26
fc5cae7 ; Fix ChangeLog typo.
e17a5e5 ; make change-history-commit
f205928 * etc/HISTORY: Cite Brinkoff on early history.
4e58ca8 Document internal use of 'above-suspended' z-group frame para...
4bd43b0 Increase max-lisp-eval-depth adjustment while in debugger (bu...
ab98352 Improve on last change in replace-buffer-contents
2f149c0 Fix a factual error in Introduction to Emacs Lisp
8ad50a3 ; * lisp/files.el (buffer-offer-save): Doc fix.  (Bug#32000)
c80f31f Minor improvements in documentation of imenu.el
8ebb683 Avoid errors with recentering in 'skeleton-insert'
e980a3c * src/lisp.h: Omit obsolete comment re bytecode stack.
eec71eb Speed up replace-buffer-contents
93c41ce Remove extra process call from vc-git-find-file-hook
7ea0873 ; Update some commentary
4a7f423 Speed up vc-git-dir-status-files
9134c84 Avoid compiler warning using coding.h

Conflicts:
	src/editfns.c
2018-07-02 19:19:26 -07:00
Glenn Morris
98e98b42a0 Merge from origin/emacs-26
d008ef3 * src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string ...
6f6d525 Detect a non-list package archive content properly (Bug#22311)
2018-07-02 19:19:05 -07:00
Eli Zaretskii
fd5bf49139 Fix last change
* src/w32console.c (Fset_screen_color): Call Frecenter with 2
arguments.  (Bug#31325)

* etc/NEWS:
* doc/lispref/windows.texi (Textual Scrolling): Clarify the
role of the second argument to 'recenter'.
2018-07-01 19:19:51 +03:00
John Shahid
260768a64b Add a new argument to 'recenter' to allow finer control of redisplay
* window.c (recenter): Add a new REDISPLAY argument to allow the
caller to control the redisplay behavior.  'recenter' will only
redisplay the frame if this new arg and 'recenter-redisplay' are
both non-nil.
(recenter-top-bottom): Pass an extra non-nil argument to
'recenter' to force a redisplay.  (Bug#31325)
2018-07-01 19:05:37 +03:00
Martin Rudalics
4e58ca87f9 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.
2018-07-01 10:22:59 +02:00
Gemini Lasswell
4bd43b0352 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.
2018-06-30 07:36:11 -07:00
Eli Zaretskii
ab983522a1 Improve on last change in replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Call modification
hooks only for the actual region where changes are made.
(Bug#31888)
2018-06-30 16:50:31 +03:00
Eli Zaretskii
ed65ea1815 Speed up reading sub-process output on MS-Windows
* src/w32proc.c (syms_of_ntproc) <w32-pipe-read-delay>: Set to
zero.  For the details, see this discussion:
http://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00711.html.
* src/w32.c (_sys_read_ahead): Update the commentary for
w32-pipe-read-delay usage.

* doc/emacs/msdos.texi (Windows Processes): Document
w32-pipe-read-delay.

* etc/NEWS: Mention the change of the value of w32-pipe-read-delay.
2018-06-30 11:43:42 +03:00
Eli Zaretskii
3b4e65e797 Speed-up let-binding of automatically-local variables
* src/data.c (set_default_internal): Use FOR_EACH_LIVE_BUFFER
when binding variables that don't nominally have a local
value, to avoid slowing down due to a large number of dead
buffers.  (Bug#18522) (Bug#31853)
2018-06-30 11:17:25 +03:00
Paul Eggert
2e2811865f unbind_to performance tuning
* src/alloc.c (which_symbols):
* src/dispnew.c (Fredisplay):
* src/editfns.c (Fsubst_char_in_region):
* src/fileio.c (Fdo_auto_save):
* src/indent.c (Fvertical_motion):
* src/keymap.c (Fcurrent_active_maps):
* src/lread.c (Feval_buffer):
* src/minibuf.c (get_minibuffer):
* src/sysdep.c (system_process_attributes):
* src/textprop.c (Fnext_single_char_property_change)
(Fprevious_single_char_property_change):
* src/window.c (Fscroll_other_window, Fscroll_other_window_down):
* src/xdisp.c (Fformat_mode_line):
Help the compiler eliminate tail recursion in call to unbind_to.
* src/coding.c (decode_coding_gap):
Omit unnecessary unbind_to, as we’re about to call unbind_to anyway.
* src/coding.c (Fread_coding_system):
* src/eval.c (eval_sub):
* src/xdisp.c (handle_single_display_spec, decode_mode_spec):
* src/xselect.c (x_get_local_selection):
Avoid need to save a machine register when calling unbind_to.
* src/minibuf.c (Ftry_completion, Fall_completions):
Omit unnecessary assignment.
2018-06-29 17:07:57 -07:00
Paul Eggert
e980a3c992 * src/lisp.h: Omit obsolete comment re bytecode stack. 2018-06-29 11:15:06 -07:00
Eli Zaretskii
eec71ebdb5 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)
2018-06-29 16:55:20 +03:00
Paul Eggert
b2c854a0e1 * src/lisp.h: Add comment (Bug#31996#25). 2018-06-29 00:29:41 -07:00
Paul Eggert
ddc4371a89 Fix recently-introduced SAFE_FREE bug
Problem reported by Andy Moreton (Bug#31996).
* src/lisp.h (union specbinding.unwind_array):
Remove unused member func.  Move array after nelts, as this is
likely to generate more efficient code in safe_free, which can
call xfree with the same value either way.
(safe_free): Also handle SPECPDL_UNWIND_AWAY.
2018-06-28 13:51:09 -07:00
Paul Eggert
76eda952b0 Tune SAFE_FREE
On my platform (Fedora 28 x86-64, AMD Phenom II X4 910e) this sped
up a SAFE_FREE-using microbenchmark (string-distance "abc" "abc")
by about 18%, and shrank the Emacs text size by about 0.1%.
* src/callint.c (Fcall_interactively):
* src/callproc.c (call_process):
* src/doc.c (get_doc_string, Fsnarf_documentation):
* src/editfns.c (Freplace_buffer_contents):
* src/emacs-module.c (funcall_module):
* src/eval.c (Flet):
* src/process.c (Fmake_process):
* src/term.c (tty_menu_show):
* src/xdisp.c (safe__call):
* src/xmenu.c (x_menu_show):
Use SAFE_FREE_UNBIND_TO.
* src/data.c (wrong_choice): No need to call SAFE_FREE here.
* src/lisp.h (USE_SAFE_ALLOCA):
* src/regex.c (REGEX_USE_SAFE_ALLOCA):
Do not declare sa_must_free local; no longer needed.
All uses removed.
(SAFE_FREE): Rewrite in terms of safe_free.
(safe_free): New function, optimized to use xfree.
(SAFE_FREE_UNBIND_TO): New macro.
(safe_free_unbind_to): New function.
2018-06-28 00:42:46 -07:00
Eli Zaretskii
9134c841f1 Avoid compiler warning using coding.h
* src/coding.h: Add INLINE_HEADER_BEGIN..INLINE_HEADER_END, since
this header now has an extern INLINE function.
2018-06-27 18:02:45 +03:00
Martin Rudalics
d008ef3d0b * src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string (Bug#31975) 2018-06-27 09:07:59 +02:00
Paul Eggert
d0e2a341dd (format "%d" F) now truncates floating F
Problem reported by Paul Pogonyshev (Bug#31938).
* src/editfns.c: Include math.h, for trunc.
(styled_format): For %d, truncate floating-point numbers and
convert -0 to 0, going back to how Emacs 26 did things.
* doc/lispref/strings.texi (Formatting Strings):
Document behavior of %o, %d, %x, %X on floating-point numbers.
* src/floatfns.c (trunc) [!HAVE_TRUNC]: Rename from emacs_trunc
and make it an extern function, so that editfns.c can use it.
All callers changed.
* test/src/editfns-tests.el (format-%d-float): New test.
2018-06-25 12:23:08 -07:00
Lars Ingebrigtsen
71e4a4b7e5 Clean up redundant code from previous checkins
* src/gnutls.c (gnutls_verify_boot): Remove reduntant setting of
p->gnutls_certificates, which is now performed by
gnutls_deinit_certificates.
2018-06-25 18:42:48 +02:00
Paul Eggert
f43186fe28 Revert previous patch; comment was OK after all. 2018-06-24 23:46:18 -07:00
Paul Eggert
4c3306e12f Fix lead comment for count_trailing_zero_bits
* src/data.c (count_trailing_zero_bits): Fix comment to match code.
2018-06-24 23:21:23 -07:00
Lars Ingebrigtsen
cf36693bd4 Don't use XCAR in possibly-nil situations
* src/gnutls.c (Fgnutls_peer_status): certs theoretically may be
nil, so don't use XCAR.
2018-06-25 02:34:37 +02:00
Lars Ingebrigtsen
fea8c7d181 Tweak previous gnutls change for efficiency
* src/gnutls.c (Fgnutls_peer_status): Minor optimisation to avoid
computing the topmost certificate twice.
2018-06-24 21:21:56 +02:00
Lars Ingebrigtsen
c8745d95cf Return the entire TLS certificate chain back to the caller
* src/gnutls.c (gnutls_deinit_certificates): New function.
(Fgnutls_peer_status): Return all certificates in the chain back
to Lisp land.
(gnutls_verify_boot): Compute all the x509 certificates in the
chain.

* src/process.h (struct Lisp_Process): Adjust gnutls fields so
that we can keep tracks of all certificates in the chain instead
of just the host certificate.
2018-06-24 21:17:46 +02:00
Glenn Morris
16c2f03c15 Merge from origin/emacs-26
bbc9d37 (origin/emacs-26) Fix previous change in minibuffer-default-a...
7caeef1 * src/editfns.c (Fformat): Make %x easier to spot in doc stri...
ecc29fb Improve responsiveness while in 'replace-buffer-contents'
8182d64 Improve documentation of 'server-start' and friends
decdfed Clarify wording about functions' argument lists
5abac8b * lisp/doc-view.el: Fix typos in the commentary.  (Bug#31937)
2018-06-23 07:51:00 -07:00
Glenn Morris
b81e193ac0 Merge from origin/emacs-26
5cb3991 Fix a typo in emacs-lisp-intro.texi
d6aa55e Avoid segfaults in replace-buffer-contents with large buffers
d22b8d1 Adjust for scaling for mode-line popup menus (Bug#31880)
3d2e3dc Change name of `seqp' argument (Bug#26411)
40e1db8 Change index of ";" to better reflect it's usage (Bug#31623)
d289e7e Fix bug of 'mouse-drag-and-drop-region' to detect edges of re...
e292c09 Fix #'fun handling inside `labels' (Bug#31792)
2018-06-23 07:50:59 -07:00
Eli Zaretskii
7caeef1622 * src/editfns.c (Fformat): Make %x easier to spot in doc string. (Bug#31945) 2018-06-23 15:34:14 +03:00
Eli Zaretskii
ecc29fbd5a 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)
2018-06-23 14:03:10 +03:00
Eli Zaretskii
d6aa55e2b4 Avoid segfaults in replace-buffer-contents with large buffers
* src/editfns.c (Freplace_buffer_contents): Don't release
malloc'ed memory as long as we are using it.  (Bug#31888)
2018-06-22 15:57:47 +03:00
Robert Pluim
d22b8d1ad1 Adjust for scaling for mode-line popup menus (Bug#31880)
* src/xmenu.c (menu_position_func) [HAVE_GTK3]: Take scaling
into account when calculating screen size.
2018-06-22 10:02:27 +02:00
memeplex
8a7475ca79 Remove broken icon from tooltip (Bug#31884)
* src/gtkutil.c (xg_show_tooltip): Call gtk_widget_show instead of
gtk_widget_show_all, the latter displays an extra placeholder icon.
2018-06-21 19:57:59 -04:00