1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00
Commit graph

134741 commits

Author SHA1 Message Date
Paul Eggert
bc6ffabe80 emacsclient: fix typo on recent socket-leak change
This ports to POSIXish platforms like macOS that lack SOCK_CLOEXEC.
Fix suggested by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-12/msg00055.html
* lib-src/emacsclient.c (set_local_socket):
Don’t use SOCK_CLOEXEC; that’s cloexec_socket’s job.
2018-12-03 08:08:05 -08:00
Eli Zaretskii
2ff9dca17c Fix WINDOWSNT/DOS_NT build
Recent changes in sysdep.c and emacsclient unnecessarily
removed useful code from DOS_NT builds.  This changeset
reinstates that code.
* nt/inc/ms-w32.h (tcdrain): Redirect to _commit.
(fdatasync): No need to redirect anymore.

* lib-src/emacsclient.c (flush_stdout): Don't avoid calling
tcdrain on DOS_NT platforms.

* src/sysdep.c (reset_sys_modes): Don't ifdef away the call to
tcdrain on DOS_NT platforms.
2018-12-03 12:29:34 +02:00
Paul Eggert
5c412405c7 emacsclient: don’t leak socket to child processes
* lib-src/emacsclient.c [!WINDOWSNT]: Include fcntl.h.
(cloexec_socket): New function.
(set_tcp_socket, set_local_socket): Use it.
2018-12-02 23:55:01 -08: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
Paul Eggert
25a33aa2d1 Update from Gnulib
This incorporates:
2018-11-30 memrchr: port better to clang
2018-11-21 mktime: add libc-config dependency
* build-aux/config.guess, build-aux/config.sub, lib/memrchr.c:
Copy from Gnulib.
* m4/gnulib-comp.m4: Regenerate.
2018-12-02 23:55:00 -08:00
Paul Eggert
3e5d775545 emacsclient: fix symlink/socket race
* lib-src/emacsclient.c (socket_status): New arg UID.
All uses changed.
(set_local_socket): Don’t create the unbound socket unless the
initial sanity checks on the socket file succeed; this
simplifies cleaning it up.  Check socket ownership again
after connecting, to fix a race (Bug#33366).
2018-12-02 23:55:00 -08:00
Glenn Morris
e5634aae53 Merge from origin/emacs-26
745c9c0 (origin/emacs-26) Revert "Revert "Fix infloop in GC mark_kboa...
c418c85 Revert "Fix infloop in GC mark_kboards"
8fa0d96 * lisp/emacs-lisp/subr-x.el (if-let, when-let): Doc fix: acti...
2018-12-02 10:32:25 -08:00
Glenn Morris
5f6d7a4f9d ; Merge from origin/emacs-26
The following commit was skipped:

af914fc Fix infloop in GC mark_kboards
2018-12-02 10:32:25 -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
Glenn Morris
e8586d46f7 ; Merge from origin/emacs-26
The following commit was skipped:

42320cc ; Auto-commit of loaddefs files.
2018-12-02 10:32:24 -08:00
Glenn Morris
3895e2229f Merge from origin/emacs-26
e06562c Fix "M-x man" when there's no 'man' program on PATH
2018-12-02 10:32:24 -08:00
Glenn Morris
fa9411eddc ; Merge from origin/emacs-26
The following commit was skipped:

7ecf49b Fix core dump in dbus-message-internal
2018-12-02 10:32:24 -08:00
Glenn Morris
4d66f9fe5e Merge from origin/emacs-26
cc3ad9a ; * CONTRIBUTE: Clarify rules for committing to release branc...
a89dbe2 * doc/misc/dbus.texi (Type Conversion): Fix typo.  (Bug#33551)
03ee726 ; Add comment to `customize-package-emacs-version-alist'
bce1d1a Improve documentation of gdb-mi.el
2018-12-02 10:32:23 -08:00
Glenn Morris
2064cd4c9b ; Merge from origin/emacs-26
The following commit was skipped:

809989f LDAP: Set process-connection-type to t on Darwin
2018-12-02 10:32:23 -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
92282cb502 emacsclient: prefer XDG_RUNTIME_DIR (Bug#33367)
* lib-src/emacsclient.c: Disable -Wformat-truncation=2,
to avoid false alarms about the new snprintf calls.
(local_sockname): New function.
(set_local_socket): Use it.  Prefer XDG_RUNTIME_DIR (if set)
for location of socket directory.  Avoid unnecessary memory
allocation by using snprintf to destination.
* lisp/server.el (server-socket-dir): Prefer XDG_RUNTIME_DIR if set.
2018-12-01 23:08:48 -08:00
Glenn Morris
8fa0d9679d * lisp/emacs-lisp/subr-x.el (if-let, when-let): Doc fix: active voice. 2018-12-01 17:21:29 -08: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
317b354782 ; Add notes about cross-compiling macOS versions 2018-12-01 17:14:27 +00: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
Stefan Monnier
070ef95c10 * lisp/calendar/holidays.el: Use lexical-binding
Remove redundant :group arguments.
(holiday-sexp): Bind 'year' and 'date' dynamically for 'sexp' and 'string'.
2018-12-01 09:43:37 -05:00
Stefan Monnier
c03574b477 * etc/NEWS-*: Fix capitalization of "Emacs" 2018-12-01 09:32:57 -05:00
Glenn Morris
a8d178816a ; Auto-commit of loaddefs files. 2018-12-01 07:23:22 -05:00
Glenn Morris
42320cc8ca ; Auto-commit of loaddefs files. 2018-12-01 06:23:51 -05:00
Eli Zaretskii
e06562ce7c Fix "M-x man" when there's no 'man' program on PATH
* lisp/man.el (Man-bgproc-sentinel): Make sure the process
buffer is not read-only when inserting a message into it.
(Bug#33510)
2018-12-01 11:30:41 +02: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
Eli Zaretskii
cc3ad9a3d1 ; * CONTRIBUTE: Clarify rules for committing to release branches. 2018-11-30 13:07:40 +02:00
Michael Albinus
c53e7f2c23 Fix Bug#33556
* lisp/autorevert.el (auto-revert-notify-add-watch):
Assert that a key in `auto-revert-notify-watch-descriptor-hash-list'
is a valid file notification descriptor.  (Bug#33556)
2018-11-30 12:04:57 +01:00
Michael Albinus
a89dbe2af8 * doc/misc/dbus.texi (Type Conversion): Fix typo. (Bug#33551) 2018-11-30 11:31:16 +01:00
Michael Albinus
03ee726f98 ; Add comment to `customize-package-emacs-version-alist' 2018-11-30 11:14:54 +01:00
Eli Zaretskii
bce1d1afab Improve documentation of gdb-mi.el
* lisp/progmodes/gdb-mi.el (gdb-show-changed-values)
(gdb-max-children): Doc fixes.

* doc/emacs/building.texi (Source Buffers, Stack Buffer)
(GDB User Interface Layout): Mention some additional
customizable variables.  (Bug#33548)
2018-11-30 10:45:28 +02: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
Filipp Gunbin
3b852da52f LDAP: Set process-connection-type to t
* lisp/net/ldap.el (ldap-search-internal): Set
  process-connection-type to t.  (Bug#33050)
2018-11-29 17:00:09 +03:00
Thomas Fitzsimmons
809989f79e LDAP: Set process-connection-type to t on Darwin
* lisp/net/ldap.el (ldap-search-internal): Set
process-connection-type to t on Darwin.  Do not merge to
master.  (Bug#33050)
2018-11-29 12:39:34 +02:00
Glenn Morris
85ce716849 * lisp/emacs-lisp/bytecomp.el: Don't load compile at runtime.
It isn't needed and slows down compiling other files.
2018-11-28 19:45:36 -08:00
Eric Abrahamsen
e8d7e3a59a Further small tweaks to Gnus modes cleanup
* lisp/gnus/gnus-sum.el: Remove explicit definition of
  `gnus-summary-mode-hook', this is now created automatically.
* lisp/gnus/nnir.el (nnir-open-server): Attach `nnir-mode' to the
  `gnus-summary-prepared-hook', instead of
  `gnus-summary-mode-hook'. The latter no longer has access to the
  buffer-local value of `gnus-newsgroup-name', which `nnir-mode'
  needs.
2018-11-28 09:31:40 -08: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
2c59cfa831 ; Merge from origin/emacs-26
The following commit was skipped:

ea62462 Set tooltip text color (bug#33452)
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
Michael Albinus
febdedfa8d ; Fix an oversight in tramp-smb.el 2018-11-28 16:46:49 +01:00
Michael Albinus
9b9c70b7db Tramp cleanup
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions)
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-read-file-entry):
Use `string-match-p'.

* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
Set file properties more robust.

* lisp/net/tramp-sh.el (tramp-stat-marker)
(tramp-convert-file-attributes): Add tramp-autoload cookie.
2018-11-28 16:38:49 +01:00
Alan Mackenzie
1ca436a33c Make compilation mode work with warnings from compiled buffer functions
In particular, warning messages from compile_defun now contain the source
buffer name and line and column numbers.  Typing CR on such a warning now
moves to the pertinent place in the source buffer.

This fixes bug #33475

* lisp/emacs-lisp/bytecomp.el (top-level): Require compile.elc?.
(emacs-lisp-compilation-file-name-or-buffer)
(emacs-lisp-compilation-parse-errors-filename-function): New
variables/constants.
(emacs-lisp-compilation-mode): New mode derived from compilation-mode.
(byte-compile-log-file): Check byte-compile-current-file for being a string,
not merely non-nil.  Change wording in message from "buffer" to "in buffer".
Go into emacs-lisp-compilation-mode rather than the plain compilation-mode.
(compile-defun): Bind byte-compile-current-file to current-buffer, not nil.

* lisp/progmodes/compilation-mode
(compilation-parse-errors-filename-function): Amend comments to specify that
this function may return a buffer, and that it need not save the match data.
(Several places): Amend comments to allow for the use of a buffer rather than
a file name.
(compilation-next-error-function): If the "file name" in file struct is
actually a buffer, use it rather than compilation-find-file's result.
(compilation-get-file-structure): save-match-data around the call to
compilation-parse-errors-filename-function.  Only call
command-line-normalize-file-name when `filename' is a string.
2018-11-28 13:19:04 +00:00
Eli Zaretskii
74a3a795af Fix a typo in a doc string
* lisp/emacs-lisp/map-ynp.el (read-answer-short): Fix typo.
(Bug#33528)
2018-11-28 09:28:36 +02:00
Eli Zaretskii
911766d419 Minor markup fix in frames.texi
* doc/lispref/frames.texi (Frame Layout): Fix markup of @table
entries.  (Bug#33531)
2018-11-28 09:22:00 +02: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
Glenn Morris
19ed1e9a5f * lisp/net/trampver.el (customize-package-emacs-version-alist):
Add 2.3.3.
2018-11-27 20:24:05 -08:00
Glenn Morris
d7132ad870 * lisp/mh-e/mh-e.el (customize-package-emacs-version-alist): Additions. 2018-11-27 20:19:59 -08:00
Glenn Morris
5f3926053e * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Pass format to message. 2018-11-27 08:24:33 -08:00