1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-03 22:20:52 -08:00
Commit graph

40906 commits

Author SHA1 Message Date
Martin Rudalics
c7897c2786 A few further fixes of window internals description
* doc/lispref/internals.texi (Window Internals): Add a few
more items and clarify description of some others.
2018-12-03 09:35:33 +01:00
Paul Eggert
f5090b9129 Use tcdrain, not fdatasync, to drain ttys
fdatasync is for storage devices, not ttys.
* admin/merge-gnulib (GNULIB_MODULES): Remove fdatasync.
* lib/fdatasync.c, m4/fdatasync.m4: Remove.
* lib-src/Makefile.in (LIB_FDATASYNC):
* src/Makefile.in (LIB_FDATASYNC):
Remove.  All uses removed.
* lib-src/emacsclient.c [!DOS_NT]:
Include <termios.h>, for tcdrain.
* lib-src/emacsclient.c (flush_stdout):
* src/sysdep.c (reset_sys_modes): On ttys, use tcdrain instead
of fdatasync (except don’t use either function if DOS_NT).
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2018-12-02 23:55:01 -08:00
Glenn Morris
b6935dbe18 Merge from origin/emacs-26
317b354 ; Add notes about cross-compiling macOS versions
4b176eb Fix macOS run-time feature check
c03574b * etc/NEWS-*: Fix capitalization of "Emacs"

# Conflicts:
#	etc/NEWS
2018-12-02 10:32:24 -08:00
Eli Zaretskii
745c9c0258 Revert "Revert "Fix infloop in GC mark_kboards""
This reverts commit c418c85617.
This reinstates the original fix, as it had nothing to do
with the behavior reported in bug#33571, which seems to be
the expected behavior.
2018-12-02 20:04:05 +02:00
Eli Zaretskii
c418c85617 Revert "Fix infloop in GC mark_kboards"
This reverts commit af914fc26d,
since it caused unintended adverse effects on echoing of keys.
(Bug#33571)
2018-12-02 09:39:04 +02:00
Paul Eggert
af914fc26d Fix infloop in GC mark_kboards
Do not merge to master, as I have a more systematic fix there.
* src/keyboard.c (mark_kboards): Fix infloop (Bug#33547).
2018-12-01 13:42:57 -08:00
Alan Third
4b176eb863 Fix macOS run-time feature check
* src/nsterm.m (x_set_parent_frame) [NS_IMPL_COCOA]: Fix run-time
feature check.
2018-12-01 16:41:03 +00:00
Paul Eggert
7d9fa89fb3 Fix infloop in GC mark_kboards
* src/keyboard.c (KBD_BUFFER_SIZE): Now a constant, not a macro.
(kbd_fetch_ptr, kbd_store_ptr): These now always point somewhere
into kbd_buffer, instead of sometimes pointing just past the
end which led to serious bugs (Bug#33547).  All uses changed.
(kbd_store_ptr): No longer volatile.  This variable has not been
accessed by a signal handler for some time, it seems.
(next_kbd_event, prev_kbd_event): New functions.
(kbd_buffer_nr_stored, process_special_events): Simplify.
2018-11-30 14:27:02 -08:00
Paul Eggert
7ecf49b5a5 Fix core dump in dbus-message-internal
Backport from master.
* src/dbusbind.c (Fdbus_message_internal):
Don’t go past array end (Bug#33530).
2018-11-30 09:56:10 -08:00
Robert Pluim
5f67353da7 Convert NS face colors to RGBA when comparing with frame values
The NS port uses indexes into a color table to specify the colors of
faces, whereas frames use RGBA pixel values.  In
extend_face_to_end_of_line the two needed to be compared to ensure
that the backgrounds of certain faces are not extended to the edge of
the window, which was failing because of this difference, thus causing
a visual difference with other platforms.  Convert from index to RGBA
when doing such comparisons.

* src/dispextern.h (FACE_COLOR_TO_PIXEL) [HAVE_NS]: New macro.  Call
ns_color_index_to_rgba under NS only.

* src/nsgui.h: Add prototype for ns_color_index_to_rgba.

* src/nsterm.m (ns_color_index_to_rgba): New function.  Converts a
color_table entry to corresponding RGBA pixel value.

* src/xdisp.c (extend_face_to_end_of_line): Call FACE_COLOR_TO_PIXEL
on face background color when comparing with frame color.
2018-11-30 08:55:02 +01:00
Glenn Morris
415ef4a2b0 Merge from origin/emacs-26
74a3a79 (origin/emacs-26) Fix a typo in a doc string
911766d Minor markup fix in frames.texi
19ed1e9 * lisp/net/trampver.el (customize-package-emacs-version-alist...
d7132ad * lisp/mh-e/mh-e.el (customize-package-emacs-version-alist): ...
5f39260 * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Pass format to m...
a291f62 Don't call xwidget functions until GTK has been initialized
f0531b8 Improve documentation of Ediff wordwise commands
2925ce5 Support Hunspell 1.7.0 in ispell.el
03bb7a8 Avoid clearing echo-area message by auto-save-visited-file-name
2018-11-28 07:51:12 -08:00
Glenn Morris
b58e8b82ed Merge from origin/emacs-26
094fcf6 Fix more drawing bugs in NS port (bug#32932)
2018-11-28 07:51:11 -08:00
Paul Eggert
cef3f8fbf9 Fix core dump in dbus-message-internal
* src/dbusbind.c (Fdbus_message_internal):
Don’t go past array end (Bug#33530).
2018-11-27 21:36:43 -08:00
Robert Pluim
a291f62428 Don't call xwidget functions until GTK has been initialized
Follow up fix to Bug#33294.

* src/gtkutil.c: Define xg_gtk_initialized.
(xg_initialize): Set it when GTK has finished initializing.

* src/gtkutil.h: Declare xg_gtk_initialized.

* src/xwidget.c (Fmake_xwidget): Error out if GTK has not been
initialized.
(xwidget_init_view): Likewise.
2018-11-27 09:41:59 +01:00
Alan Third
094fcf62d2 Fix more drawing bugs in NS port (bug#32932)
* src/nsterm.m (ns_row_rect): New function.
(ns_clip_to_row): Remove function.
(ns_copy_bits): Fix mistake.
(ns_shift_glyphs_for_insert): Mark the frame as dirty instead of
directly copying.
(ns_draw_fringe_bitmap): Stop using ns_clip_to_row.
(ns_draw_window_cursor): Stop using ns_clip_to_row and perform a
display when not in redisplay.
(ns_update_window_begin): Remove redundant code that never executes.
([EmacsView drawRect:]): Show the rectangle being exposed in NSTRACE.
* src/xdisp.c (expose_window_tree) [HAVE_NS]:
(expose_frame) [HAVE_NS]: Redraw even if the frame is garbaged.
2018-11-25 11:25:33 +00:00
Alan Third
ea624626cc Set tooltip text color (bug#33452)
; Do not merge into master

* src/nsmenu.m: ([EmacsTooltip init]): Set text color to black.
2018-11-25 11:25:33 +00:00
Glenn Morris
bb7b75d711 Merge from origin/emacs-26
070e82b ; * src/window.c (window_scroll): Improve commentary.
60457d7 Improve documentation of the window tree
ea1a014 Fix window scrolling on TTY frames when there's no mode line
df7ed10 Fix decoding XML files encoded in ISO-8859
7851ae8 (tag: emacs-26.1.90) ; ChangeLog.3 update
1958808 * etc/AUTHORS: Update.
7252507 Fix description of some window hooks
88762b4 Run 'window--adjust-process-windows' when frame size changes ...
d6542ea Avoid errors in zone.el when there's overlay at EOB
2018-11-20 09:38:42 -08:00
Eli Zaretskii
070e82b96b ; * src/window.c (window_scroll): Improve commentary. 2018-11-19 20:35:28 +02:00
Eli Zaretskii
60457d7ae0 Improve documentation of the window tree
* doc/lispref/windows.texi (Windows and Frames): More accurate
wording regarding the relation of a mini-window to its frame's
window tree.

* src/window.h (struct window): Improve commentary to some
fields.
2018-11-19 20:31:49 +02:00
Eli Zaretskii
ea1a014982 Fix window scrolling on TTY frames when there's no mode line
* src/window.c (window_internal_height): Remove tests for
next, prev, and parent pointers, as they are unrelated to
whether a window has a mode line.  (Bug#33363)
2018-11-19 20:12:04 +02:00
Stefan Monnier
81f0e05a02 * src/cmds.c (Fself_insert_command): Get last-command-event via (new) arg. 2018-11-17 10:47:48 -05:00
Glenn Morris
166f1400b4 Merge from origin/emacs-26
edcd6b7 Small documentation correction.
168a8c2 * src/coding.c (Fcheck_coding_systems_region): Doc fix.  (Bug...
3287a7c Fix Bug#33364
acee0a8 ; Cosmetic changes in etc/NEWS
a6ef167 * test/README: Explain $REMOTE_TEMPORARY_FILE_DIRECTORY.

# Conflicts:
#	etc/NEWS
2018-11-16 08:30:19 -08:00
Eli Zaretskii
168a8c258c * src/coding.c (Fcheck_coding_systems_region): Doc fix. (Bug#33372) 2018-11-14 17:59:05 +02:00
Eli Zaretskii
fb2514f3e2 Fix a thinko in fileio.c
* src/fileio.c (get_homedir): Fix last change.  Suggested by
Paul Eggert <eggert@cs.ucla.edu>.
2018-11-14 17:28:13 +02:00
Eli Zaretskii
4a5a17507f Fix recent change in fileio.c
* src/fileio.c (get_homedir) [WINDOWSNT]: Convert $HOME to UTF-8.
(Fexpand_file_name): Don't convert it here.
2018-11-13 22:01:57 +02:00
Paul Eggert
900276502f Act like POSIX sh if $HOME is relative
POSIX says sh ~/foo should act like $HOME/foo even if $HOME is
relative, so be consistent with that (Bug#33255).
* admin/merge-gnulib (GNULIB_MODULES): Add dosname.
* src/buffer.c (init_buffer): Use emacs_wd to get
initial working directory with slash appended if needed.
(default-directory): Say it must be absolute.
* src/emacs.c (emacs_wd): New global variable.
(init_cmdargs): Dir arg is now char const *.
(main): Set emacs_wd.
* src/emacs.c (main) [NS_IMPL_COCOA]:
* src/fileio.c (Fexpand_file_name):
Use get_homedir instead of egetenv ("HOME").
* src/fileio.c: Include dosname.h, for IS_ABSOLUTE_FILE_NAME.
(splice_dir_file, get_homedir): New functions.
* src/xrdb.c (gethomedir): Remove.  All callers changed
to use get_homedir and splice_dir_file.
* test/src/fileio-tests.el (fileio-tests--relative-HOME): New test.
2018-11-13 09:32:50 -08:00
Glenn Morris
b8bbbe54dd Avoid kill-emacs-hook errors hanging batch mode
* src/emacs.c (Fkill_emacs): Prevent errors from kill-emacs-hook
hanging Emacs in batch mode.  (Bug#29955)

(cherry picked from commit 109da684c5)
2018-11-12 14:03:18 -05:00
Glenn Morris
23209e2c19 Merge from origin/emacs-26
913c001 * lisp/files.el (write-file): Clarify the doc string.  (Bug#3...
d614b84 Fix typos in midnight.el
8c2778a Improve documentation of 'move-file-to-trash'
c7b8a51 ; * doc/lispref/functions.texi (Anonymous Functions): Fix typo.
92296de * src/data.c (Ftype_of): xwidget objects are possible! (bug#3...
a3242cc Improve documentation of Diff mode
39e85a0 Note that lex bound lambda forms are not self-quoting (Bug#33...
fa605f2 Rewrite buffer display related doc-strings and doc
aa55659 Fix call to GlobalMemoryStatusEx in w32.c

# Conflicts:
#	doc/emacs/files.texi
#	src/data.c
2018-11-12 09:38:27 -08:00
Sam Steingold
db711687c3 maybe_disable_address_randomization always returns "int argc"
maybe_disable_address_randomization needs a consistent signature
regardless of HAVE_PERSONALITY_ADDR_NO_RANDOMIZE.
2018-11-12 09:10:11 -05:00
Paul Eggert
1d79c2ebd9 Work around dumping bug on GNU/Linux ppc64le
Problem reported by Thomas Fitzsimmons (Bug#33174).
Do not merge to master, as we have a better fix there.
* src/Makefile.in (emacs$(EXEEXT)):
(bootstrap-emacs$(EXEEXT)):
Unset EMACS_HEAP_EXEC before invoking temacs.
2018-11-11 22:35:10 -08:00
Paul Eggert
c14eab222c Fix dumping on GNU/Linux ppc64le
Problem reported by Thomas Fitzsimmons (Bug#33174).
* src/emacs.c (main): Adjust to sysdep.c changes.
* src/sysdep.c (exec_personality): New static var.
(disable_address_randomization): Remove, replacing with ...
(maybe_disable_address_randomization): ... this new function.
Do not set or use an environment variable; use a command-line
argument instead, and set the new static var.  Migrate the emacs.c
personality-change code to here, where it belongs.
(emacs_exec_file): Simplify by using new static var.
2018-11-11 22:20:39 -08:00
Paul Eggert
b87c874aa1 Pacify gcc -Wmaybe-uninitialized without X11-XCB
I ran into this problem on Ubuntu 18.04.1 LTS.
* src/xterm.c (get_current_wm_state) [!USE_XCB]:
Mark reply_data as UNINIT here too.
2018-11-11 10:03:32 -08:00
Paul Eggert
2917238758 Pacify gcc -Wunused-macros in older GnuTLS
I ran into this problem on Ubuntu 18.04.1 LTS.
* src/gnutls.c (HAVE_GNUTLS_CIPHER_GET_IV_SIZE)
(HAVE_GNUTLS_CIPHER_GET_TAG_SIZE, HAVE_GNUTLS_DIGEST_LIST):
New macros.  This uses the same style as the other
macros that depend on GnuTLS version, as opposed to trying
to do things a bit more cleverly.
(gnutls_cipher_get_iv_size, gnutls_cipher_get_tag_size)
(gnutls_digest_list, gnutls_digest_get_name):
Define these macros only if they will be used.
2018-11-11 10:03:32 -08:00
Paul Eggert
9cd23a2914 Dissociate controlling tty better on Darwin
* src/process.c (dissociate_controlling_tty): New function.
(create_process): Use it to dissociate controlling tty if setsid
fails, which happens on Darwin after a vfork (Bug#33154).
Do this on all platforms, not just on Darwin, as a similar
problem is plausible elsewhere.
* src/callproc.c (call_process): Use the new function here, too,
for consistency and to avoid duplicate code.
2018-11-10 09:04:42 -08:00
Eli Zaretskii
d6b7b60cd0 Fix last change
* src/editfns.c (Fgroup_name): Fix the doc string.  Move
closer to the "group" functions.
* src/w32.c (getgrgid): Return NULL if GID is not the group ID
of the user of this Emacs session

* test/src/editfns-tests.el (test-group-name): Rename from
'group-name'.  Add tests for non-Posix hosts.  Test error when
the argument to group-name is invalid.

* etc/NEWS: Fix wording of last added entry.
2018-11-10 11:16:17 +02:00
Jules Tamagnan
ffb4c76d99 src/editfns.c (group-name): New function. 2018-11-10 10:06:50 +02:00
Stefan Monnier
92296de42b * src/data.c (Ftype_of): xwidget objects are possible! (bug#33294)
(syms_of_data): Define Qwidget here.
* src/xwidget.c (syms_of_xwidget): Instead of here.
2018-11-09 09:51:54 -05:00
Eli Zaretskii
aa556596fa Fix call to GlobalMemoryStatusEx in w32.c
* src/w32.c (system_process_attributes): Initialize the size
of the data structure passed to GlobalMemoryStatusEx,
otherwise it fails.
2018-11-06 17:49:58 +02:00
Glenn Morris
294a5246b2 * src/xfaces.c (face_at_buffer_position): Adapt lookup_basic_face call. 2018-11-04 09:45:59 -08:00
Glenn Morris
a9140091dd Merge from origin/emacs-26
bd1d617 Avoid race in rcirc process filter (bug#33145)
88ef31a Avoid file-name errors when viewing PDF from Gnus
c939042 Avoid crashes with remapped default face in Org mode
97660fa Doc fix for checkdoc-continue
96f055b Fix a typo in autoload.el
2018-11-04 09:37:03 -08:00
Eli Zaretskii
19d2ba0059 A further fix for locally remapped fringe face
* src/xdisp.c (expose_window): Temporarily switch to the
window's buffer, in case the fringe face was remapped locally
in that buffer.  (Bug#33244)
2018-11-04 16:01:09 +02:00
Paul Eggert
b4eb908f85 Improve time error reporting
* src/timefns.c (emacs_mktime_z): Remove; no longer needed.
(time_error): New function, replacing invalid_time.
All callers changed.
(decode_float_time, decode_ticks_hz, decode_time_components):
Return an error number instead of merely a boolean.
All callers changed.
(decode_lisp_time): Signal an error based on the error number,
instead of merely returning a boolean to the caller.
All callers changed.
(format_time_string, Fdecode_time, Fencode_time)
(Fcurrent_time_string):
Do not assume that a failure of a system time function
must be due to time overflow.
(Fencode_time): Don't report an error merely because mktime
returned ((time_t) -1), as that may be a valid time_t value.
Use a simpler error check.  See:
https://www.sourceware.org/ml/libc-alpha/2018-11/msg00062.html
2018-11-03 21:36:46 -07:00
Eli Zaretskii
07048183a8 Allow the fringe face to be remapped locally in a buffer
* src/fringe.c (draw_window_fringes): Switch to window's
buffer to get the local value of face-remapping-alist, if
necessary.  (Bug#33244)
* src/xfaces.c (syms_of_xfaces) <Qface_remapping_alist>: New
DEFSYM.
2018-11-03 12:39:59 +02:00
Stefan Monnier
ef183b996c * src/data.c (Ffset): Don't signal gratuitous errors 2018-11-02 15:00:34 -04:00
Eli Zaretskii
c9390423d6 Avoid crashes with remapped default face in Org mode
* src/xfaces.c (face_at_buffer_position): Look up BASE_FACE_ID
anew if it is not in the frame's face cache.  This avoids
crashes when Org mode sets up for a new major mode in embedded
code fragment, and the default face is remapped.  (Bug#33222)
2018-11-02 12:07:47 +02:00
Glenn Morris
3a739236d0 Merge from origin/emacs-26
eb903d8 * lisp/emacs-lisp/pcase.el: Improve docstrings.
86abbb3 * lisp/emacs-lisp/rx.el (rx): Fix typo in doc string.  (Bug#3...
ced58d3 Improve doc string of 'call-process'
38f88a7 Document that generic functions cannot be commands
5aeddfa * lisp/mail/rmailsum.el (rmail-summary-output): Add lost word...
10e0fd8 Add index entries for more isearch commands/bindings (Bug#32990)
de28184 * lisp/simple.el (filter-buffer-substring): Clarify doc (Bug#...
d192c16 Fix recent change in lispref/processes.texi.
2018-10-31 07:50:57 -07:00
Paul Eggert
1ad2903a48 Refer to bytecode constant vectors (Bug#33014)
Backport from master.
* src/bytecode.c (exec_byte_code): Save VECTOR into stack slot
so that it survives GC.  The stack slot was otherwise unused,
so this doesn’t cost us memory, only a store insn.
2018-10-30 21:17:33 -07:00
Paul Eggert
cf486a7a92 Improve fix for Bug#33014
Although the previously-applied fix worked for its platform,
it doesn’t suffice in general.
* src/bytecode.c (exec_byte_code): Save VECTOR into stack slot
so that it survives GC.  The stack slot was otherwise unused,
so this doesn’t cost us memory, only a store insn.
* src/eval.c (Ffuncall): Do not make FUN volatile, reverting
2018-10-14T19:12:04Z!gazally@runbox.com.  Adding ‘volatile’
does not suffice, since storage for a volatile local can be
reclaimed after its last access (e.g., by tail recursion
elimination), which would make VECTOR invisible to GC.
2018-10-30 20:58:48 -07:00
Eli Zaretskii
ced58d3e15 Improve doc string of 'call-process'
* src/callproc.c (Fcall_process): Clarify DESTINATION in the
doc string.
2018-10-30 13:08:28 +02:00
Gemini Lasswell
0e484c66fd Keep a stack reference to bytecode objects being executed (Bug#33014)
* src/eval.c (Ffuncall): Make local variable 'fun' volatile.
* test/src/eval-tests.el
(eval-tests-byte-code-being-evaluated-is-protected-from-gc):
Add regression test for Bug#33014.
(eval-tests-33014-var): New variable.
(eval-tests-33014-func, eval-tests-33014-redefine): New functions.
2018-10-29 11:05:00 -07:00