1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-09 21:20:45 -08:00
Commit graph

138363 commits

Author SHA1 Message Date
Paul Eggert
c19f5dcd47 Fix file name encoding when open_directory signals
* src/dired.c (open_directory): New arg ENCODED_DIRNAME.
All callers changed.  Signal error with original name,
not encoded name.
2019-09-12 00:27:38 -07:00
Paul Eggert
ffa870fc80 Improve error reporting for DOC file problems
* src/doc.c (get_doc_string): Report all serious errors
when DOC cannot be opened, not just fd-exhaustion errors.
2019-09-11 23:46:58 -07:00
Paul Eggert
f7228a6479 Fix directory-files-and-attributes race
* src/dired.c (directory_files_internal): Fix race condition:
when some other process removed a file between the readdir and
the ensuing lstat, directory-files-and-attributes would return
a list containing nil.
2019-09-11 23:23:22 -07:00
Paul Eggert
ef926ce3b6 Omit duplicate test of current directory
* src/callproc.c (encode_current_directory): Remove redundant
call to Ffile_accessible_directory_p.  The code checks the
encoded name with file_accessible_directory_p anyway.
2019-09-11 14:24:29 -07:00
Paul Eggert
5fafa40d07 Improve checking of pdump load failures
* src/alloc.c (memory_full): Just report "memory exhausted" if
failure occurs during initialization, since fancier recovery
schemes are not likely to work when not initialized.
* src/emacs.c (dump_error_to_string): Accept int, not enum
pdumper_load_result, since the result might not fit in the
enum.  Use strerror if it was derived from errno.  This is for
better diagnostics of pdump load failures.
(load_pdump_find_executable): Return char *, not enum.  2nd
arg is now pointer to buffer size, rather than pointer to
pointer to buffer.  All callers changed.  Use Emacs allocator
since they should now be OK even during early startup.
Use check_executable instead access, to use effective rather
than real permissions.
(load_pdump): Return void since callers ignore result.
Use int where enum could be too narrow.  Use heap rather
than stack for possibly-long string.  Prefer ptrdiff_t to
size_t.
* src/fileio.c (check_executable): Now extern.
* src/pdumper.c (pdumper_load): Return int that may have
errno added to it, for better diagnostics when loads fail.
2019-09-11 11:27:14 -07:00
Paul Eggert
a6daae7b3d Reset dbus registered buses on dump load
Problem reported by Leonard Lausen (Bug#37331).
* src/dbusbind.c: Include pdumper.h.
(syms_of_dbusbind_for_pdumper):
New function, to reset the registered buses.
(syms_of_dbusbind): Use it, fixing a TODO.
2019-09-11 10:19:31 -07:00
Paul Eggert
636856faa4 Fix auto-save with user-emacs-directory
* lisp/startup.el (auto-save-list-file-prefix): Delay initialization,
since the value depends on user-emacs-directory (Bug#37354).
2019-09-11 08:50:41 -07:00
Mattias Engdegård
4d90fadf27 * lisp/emacs-lisp/elint.el (elint-directory-skip-re): Fix doc typo. 2019-09-11 11:18:38 +02:00
Katsumi Yamaoka
4b9f9324a8 Create a new overlay used to mark Attachment header (bug#37370)
* lisp/gnus/gnus-art.el (gnus-mime-inline-part)
(gnus-mm-display-part, gnus-mime-buttonize-attachments-in-header):
Create a new overlay used to mark Attachment header instead of
using existing overlays.
2019-09-11 02:41:34 +00:00
Stephen Leake
3d44231288 Merge commit '74e9799bd8' 2019-09-10 03:37:51 -07:00
Stephen Leake
ac1a2e260e Support `cl-defstruct' in autoloads
* lisp/emacs-lisp/autoload.el (make-autoload): Add `cl-defstruct' to
"complex cases" list.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add :autoload-end to
limit what is declared in autoloads.el for a defstruct.
2019-09-10 03:36:15 -07:00
Ulf Jasper
74e9799bd8 Handle missing start-time when importing ical event (Bug#33277)
* lisp/calendar/icalendar.el (icalendar--convert-ical-to-diary): Set
start time only if it is explicitly given in ical.  Do not use
start-time as default for end-time (Bug#33277).

* test/lisp/calendar/icalendar-tests.el (icalendar-import-bug-33277):
New.  Test fix for Bug#33277.
2019-09-09 18:35:02 +02:00
Stefan Kangas
4042dad139 Match Python 3 code object names in "M-x pdb"
* lisp/progmodes/gud.el (gud-pdb-marker-regexp): Match Python 3 code
object names.  (Bug#11679)
2019-09-09 04:33:07 +02:00
Stefan Kangas
a1e93c1633 ; * lisp/ps-print.el: Doc fix. 2019-09-09 01:13:54 +02:00
Stefan Kangas
c86f91caf0 Remove final XEmacs compat code from dframe.el
* lisp/dframe.el (top-level): Doc fix.
(dframe-frame-parameter): Redefine as an obsolete function alias for
'frame-parameter'.
2019-09-09 01:13:54 +02:00
Stefan Monnier
69db930c7e * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define setter functions.
When :noinline is specified one can't rely on setf expanding the
inlinable function to construct the setter.
Fixes bug#37283.
2019-09-08 18:41:43 -04:00
Stefan Kangas
e94d01f1ac Remove support for upgrading from old bookmark file format
* lisp/bookmark.el (bookmark-alist-from-buffer): Remove support for
old bookmark file format.  (Bug#37122)
(bookmark-upgrade-version-0-alist)
(bookmark-upgrade-file-format-from-0)
(bookmark-grok-file-format-version)
(bookmark-maybe-upgrade-file-format): Declare obsolete.
(bookmark-load): Don't call 'bookmark-maybe-upgrade-file-format'.
* etc/NEWS: Announce it.
2019-09-08 22:48:20 +02:00
Juri Linkov
7f85a5569d * lisp/tmm.el: Fix broken tmm-prompt (bug#34517)
* lisp/tmm.el (tmm-prompt): Don't duplicate items of tmm--history.
Don't reverse tmm-km-list for completion.  Don't set the initial
position of 'tmm--history.  Use reverse tmm--history as the list
of default values for M-n.
(tmm-add-prompt): Don't insert initial value to the minibuffer.
2019-09-08 23:27:23 +03:00
Alan Mackenzie
034f9363e3 Fix untidinesses in compile.el.
* lisp/progmodes/compile.el (compilation--margin-string): Renamed from
compilation-margin-string.  Use defconst rather than defvar.  Use propertize
rather than a separate put-text-property.  Trim the doc string.
2019-09-08 10:44:27 +00:00
Michael Albinus
d42d46d111 Fix Bug#36090
* lisp/vc/vc-hg.el (vc-hg--pushpull, vc-hg-merge-branch)
(vc-hg-command): Disable pager.  (Bug#36090)
2019-09-08 12:01:41 +02:00
Michael Albinus
f8143323c7 Fix Bug#37202
* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Use truename of
`shadow-test-remote-temporary-file-directory'.  (Bug#37202)
2019-09-08 10:13:13 +02:00
Paul Eggert
b6b7c7fc98 Fix bug when gc-cons-percentage is bumped to 0.8
Problem reported by Michael Heerdegen (Bug#37321).
* src/alloc.c (gc_threshold): New static var.
(bump_consing_until_gc): Change args from DIFF to THRESHOLD and
PERCENTAGE.  All uses changed.  When accounting for a changed
gc-cons-percentage, do not assume that total_bytes_of_live_objects
returns the same value now that it did the last time we were
called.
2019-09-07 18:08:44 -07:00
Stefan Kangas
8e93e6da7c Use derived-mode-p consistently in info.el
* lisp/info.el (Info-hide-note-references, info-display-manual)
(info--manual-names): Use derived-mode-p.  (Bug#27583)
2019-09-08 00:17:25 +02:00
Noam Postavsky
8c0ae0f93a Let byte-compiler recognize that local-variable-p implies boundp
* lisp/emacs-lisp/bytecomp.el (byte-compile-maybe-guarded): Add
arguments to local-variable-p to the bound list.
* lisp/image-mode.el (image-toggle-display-image): Remove no longer
needed boundp check.
2019-09-07 17:00:39 -04:00
Joel Rosdahl
8d588f09e9 Fix flymake-proc temporary file deletion bug
* list/progmodes/flymake-proc.el (flymake-proc-create-temp-inplace):
Include a time string part (hour + minute + second + nanosecond) in
the temporary name to make it unique enough.
(flymake-proc-legacy-flymake): Store temporary file names in the
process for usage in the sentinel.
(flymake-proc--process-sentinel): Bind values of temporary file names
dynamically to values stored in the process so that the cleanup
function will delete the correct temporary file(s).

Fixes bug#31981.
2019-09-07 16:51:24 -04:00
Eli Zaretskii
14875443ff Support visiting compressed image files
* lisp/image-mode.el (image-toggle-display-image): Support
visiting compressed image files which are uncompressed by
jka-compr.el.  (Bug#37330)
2019-09-07 15:53:57 +03:00
Michael Albinus
01a04880ca Add traces in shadowfile
* lisp/shadowfile.el (shadow-add-to-todo)
(shadow-remove-from-todo, shadow-save-todo-file):
* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo):
Add traces.
2019-09-07 12:31:31 +02:00
Evgeny Zajcev
52f83af1f3 Fix input method operation on read-only text
* lisp/international/quail.el (quail-input-method): Check also
read-only property of text in addition to the buffer's
read-only state.
2019-09-07 13:04:36 +03:00
Eli Zaretskii
40eb4c51a4 ; (server-goto-toplevel): Fix comment to reflect the code. 2019-09-07 12:42:52 +03:00
Eli Zaretskii
cac8152c8e Allow client connections when in recursive-edit
* lisp/server.el (server-goto-toplevel): Check minibuffer
depth, not recursion depth.  This avoids exiting
recursive-edit if a client connection is accepted during
recursive-edit.  (Bug#37176)
2019-09-07 12:33:03 +03:00
Eli Zaretskii
f34f49f35e Set inhibit-compacting-font-caches to t by default on MS-Windows
* src/font.c (syms_of_font) [WINDOWSNT]: Set
inhibit-compacting-font-caches to t by default.

* etc/NEWS: Mention the change.
2019-09-07 12:26:08 +03:00
Eli Zaretskii
7eaca940ce Allow Zs characters to be composed
* src/composite.c (char_composable_p): Allow SPC and other Zs
characters to be composed.

* lisp/composite.el (compose-gstring-for-graphic): Don't
reject characters whose general category is Zs.  (Bug#14461)
2019-09-07 12:19:06 +03:00
Eli Zaretskii
f425099559 Revert "file-truename now uses realpath for local files"
This reverts commit a59839d755.
This commit broke the MS-Windows build (because there's no
realpath on MS-Windows).  Even if I change the implementation
to always signal an error on MS-Windows, the build fails.
2019-09-07 10:14:31 +03:00
Paul Eggert
a59839d755 file-truename now uses realpath for local files
This uses fewer syscalls on GNU/Linux and other GNUish platforms.
* lisp/files.el (file-truename): Try fileio--truename
if there are no handlers.
* src/fileio.c: Include stdlib.h, for realpath.
(Ffileio__truename): New function.
2019-09-06 14:31:38 -07:00
Mauro Aranda
5b117511aa Improve file name completion in file and directory widgets (Bug#7779)
* lisp/wid-edit.el (widget 'file, widget 'directory): Respect the option
read-file-name-completion-ignore-case.
(widget 'directory): Filter the file names, to only perform directory name
completion.
2019-09-06 17:02:08 -04:00
Amin Bandali
ff0f4c7312 Fix erc-lurker-update-status (bug#36843)
Broken since 2013-08-22 "* lisp/erc/erc.el: Use lexical-binding".

* lisp/erc/erc.el (erc-message-parsed): New variable.
(erc-display-message): Dynamically bind it.
(erc-lurker-update-status): Check it instead of using `parsed'
directly.  This results in `erc-lurker-state' being properly updated
to keep track of non-lurkers, and thus `erc-lurker-p' returning
correct results rather than return t for everyone.
2019-09-05 19:56:14 -04:00
Paul Eggert
16ab25f136 Fix bugs when recalculating consing_until_gc
Problem reported by Joseph Mingrone (Bug#37006#72).
* src/alloc.c (watch_gc_cons_threshold)
(watch_gc_cons_percentage):
Don’t try to store an intmax_t into an int.
Redo to make the code clearer.
(watch_gc_cons_percentage):
Use gc_cons_threshold, not consing_until_gc.
2019-09-05 13:27:07 -07:00
Paul Eggert
b9e37f551a Port :safe-renegotiation test to GnuTLS < 3.6.3
Problem reported by Robert Pluim in
https://lists.gnu.org/r/emacs-devel/2019-09/msg00127.html
* src/gnutls.c (Fgnutls_peer_status): Simplify test for
whether the :safe-renegotiation result is needed, so that it
works all the way back to GnuTLS 2.12.2.
2019-09-05 11:43:15 -07:00
Lars Ingebrigtsen
2180852c72 Further fix for network-security-protocol-checks
* lisp/net/nsm.el (network-security-protocol-checks): Fix the
defcustom type some more (bug#37306).
2019-09-05 13:26:08 +02:00
Lars Ingebrigtsen
71964ccc10 Fix defcustom type of network-security-protocol-checks
* lisp/net/nsm.el (network-security-protocol-checks): Fix the
defcustom type (bug#37306).
2019-09-05 13:23:11 +02:00
Paul Eggert
365dad197b Use plain ‘static’ for Emacs C inline functions
This improved performance of ‘make compile-always’ by 8.2%
on my platform (AMD Phenom II X4 910e, Fedora 30 x86-64).
* src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
(INLINE_HEADER_END) [!EMACS_EXTERN_INLINE]: Use plain ‘static’.
2019-09-04 23:15:04 -07:00
Paul Eggert
507d554834 Tweak xd_append_arg to pacify -Wnull-dereference
* src/dbusbind.c (xd_append_arg): Redo to pacify gcc
-Wnull-dereference.  Also, check that the Lisp string won’t
overrun the C signature buffer.
2019-09-04 17:44:15 -07:00
Robert Pluim
95becaaf3b Don't check for :safe-renegotiation with TLS1.3
* lisp/net/nsm.el (nsm-protocol-check--renegotiation-info-ext): Don't
check when using TLS1.3, renegotiation has been removed from TLS.
Reported in
<https://lists.gnu.org/archive/html/help-gnu-emacs/2019-09/msg00005.html>
2019-09-04 23:46:31 +02:00
Paul Eggert
a843266113 Don’t mention :safe-renegotiation in TLS 1.3
* src/gnutls.c (Fgnutls_peer_status): Don’t put the
safe-renegotiation indication into the status in TLS 1.3, which
removed support for renegotiation.
2019-09-04 23:46:31 +02:00
Robert Pluim
fc9ed61a43 Fix nsm for unencrypted connections
When connecting using a cleartext connection, nsm was erroring out and
tearing down the connection because it was trying to display
nonexistent certificate information.

* lisp/net/nsm.el (nsm-query-user): Only format certificate status
when it is valid.  (Bug#37221)
2019-09-04 23:46:31 +02:00
Paul Eggert
d607067dd7 Port pdumper mmap to AIX
* src/pdumper.c (needs_mmap_retry_p) [_AIX]: Return true.
Problem observed on AIX 7.1 and 7.2 in GCC compile farm.
2019-09-04 11:17:48 -07:00
Paul Eggert
d5d6772dfb Port to platforms with Xrender lib but not header
* configure.ac (HAVE_XRENDER): Also require ‘#include
<X11/extensions/Xrender.h>’ to work.  Problem found
on gcc119 in GCC compile farm.
2019-09-04 11:17:48 -07:00
Mattias Engdegård
2aee20fbf8 Correct arguments to `skip-syntax-forward'
* lisp/wid-edit.el (widget-sexp-validate): Fix bad calls to
`skip-syntax-forward', whose argument is not a regexp.
2019-09-04 16:27:02 +02:00
Lars Ingebrigtsen
4c3a40a9b7 Make the NSM not pop up an X dialogue on non-mouse actions
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Don't pop up X
dialogues on (url-retrieve "https://expired.badssl.com/" #'ignore)
and the like.
2019-09-04 15:20:00 +02:00
Lars Ingebrigtsen
9df72ecb63 Preserve more markers when reverting .gpg files
* lisp/epa-file.el (epa-file--replace-text): Gingerly replace the
text in the buffer to preserve as many markers as possible
(bug#34720).  This emulates the behaviour of Finsert_file_contents
more accurately.
(epa-file-decode-and-insert): Remove compat code.
(epa-file-insert-file-contents): Use the new function.

* lisp/emacs-lisp/cl-lib.el (cl-incf): Add autoload cookie.
2019-09-04 15:20:00 +02:00