1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 09:20:54 -08:00
Commit graph

41974 commits

Author SHA1 Message Date
YAMAMOTO Mitsuharu
0e936f18f8 Fix build failure with --with-cairo --without-png
* src/image.c: Don't enable PNG section only by USE_CAIRO.
2020-01-15 17:10:30 +09:00
Juri Linkov
d47b157969 Handle tab-bar clicks on a GPM-capable console.
* src/term.c (handle_one_term_event): Call tty_handle_tab_bar_click.

* src/xdisp.c (tty_handle_tab_bar_click): Force reset of up_modifier bit
from the event modifiers.

* lisp/tab-line.el (tab-line-tab-current): No need to use inverse-video
on console/xterm because the selected tab already uses inverse-video.
2020-01-13 01:23:12 +02:00
Väinö Järvelä
5841240295 Use NSNumber instead of BOOL (bug#39047)
* src/nsfns.m (ns_set_represented_filename): Use correct type.

Copyright-paperwork-exempt: yes
2020-01-09 20:04:27 +00:00
Eli Zaretskii
1fe596d89f Fix another compilation problem in a build without threads
* src/systhread.c (sys_thread_set_name) [!THREADS_ENABLED]: Add
a trivial implementation.
2020-01-08 22:00:36 +02:00
Eli Zaretskii
50dc615095 Fix build without threads
* src/systhread.c (sys_thread_create) [!THREADS_ENABLED]: Update
the function's signature to match prototype.  Reported by Glenn
Morris <rgm@gnu.org>.  (Bug#38632)
2020-01-08 20:53:00 +02:00
Mattias Engdegård
73fd8a4b53 Fix BSD and macOS builds w.r.t. pthread_setname_np (bug#38632)
pthread_setname_np takes only a single argument on BSD and macOS,
and affects the current thread only.

* configure.ac: Add check for single-argument pthread_setname_np
* src/systhread.c (sys_thread_set_name): New (w32 and pthread versions).
(sys_thread_create): Remove name argument and name-setting.
(w32_beginthread_wrapper): Remove name-setting.
* src/systhread.h (sys_thread_create, sys_thread_set_name):
Update prototypes.
* src/thread.c (run_thread): Call sys_thread_set_name.
(Fmake_thread): Adapt call to sys_thread_create.
* src/thread.h (struct thread_state): Adjust comment.
2020-01-07 17:57:31 +01:00
Robert Pluim
f54b24304d Scale top-left coordinates in display-monitor-attributes-list
When using multiple monitors, and HiDPI, the top-left coordinates of
the monitors need to be adjusted, not just the width and height
(Bug#31223).

* xfns.c (Fx_display_monitor_attributes_list): Scale top-left
coordinates.
2020-01-07 17:26:21 +01:00
YAMAMOTO Mitsuharu
c01f55f126 Fix rendering bug due to unsynchronized cairo surface size (Bug#38497)
* src/xterm.c (handle_one_xevent) <ConfigureNotify> [USE_CAIRO && !USE_GTK]:
Call x_cr_update_surface_desired_size for a related frame as a fallback.
2020-01-07 12:42:19 +09:00
YAMAMOTO Mitsuharu
075f21c0e3 Avoid crash by access to cleared img->pixmap->data/img->mask->data (Bug#38774)
* src/image.c (prepare_image_for_display) [USE_CAIRO]: Call IMAGE_BACKGROUND
and IMAGE_BACKGROUND_TRANSPARENT.
2020-01-07 12:32:42 +09:00
Eli Zaretskii
16c6dfb4f1 Avoid assertion violations in very small-height windows
* src/xdisp.c (try_cursor_movement, redisplay_window)
(row_containing_pos): Skip tab-line glyph rows in addition to
header-line rows, when working on the top-most glyph row of a
window.  This avoids assertion violations in set_cursor_from_row.
(Bug#38966)
2020-01-06 21:49:24 +02:00
Robert Pluim
9063124b91 Use pthread_setname_np to set thread name
* configure.ac: Remove check for sys/prctl.h and prctl, check for
pthread_setname_np instead.

* systhread.c: Remove sys/prctl.h include.
(sys_thread_create) [HAVE_PTHREAD_SETNAME_NP]: Use pthread_setname_np
to set the name of the newly created thread (Bug#38632).

* thread.c (Fmake_thread): Use ENCODE_SYSTEM instead of
ENCODE_UTF_8 on the thread name.
2020-01-06 15:27:26 +01:00
Martin Rudalics
076dd1f69a Fix typo in 'window_box_height'
* src/xdisp.c (window_box_height): Add missing 'else'.
2020-01-04 09:43:13 +01:00
Eli Zaretskii
09b65707cc ; * src/dispnew.c (adjust_glyph_matrix): Fix last change. 2020-01-03 10:19:23 +02:00
Eli Zaretskii
37f9182b68 Fix redisplay when mode-line-format changes mode-line's height
* lisp/frame.el (top-level): Add mode-line-format,
tab-line-format, and header-line-format to the list of variables
that should trigger an immediate redisplay of the buffer's
window.  This fixes redisplay of windows when the mode line
changes its height.

* src/xdisp.c (window_box_height): Use the window's
mode_line_height, tab_line_height, and header_line_height fields
in preference to CURRENT_MODE_LINE_HEIGHT,
CURRENT_TAB_LINE_HEIGHT, and CURRENT_HEADER_LINE_HEIGHT,
respectively.  This fixes display of vertical scroll bar when the
height of the window's mode line changes.
* src/dispnew.c (adjust_glyph_matrix): When resizing a window's
matrix, reset the mode_line_p flag of the previous mode-line row,
so that the window_box_height, CURRENT_MODE_LINE_HEIGHT, and their
ilk won't use stale info.  (Bug#38828)
2020-01-03 09:28:35 +02:00
Eli Zaretskii
1420906b81 * src/fileio.c (Fwrite_region): Improve the doc string. 2020-01-02 19:34:30 +02:00
Martin Rudalics
01dfcb7c87 Fix removal of frame decorations on Windows (Bug#38705)
* src/w32fns.c (w32_set_undecorated): Actualize
f->output_data.w32->dwStyle for subsequent calls of
AdjustWindowRect (Bug#38705).
* src/w32term.h (struct w32_output): Add comment for
dwstyle slot.
2020-01-02 09:35:49 +01:00
Eli Zaretskii
338154240e Fix compilation with GTK versions older than 3
* src/xfns.c (x_get_net_workarea): Change a recently moved #ifndef
so that GTK builds which need this function will compile it.
Reported by John <jpff@codemist.co.uk>.

(cherry picked from commit d36adb544d)
2020-01-01 21:16:48 +02:00
Mattias Engdegård
fab3674b36 Revert "Raise default max-specpdl-size value"
This reverts commit bb9402e6e9.
2020-01-01 17:38:41 +01:00
Mattias Engdegård
bb9402e6e9 Raise default max-specpdl-size value
Occasionally, loading cl-generic.el from source requires
max_specpdl_size > 1600 when bootstrapping, and thus fails.
In any case we are very close to the limit.

* src/eval.c (init_eval_once): Raise max_specpdl_size to 1800.
* doc/lispref/variables.texi (Local Variables): Update docs.
2020-01-01 16:43:58 +01:00
Paul Eggert
186152ba40 Pacify gcc -Wunused-function on Ubuntu 18.04.3
This improves on 2019-12-25T20:01:07Z!eggert@cs.ucla.edu,
by fixing a GCC warning on Ubuntu 18.04.3
“‘x_get_net_workarea’ defined but not used”.
* src/xfns.c (x_get_net_workarea) [!USE_GTK]: Do not define.
2020-01-01 01:03:14 +00:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Eli Zaretskii
e3ec84fd7d Ensure mini-window is resized to show active minibuffer contents
* src/keyboard.c (read_char, command_loop_1): Resize the
mini-window after clearing the echo area while minibuffer is
active.  (Bug#38645)
2019-12-30 18:00:17 +02:00
Eli Zaretskii
450633f85a Fix mini-window resizing under resize-mini-windows = t
* src/window.c (grow_mini_window): Fix resizing of mini-window
when the echo area is cleared, and the caller asks for the
mini-window to have zero lines.  (Bug#38791)
2019-12-30 17:53:52 +02:00
Robert Pluim
81b697d106 Fix crash under -nw on macOS properly this time
* src/dispextern.h (FACE_COLOR_TO_PIXEL): Only use
ns_color_index_to_rgba when we're running under the NS gui
(Bug#38564).
2019-12-29 21:15:34 +01:00
Robert Pluim
9ce4207969 Revert "Check for GUI frame in ns_color_index_to_rgba"
This reverts commit ea84a95bd8.
2019-12-29 21:15:33 +01:00
Robert Pluim
732dcfc850 Ignore all color fonts when using XFT
* etc/NEWS: Announce change to matching color fonts when using XFT.

* src/ftfont.c (ftfont_list) [HAVE_XFT && FC_COLOR]: Query for the
color attribute of the matched font, and skip it if it is not
FcFalse (Bug#37786).
2019-12-29 20:08:38 +01:00
Alan Third
012c12a05e Fix when expose draws partially visible first glyph (bug#38731)
* src/xdisp.c (expose_area): When the face extends to the end of the
line draw text from the correct x coordinate.
2019-12-29 10:42:42 +00:00
Paul Eggert
03f962a486 Port x_get_monitor_attributes_fallback to !HAVE_GTK3
* src/xfns.c (x_get_net_workarea) [!HAVE_GTK3]:
Define in this case too, since x_get_monitor_attributes_fallback
contains a call to it regardless whether HAVE_GTK3 is defined.
2019-12-25 12:01:48 -08:00
Philipp Stephani
41f0cf266e * src/pdumper.c (Fdump_emacs_portable): Reword error message.
(cherry picked from commit ac7b260773)
2019-12-24 19:56:16 +02:00
Philipp Stephani
719a6924c4 Don’t allow portable dumping in interactive mode (Bug#38453).
* src/pdumper.c (Fdump_emacs_portable): Don’t allow dumping in
interactive mode.

(cherry picked from commit e7edba42c8)
2019-12-24 19:55:31 +02:00
Lars Ingebrigtsen
0de63092c8 Clarify base64 requirements and say what {en,de}code_coding_region does
* src/coding.c (Fencode_coding_region): Clarify what this does.
(Fdecode_coding_region): Ditto.

* src/fns.c (Fbase64_decode_region): Clarify that this function
returns bytes, not text (bug#38587).
(Fbase64_encode_region): Clarify that this function takes bytes,
not text.
2019-12-24 17:11:11 +01:00
Philipp Stephani
51ea32dd12 * src/emacs-module.h.in: Add reference to manual. 2019-12-24 09:47:02 +01:00
Juanma Barranquero
75d0cef20d Trivial docstring fixes
* ChangeLog.3:
* lisp/emacs-lisp/cl-macs.el (cl-flet):
* lisp/filesets.el (filesets-menu-ensure-use-cached):
* lisp/progmodes/compile.el (compilation-context-lines):
* lisp/progmodes/prolog.el (prolog-paren-indent):
* lisp/progmodes/sql.el (sql-password-search-wallet-function):
Fix typos in docstrings.

* lisp/cedet/semantic/analyze.el (semantic-analyze-push-error):
Doc fix.

* lisp/emacs-lisp/map.el (map-put, map-info): Refill docstring.
(map-contains-key): Fix typo.
(map-every-p): Doc fix.
2019-12-24 02:37:08 +01:00
Dhruva Krishnamurthy
ee12c421b6 imagemagick-types needs to initialize ImageMagick
* src/image.c (imagemagick_initialize): New function,
with body taken from imagemagick_load_image.
(imagemagick_load_image, Fimagemagick_types): Use it.
Copyright-paperwork-exempt: yes
2019-12-23 17:20:47 -08:00
Philipp Stephani
f8e83d73a2 Document and verify that emacs_limb_t doesn’t have padding bits.
This is a useful property when doing further bit-twiddling with the
magnitude array before/after calling extract_big_integer or
make_big_integer.  For example, constructing an emacs_limb_t object
using repeated shift-and-add should work as expected, but relies on
the type not having padding bits.  Since the C standard already
guarantees that unsigned integers use a pure binary representation,
not having padding bits is enough to guarantee that the type has
unique object representations in the sense of C++’s
std::has_unique_object_representations.

* doc/lispref/internals.texi (Module Values): Document that
emacs_limb_t doesn’t have padding bits.

* src/emacs-module.c: Verify that emacs_limb_t doesn’t have padding
bits.
2019-12-23 15:37:49 +01:00
Jimmy Aguilar Mena
0abdb01be6 Fix extension of underline, overline, and strike-through attributes
* src/xdisp.c (extend_face_to_end_of_line): Don't return early
if face attributes beyond background color and box are set,
since that means these attributes need to be extended past the
EOL.
2019-12-23 15:33:25 +02:00
Martin Rudalics
1e758530b0 Fix documentation of implied frame resizing (Bug#38684)
* src/frame.c (frame_inhibit_implied_resize): Fix doc-string.
* doc/lispref/frames.texi (Implied Frame Resizing): Update and
rewrite section.
2019-12-23 10:50:44 +01:00
Eli Zaretskii
d7ab4edd93 Fix wording of recent documentation changes
* src/xdisp.c (syms_of_xdisp):
* lisp/minibuffer.el (minibuffer-message-clear-timeout):
* etc/NEWS:
* doc/lispref/display.texi (Displaying Messages): Minor
changes of wording of a recent commit.  (Bug#38457)
2019-12-22 21:02:48 +02:00
Masahiro Nakamura
ba042176d8 Fix display of working text on NS (Bug#23412, Bug#1453)
* lisp/term/ns-win.el (ns-insert-working-text):
(ns-delete-working-text): Change how working text is deleted to handle
changed order of operations.
* src/nsterm.m ([EmacsView insertText:]): Move deletion of working
text until after insertion of new text.

Copyright-paperwork-exempt: yes
2019-12-22 11:47:29 +00:00
Alan Third
bfc54230c5 Check if file is in iCloud drive (bug#38618)
* src/nsfns.m (ns_set_represented_filename): Check whether the file is
a `ubiquitous item', and if so don't display a proxy icon.
2019-12-22 11:47:28 +00:00
Juri Linkov
485b423e8f New variable set-message-function to show message at the end of the minibuffer
* doc/lispref/display.texi (Displaying Messages): Document
set-message-function and clear-message-function.

* lisp/minibuffer.el (minibuffer-message-clear-timeout): New defcustom.
(minibuffer-message-timer, minibuffer-message-overlay): New variables.
(set-minibuffer-message, clear-minibuffer-message): New functions.
(set-message-function, clear-message-function): Set variables to
set-minibuffer-message and clear-minibuffer-message respectively.

* src/keyboard.c (read_char): Call clear_message when
Vclear_message_function is a function.

* src/xdisp.c (set_message): Call Vset_message_function when it's a function.
(clear_message): Call Vclear_message_function when it's a function.
(syms_of_xdisp): New variables set-message-function and clear-message-function
(bug#38457).
2019-12-22 00:02:10 +02:00
Eli Zaretskii
59ce7609cb ;* src/process.c (read_process_output): Fix last change. 2019-12-21 20:18:05 +02:00
Eli Zaretskii
cc78faee7d Allow control of data amount read from subprocess in one chunk
* src/process.c (syms_of_process) <read-process-output-max>:
New variable.
(read_process_output): Use it instead of the hard-coded
constant 4096.  (Bug#38561)
Use SAFE_ALLOCA to support large buffers for reading process
output.

* etc/NEWS: Mention 'read-process-output-max'.
2019-12-21 10:47:31 +02:00
Eli Zaretskii
0e19b5d757 Support setting OS names of threads on MS-Windows
* src/w32fns.c (setup_w32_kbdhook): Don't initialize
is_debugger_present here...
(globals_of_w32fns): ...initialize it here.  Also initialize
the new global variable set_thread_description.
* src/systhread.c: [WINDOWSNT] Include mbctype.h
(w32_set_thread_name): New function.
(MS_VC_EXCEPTION): New macro.
(THREADNAME_INFO, IsDebuggerPresent_Proc)
(SetThreadDescription_Proc): New typedefs.
(w32_beginthread_wrapper): Call w32_set_thread_name to set the
name of the new thread.
* src/thread.h (struct thread_state): New member thread_name.
* src/thread.c (Fmake_thread): Set the thread_name field of
the new thread object.
(run_thread): Free the thread_name member after the thread
exits.
2019-12-20 20:59:07 +02:00
Eli Zaretskii
1e240a0ecd Fix face merging for display strings broken by a recent commit
* src/xfaces.c (face_at_string_position): Revert the last
change, as it cannot possibly solve bug#38563.
* src/xdisp.c (face_at_pos): Fix a typo made during last
change here, which broke face merging for display strings.
(Bug#38633)
2019-12-16 17:43:30 +02:00
Juri Linkov
7254b63462 Revert aa89c84e00 (bug#38457)
* src/editfns.c (Fmessage): Don't use minibuffer-message.
(Fmessage_in_echo_area): Remove function message-in-echo-area.
(syms_of_editfns): Remove variable message-in-echo-area.

* lisp/isearch.el (isearch--momentary-message): Remove message-in-echo-area.
* lisp/minibuffer.el (minibuffer-message): Don't record message
in the *Messages* buffer.
(minibuffer-completion-help): Remove message-in-echo-area.

* lisp/subr.el (do-after-load-evaluation): Remove discard-input (bug#38560)
2019-12-16 01:58:14 +02:00
Paul Eggert
bb42f6ef10 Remove nothing from union output_data
* src/frame.h (union output_data): Remove ‘nothing’ member.
It has had no effect for quite some time.
All uses removed.
2019-12-14 14:22:35 -08:00
Eli Zaretskii
a01a722282 Update documentation of pure-space overflow
* doc/lispref/internals.texi (Garbage Collection)
(Pure Storage):
* src/alloc.c (Fgarbage_collect): Update the documentation of
pure-space overflow for when pdumper is used.  (Bug#38492)
2019-12-14 20:02:11 +02:00
Paul Eggert
c6e655c77b Fix typo that broke GNU/Linux unexec build
* src/emacs.c (Fdump_emacs): Remove stray closing brace that
breaks the build when configured with --with-dumping=unexec on
GNU/Linux.  (Apparently everybody is using pdumper now.)
I introduced the bug in 2019-07-09T00:50:39Z!eggert@cs.ucla.edu.
2019-12-13 17:07:16 -08:00
Juanma Barranquero
b2949d3926 xfaces.c: Silence spurious maybe-uninitialized compiler warning
* src/xfaces.c (face_inherited_attr): Initialize 'ok' to false.
2019-12-13 18:52:49 +01:00