]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoImprove print output options commands in backtrace-mode (bug#36566)
Gemini Lasswell [Tue, 30 Jul 2019 17:00:27 +0000 (10:00 -0700)]
Improve print output options commands in backtrace-mode (bug#36566)

* lisp/emacs-lisp/backtrace.el (backtrace-view): Mention
:print-gensym in docstring.
(backtrace-mode-map): Add keyboard binding for
backtrace-toggle-print-gensym.  Add menu entries for
backtrace-toggle-print-circle and backtrace-toggle-print-gensym.
(backtrace--with-output-variables): Bind print-gensym with value
of :print-gensym found in view plist.
(backtrace-toggle-print-circle): Remove description of
implementation details from docstring.
(backtrace-toggle-print-gensym): New command.
(backtrace--toggle-feature): Add echo area message describing result
of command.

* test/lisp/emacs-lisp/backtrace-tests.el
(backtrace-tests--print-circle): New test.

* doc/lispref/debugging.texi (Backtraces): Document keyboard
binding for backtrace-toggle-print-gensym.

5 years ago* lisp/help-mode.el (help-mode-menu): Fix typo. (Bug#36485)
Stefan Kangas [Mon, 1 Jul 2019 06:45:24 +0000 (08:45 +0200)]
* lisp/help-mode.el (help-mode-menu): Fix typo.  (Bug#36485)

5 years ago* doc/misc/efaq.texi: Update ancient formats. (Bug#37143)
Stefan Kangas [Thu, 22 Aug 2019 14:11:52 +0000 (16:11 +0200)]
* doc/misc/efaq.texi: Update ancient formats. (Bug#37143)

5 years agoRemove leftover XEmacs compat code and doc fixes
Stefan Kangas [Fri, 13 Sep 2019 16:06:31 +0000 (18:06 +0200)]
Remove leftover XEmacs compat code and doc fixes

* lisp/mail/feedmail.el (top-level): Remove outdated comment.
(feedmail-run-the-queue): Remove leftover XEmacs compat code.
(feedmail-nuke-bcc): Doc fix.

* lisp/emulation/viper.el (top-level, viper-mode)
* lisp/net/rfc2104.el (top-level): Doc fix.

* lisp/textmodes/table.el (top-level): Remove obsolete todo.

5 years agoChange gui--selection-value-internal comment into doc string
Stefan Kangas [Fri, 13 Sep 2019 12:53:41 +0000 (14:53 +0200)]
Change gui--selection-value-internal comment into doc string

* lisp/select.el (gui--selection-value-internal): Change comment into
doc string.  (Bug#25528)

5 years ago; Fix a typo by last commit
Michael Albinus [Fri, 13 Sep 2019 12:33:06 +0000 (14:33 +0200)]
; Fix a typo by last commit

5 years ago; Add traces in shadowfile.el
Michael Albinus [Fri, 13 Sep 2019 12:25:56 +0000 (14:25 +0200)]
; Add traces in shadowfile.el

5 years agoFix problems in tramp-test33-environment-variables
Michael Albinus [Fri, 13 Sep 2019 10:08:34 +0000 (12:08 +0200)]
Fix problems in tramp-test33-environment-variables

* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Use ${parameter:-word} construct.  Remove PS1 entry from
"printenv" output.
(tramp--test-check-files): Use "printenv".

5 years agoMake recent Tramp patch work for tramp-archive.el
Michael Albinus [Fri, 13 Sep 2019 10:08:02 +0000 (12:08 +0200)]
Make recent Tramp patch work for tramp-archive.el

* lisp/net/tramp.el (tramp-connectable-p): Make it work also for
tramp-archive.el.

5 years agoFix assertion violations due to non-ASCII text in menus
Eli Zaretskii [Fri, 13 Sep 2019 07:47:28 +0000 (10:47 +0300)]
Fix assertion violations due to non-ASCII text in menus

* src/xdisp.c (tool_bar_height, redisplay_tool_bar)
(display_menu_bar): If the Lisp string to be displayed in the
menu-bar or tool-bar window is multibyte, tell the display
engine to treat it as multibyte, instead of relying on the
initial determination by init_iterator (which is based on the
multibyteness of the current buffer).  (Bug#37385)

5 years agoFix saving user-defined calc commands with compositions (Bug#36720)
Jack Coughlin [Thu, 18 Jul 2019 15:16:50 +0000 (08:16 -0700)]
Fix saving user-defined calc commands with compositions (Bug#36720)

* lisp/calc/calc-prog.el (calc-user-define-permanent): Correctly save
the composition when the user specifies their formula by its command
name or key.

Copyright-paperwork-exempt: yes

5 years agoFix fill-paragraph in python docstrings (Bug#36056)
Noam Postavsky [Sun, 8 Sep 2019 14:42:19 +0000 (10:42 -0400)]
Fix fill-paragraph in python docstrings (Bug#36056)

* lisp/progmodes/python.el (python-do-auto-fill): New function.
(python-mode): Set it as normal-auto-fill-function, and don't set
fill-indent-according-to-mode.  Having the latter set during
fill-paragraph gives wrongs result, because python-indent-line doesn't
remove indentation added by filling.
* test/lisp/progmodes/python-tests.el (python-fill-docstring): New
test.

5 years ago* lisp/progmodes/sh-script.el (sh--assignment-collect): Only after `=`!
Stefan Monnier [Thu, 12 Sep 2019 19:43:50 +0000 (15:43 -0400)]
* lisp/progmodes/sh-script.el (sh--assignment-collect): Only after `=`!

5 years ago* lisp/progmodes/sh-script.el (sh-mode-map): Don't bind `=`
Stefan Monnier [Thu, 12 Sep 2019 18:26:40 +0000 (14:26 -0400)]
* lisp/progmodes/sh-script.el (sh-mode-map): Don't bind `=`

(sh-shell-initialize-variables): Use sh--assignment-collect on
post-self-insert-hook instead.
(sh--assignment-collect): New function, extracted from sh-assignment.
(sh-assignment): Use it and mark as obsolete.

5 years agoAdd `isearch-yank-until-char'
Karl Fogel [Thu, 12 Sep 2019 17:42:13 +0000 (12:42 -0500)]
Add `isearch-yank-until-char'

* lisp/isearch.el (isearch-yank-until-char): New function.
  (isearch-mode-map, isearch-menu-bar-yank-map): Add it.
  (isearch-forward): Document the new binding.

* doc/emacs/search.texi (Isearch Yanking): Document the feature.

* etc/NEWS: Mention the above.

5 years agoOptimize host name completion in Tramp
Michael Albinus [Thu, 12 Sep 2019 14:38:48 +0000 (16:38 +0200)]
Optimize host name completion in Tramp

* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
Throw `non-essential' at the beginning of the function.

* lisp/net/tramp.el (tramp-handle-file-exists-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-exists-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-exists-p):
Run only when host is connectable.  This is due to host name
completion, which shall be optimized.

* lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat)
(tramp-smb-get-file-entries): Access connection buffer only after
sending the command.

* lisp/net/tramp.el (tramp-get-buffer, tramp-get-connection-buffer):
New argument DONT-CREATE.
(tramp-message): Use it.
(tramp-get-mutex): Check, whether host is connectable.
(tramp-file-name-handler): Set thread only when host is connectable.
(tramp-connectable-p): Allow also VEC as argument.
(tramp-completion-handle-file-name-completion): Do not expand directory.

5 years ago* src/profiler.c: Leave `key` hashslots as Qunbound (bug#37382)
Stefan Monnier [Thu, 12 Sep 2019 12:25:13 +0000 (08:25 -0400)]
* src/profiler.c: Leave `key` hashslots as Qunbound (bug#37382)

Now that "key == Qunbound" is used to determine if a hash table entry
is available, we can't stash pre-allocated vectors into the `key` slot
anymore, so use the `value` slot instead.

(make_log): Pre-fill the `value` slots i.s.o `key`.
(evict_lower_half): Stash key back into `value`, i.s.o `key`.
(record_backtrace): Get pre-allocated vector for `value` i.s.o `key`.

5 years agoFix file name encoding when open_directory signals
Paul Eggert [Thu, 12 Sep 2019 07:25:47 +0000 (00:25 -0700)]
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.

5 years agoImprove error reporting for DOC file problems
Paul Eggert [Thu, 12 Sep 2019 06:45:32 +0000 (23:45 -0700)]
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.

5 years agoFix directory-files-and-attributes race
Paul Eggert [Thu, 12 Sep 2019 06:22:46 +0000 (23:22 -0700)]
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.

5 years agoOmit duplicate test of current directory
Paul Eggert [Wed, 11 Sep 2019 21:24:03 +0000 (14:24 -0700)]
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.

5 years agoImprove checking of pdump load failures
Paul Eggert [Wed, 11 Sep 2019 18:26:07 +0000 (11:26 -0700)]
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.

5 years agoReset dbus registered buses on dump load
Paul Eggert [Wed, 11 Sep 2019 17:19:07 +0000 (10:19 -0700)]
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.

5 years agoFix auto-save with user-emacs-directory
Paul Eggert [Wed, 11 Sep 2019 15:50:02 +0000 (08:50 -0700)]
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).

5 years ago* lisp/emacs-lisp/elint.el (elint-directory-skip-re): Fix doc typo.
Mattias Engdegård [Wed, 11 Sep 2019 09:18:38 +0000 (11:18 +0200)]
* lisp/emacs-lisp/elint.el (elint-directory-skip-re): Fix doc typo.

5 years agoCreate a new overlay used to mark Attachment header (bug#37370)
Katsumi Yamaoka [Wed, 11 Sep 2019 02:41:34 +0000 (02:41 +0000)]
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.

5 years agoMerge commit '74e9799bd89484b8d15bdd6597c68fc00d07e7f7'
Stephen Leake [Tue, 10 Sep 2019 10:37:51 +0000 (03:37 -0700)]
Merge commit '74e9799bd89484b8d15bdd6597c68fc00d07e7f7'

5 years agoSupport `cl-defstruct' in autoloads
Stephen Leake [Tue, 10 Sep 2019 10:36:15 +0000 (03:36 -0700)]
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.

5 years agoHandle missing start-time when importing ical event (Bug#33277)
Ulf Jasper [Mon, 9 Sep 2019 16:35:02 +0000 (18:35 +0200)]
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.

5 years agoMatch Python 3 code object names in "M-x pdb"
Stefan Kangas [Mon, 9 Sep 2019 02:14:50 +0000 (04:14 +0200)]
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)

5 years ago; * lisp/ps-print.el: Doc fix.
Stefan Kangas [Sun, 8 Sep 2019 23:04:23 +0000 (01:04 +0200)]
; * lisp/ps-print.el: Doc fix.

5 years agoRemove final XEmacs compat code from dframe.el
Stefan Kangas [Sun, 8 Sep 2019 22:24:18 +0000 (00:24 +0200)]
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'.

5 years ago* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define setter functions.
Stefan Monnier [Sun, 8 Sep 2019 22:41:43 +0000 (18:41 -0400)]
* 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.

5 years agoRemove support for upgrading from old bookmark file format
Stefan Kangas [Mon, 1 Jul 2019 14:16:06 +0000 (16:16 +0200)]
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.

5 years ago* lisp/tmm.el: Fix broken tmm-prompt (bug#34517)
Juri Linkov [Sun, 8 Sep 2019 20:27:23 +0000 (23:27 +0300)]
* 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.

5 years agoFix untidinesses in compile.el.
Alan Mackenzie [Sun, 8 Sep 2019 10:44:27 +0000 (10:44 +0000)]
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.

5 years agoFix Bug#36090
Michael Albinus [Sun, 8 Sep 2019 10:01:41 +0000 (12:01 +0200)]
Fix Bug#36090

* lisp/vc/vc-hg.el (vc-hg--pushpull, vc-hg-merge-branch)
(vc-hg-command): Disable pager.  (Bug#36090)

5 years agoFix Bug#37202
Michael Albinus [Sun, 8 Sep 2019 08:13:13 +0000 (10:13 +0200)]
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)

5 years agoFix bug when gc-cons-percentage is bumped to 0.8
Paul Eggert [Sun, 8 Sep 2019 01:08:12 +0000 (18:08 -0700)]
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.

5 years agoUse derived-mode-p consistently in info.el
Stefan Kangas [Tue, 27 Aug 2019 01:36:05 +0000 (03:36 +0200)]
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)

5 years agoLet byte-compiler recognize that local-variable-p implies boundp
Noam Postavsky [Sat, 7 Sep 2019 21:00:39 +0000 (17:00 -0400)]
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.

5 years agoFix flymake-proc temporary file deletion bug
Joel Rosdahl [Wed, 28 Aug 2019 19:00:00 +0000 (21:00 +0200)]
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.

5 years agoSupport visiting compressed image files
Eli Zaretskii [Sat, 7 Sep 2019 12:53:57 +0000 (15:53 +0300)]
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)

5 years agoAdd traces in shadowfile
Michael Albinus [Sat, 7 Sep 2019 10:31:31 +0000 (12:31 +0200)]
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.

5 years agoFix input method operation on read-only text
Evgeny Zajcev [Wed, 4 Sep 2019 15:09:55 +0000 (18:09 +0300)]
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.

5 years ago; (server-goto-toplevel): Fix comment to reflect the code.
Eli Zaretskii [Sat, 7 Sep 2019 09:42:52 +0000 (12:42 +0300)]
; (server-goto-toplevel): Fix comment to reflect the code.

5 years agoAllow client connections when in recursive-edit
Eli Zaretskii [Sat, 7 Sep 2019 09:33:03 +0000 (12:33 +0300)]
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)

5 years agoSet inhibit-compacting-font-caches to t by default on MS-Windows
Eli Zaretskii [Sat, 7 Sep 2019 09:26:08 +0000 (12:26 +0300)]
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.

5 years agoAllow Zs characters to be composed
Eli Zaretskii [Sat, 7 Sep 2019 09:19:06 +0000 (12:19 +0300)]
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)

5 years agoRevert "file-truename now uses realpath for local files"
Eli Zaretskii [Sat, 7 Sep 2019 07:14:31 +0000 (10:14 +0300)]
Revert "file-truename now uses realpath for local files"

This reverts commit a59839d7556ef85058e09b005f0ff32e59b20ec3.
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.

5 years agofile-truename now uses realpath for local files
Paul Eggert [Fri, 6 Sep 2019 21:30:33 +0000 (14:30 -0700)]
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.

5 years agoImprove file name completion in file and directory widgets (Bug#7779)
Mauro Aranda [Wed, 28 Aug 2019 11:29:57 +0000 (08:29 -0300)]
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.

5 years agoFix erc-lurker-update-status (bug#36843)
Amin Bandali [Sat, 17 Aug 2019 18:09:11 +0000 (14:09 -0400)]
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.

5 years agoFix bugs when recalculating consing_until_gc
Paul Eggert [Thu, 5 Sep 2019 20:25:43 +0000 (13:25 -0700)]
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.

5 years agoPort :safe-renegotiation test to GnuTLS < 3.6.3
Paul Eggert [Thu, 5 Sep 2019 18:42:56 +0000 (11:42 -0700)]
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.

5 years agoFurther fix for network-security-protocol-checks
Lars Ingebrigtsen [Thu, 5 Sep 2019 11:26:08 +0000 (13:26 +0200)]
Further fix for network-security-protocol-checks

* lisp/net/nsm.el (network-security-protocol-checks): Fix the
defcustom type some more (bug#37306).

5 years agoFix defcustom type of network-security-protocol-checks
Lars Ingebrigtsen [Thu, 5 Sep 2019 11:23:07 +0000 (13:23 +0200)]
Fix defcustom type of network-security-protocol-checks

* lisp/net/nsm.el (network-security-protocol-checks): Fix the
defcustom type (bug#37306).

5 years agoUse plain ‘static’ for Emacs C inline functions
Paul Eggert [Thu, 5 Sep 2019 06:13:54 +0000 (23:13 -0700)]
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’.

5 years agoTweak xd_append_arg to pacify -Wnull-dereference
Paul Eggert [Thu, 5 Sep 2019 00:43:16 +0000 (17:43 -0700)]
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.

5 years agoDon't check for :safe-renegotiation with TLS1.3
Robert Pluim [Mon, 2 Sep 2019 12:55:00 +0000 (14:55 +0200)]
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>

5 years agoDon’t mention :safe-renegotiation in TLS 1.3
Paul Eggert [Tue, 3 Sep 2019 19:16:21 +0000 (12:16 -0700)]
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.

5 years agoFix nsm for unencrypted connections
Robert Pluim [Wed, 4 Sep 2019 21:43:56 +0000 (23:43 +0200)]
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)

5 years agoPort pdumper mmap to AIX
Paul Eggert [Wed, 4 Sep 2019 18:08:34 +0000 (11:08 -0700)]
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.

5 years agoPort to platforms with Xrender lib but not header
Paul Eggert [Wed, 4 Sep 2019 18:07:14 +0000 (11:07 -0700)]
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.

5 years agoCorrect arguments to `skip-syntax-forward'
Mattias Engdegård [Wed, 4 Sep 2019 14:27:02 +0000 (16:27 +0200)]
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.

5 years agoMake the NSM not pop up an X dialogue on non-mouse actions
Lars Ingebrigtsen [Wed, 4 Sep 2019 13:19:40 +0000 (15:19 +0200)]
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.

5 years agoPreserve more markers when reverting .gpg files
Lars Ingebrigtsen [Fri, 30 Aug 2019 10:20:30 +0000 (12:20 +0200)]
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.

5 years agoRepair change to compilation-context-lines (bug#36832)
Mattias Engdegård [Wed, 4 Sep 2019 12:35:18 +0000 (14:35 +0200)]
Repair change to compilation-context-lines (bug#36832)

* lisp/progmodes/compile.el (compilation-set-window):
Restore proper behaviour when compilation-context-lines is nil,
which is the default.

5 years agoFurther work on Bug#37202
Michael Albinus [Wed, 4 Sep 2019 12:13:13 +0000 (14:13 +0200)]
Further work on Bug#37202

* test/lisp/shadowfile-tests.el (shadow-debug): Set to t.
(shadow--tests-cleanup): Simplify.
(shadow-test*): Call `shadow-initialize'.
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
In cleanup, kill buffers used for test.
(top): Do not initialize.

5 years ago* lisp/net/tramp.el (tramp-process-sentinel): Use `process-buffer'.
Michael Albinus [Wed, 4 Sep 2019 07:37:37 +0000 (09:37 +0200)]
* lisp/net/tramp.el (tramp-process-sentinel): Use `process-buffer'.

5 years ago* src/systime.h (hz): #undef to work around AIX build issue.
Paul Eggert [Wed, 4 Sep 2019 06:40:32 +0000 (23:40 -0700)]
* src/systime.h (hz): #undef to work around AIX build issue.

5 years agoPrefer functions to macros in buffer.h
Paul Eggert [Wed, 4 Sep 2019 04:54:58 +0000 (21:54 -0700)]
Prefer functions to macros in buffer.h

In buffer.h, prefer inline functions to function-like macros
when either will do.  This helps avoid confusion about how
many times an arg is evaluated.  On my platform, this patch
improves performance of ‘make compile-always’ by 5.7%.
Also, prefer enum constants to object-like macros
when either will do.
* src/buffer.h (BEG, BEG_BYTE, GAP_BYTES_DFL, GAP_BYTES_MIN)
(MAX_PER_BUFFER_VARS, NONEXISTENT_MODTIME_NSECS)
(UNKNOWN_MODTIME_NSECS, BUFFER_LISP_SIZE, BUFFER_REST_SIZE):
Now enum constants, instead of macros.
(BUFFER_CEILING_OF, BUFFER_FLOOR_OF, BUF_BEG, BUF_BEG_BYTE)
(BUF_BEGV, BUF_BEGV_BYTE, BUF_PT, BUF_PT_BYTE, BUF_ZV)
(BUF_ZV_BYTE, BUF_GPT_ADDR, BUF_Z_ADDR, BUF_GAP_END_ADDR)
(BUF_COMPUTE_UNCHANGED, SET_PT, TEMP_SET_PT, SET_PT_BOTH)
(TEMP_SET_PT_BOTH, BUF_TEMP_SET_PT, SET_BUF_BEGV, SET_BUF_ZV)
(SET_BUF_BEGV_BOTH, SET_BUF_ZV_BOTH, SET_BUF_PT_BOTH)
(BYTE_POS_ADDR, CHAR_POS_ADDR, CHAR_TO_BYTE, BYTE_TO_CHAR)
(PTR_BYTE_POS, FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE)
(BUF_BYTE_ADDRESS, BUF_CHAR_ADDRESS, BUF_PTR_BYTE_POS)
(BUF_FETCH_CHAR, BUF_FETCH_CHAR_AS_MULTIBYTE, BUF_FETCH_BYTE)
(BUFFER_PVEC_INIT, BUFFER_LIVE_P, BUFFER_HIDDEN_P)
(BUFFER_CHECK_INDIRECTION, OVERLAY_POSITION, PER_BUFFER_VALUE_P)
(SET_PER_BUFFER_VALUE_P, PER_BUFFER_IDX):
Now inline functions instead of macros.

5 years ago* src/xdisp.c (hscroll_window_tree): Fix type typo.
Paul Eggert [Wed, 4 Sep 2019 04:54:58 +0000 (21:54 -0700)]
* src/xdisp.c (hscroll_window_tree): Fix type typo.

5 years agoTake last_per_buffer_idx private
Paul Eggert [Wed, 4 Sep 2019 04:54:58 +0000 (21:54 -0700)]
Take last_per_buffer_idx private

This will simplify future changes.  Turn the runtime check
into an eassert, since it’s not needed in production.
* src/buffer.c (last_per_buffer_idx): Now static.
(valid_per_buffer_idx): New function.
* src/buffer.h (PER_BUFFER_VALUE_P, SET_PER_BUFFER_VALUE_P): Use it.

5 years agoAvoid macros in pdumper.c when it’s easy
Paul Eggert [Wed, 4 Sep 2019 04:53:36 +0000 (21:53 -0700)]
Avoid macros in pdumper.c when it’s easy

Problem with DUMP_SET_REFERRER mentioned by Pip Cet at end of:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00548.html
* src/pdumper.c (DANGEROUS, EMACS_RELOC_TYPE_BITS)
(EMACS_RELOC_LENGTH_BITS, DUMP_RELOC_TYPE_BITS)
(DUMP_RELOC_ALIGNMENT_BITS, DUMP_RELOC_OFFSET_BITS)
(DUMP_RELOCATION_ALIGNMENT, DUMP_ALIGNMENT)
(WEIGHT_NONE, WEIGHT_NORMAL, WEIGHT_STRONG)
(PDUMPER_MAX_OBJECT_SIZE):
Now a constant, not a macro.
(divide_round_up): Now a function, not a macro DIVIDE_ROUND_UP.
All uses changed.
(enum link_weight_enum, WEIGHT_NONE_VALUE)
(WEIGHT_NORMAL_VALUE, WEIGHT_STRONG_VALUE): Remove.
(struct link_weight): Just use an int.
(dump_set_referrer): New function, replacing DUMP_SET_REFERRER
macro with a different API.  All uses changed.
(dump_clear_referrer): Rename from DUMP_CLEAR_REFERRER.
All uses changed.
(DEFINE_FROMLISP_FUNC, DEFINE_TOLISP_FUNC): Remove.
(intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp)
(dump_off_to_lisp): Define without using macros,
(dump_off_from_lisp): Add an eassert range check.
(DUMP_FIELD_COPY): Simplify.

5 years agoAvoid casting -1 to possibly-unsigned enum
Paul Eggert [Wed, 4 Sep 2019 00:34:08 +0000 (17:34 -0700)]
Avoid casting -1 to possibly-unsigned enum

* src/alloc.c (mark_maybe_pointer):
* src/pdumper.h (pdumper_object_p_precise):
Use pdumper_valid_object_type_p.
* src/pdumper.c (pdumper_find_object_type_impl):
* src/pdumper.h (pdumper_find_object_type):
Return int, not enum Lisp_Type.  All callers changed.
* src/pdumper.h (PDUMPER_NO_OBJECT): Do not cast -1 to enum
Lisp_Type; in theory, C18 says this could yield 7, which would
mean PDUMPER_NO_OBJECT == Lisp_Float (!).
(pdumper_valid_object_type_p): New function.

5 years agoRun tramp cleanup in correct buffer
Daniel Colascione [Tue, 3 Sep 2019 20:16:21 +0000 (13:16 -0700)]
Run tramp cleanup in correct buffer

Fixes bug #37297.

* lisp/net/tramp.el (tramp-process-sentinel): Do process-end cleanup
in the tramp buffer, not a random file buffer.

5 years agoSync consing_until_gc with gc-cons-threshold
Paul Eggert [Tue, 3 Sep 2019 20:03:34 +0000 (13:03 -0700)]
Sync consing_until_gc with gc-cons-threshold

Add watchers for gc-cons-threshold and gc-cons-percentage
that update consing_until_gc accordingly.
Suggested by Eli Zaretskii (Bug#37006#52).
* src/alloc.c (consing_threshold, bump_consing_until_gc)
(watch_gc_cons_threshold, watch_gc_cons_percentage):
New functions.
(garbage_collect_1): Use consing_threshold.
(syms_of_alloc): Arrange to watch gc-cons-threshold and
gc-cons-percentage.

5 years agoUse left margin to hold "=>" to indicate current error in fringeless windows
Alan Mackenzie [Tue, 3 Sep 2019 17:33:26 +0000 (17:33 +0000)]
Use left margin to hold "=>" to indicate current error in fringeless windows

This applies to compilation-mode.  It amends the fix for bug #36832.

* lisp/progmodes/compile.el (compilation-arrow-overlay): renamed from
overlay-arrow-overlay.
(compilation-margin-string, compilation--dummy-string): New variables.
(compilation-set-up-arrow-spec-in-margin)
(compilation-tear-down-arrow-spec-in-margin): New functions.
(compilation-set-overlay-arrow): Rewritten to use the new variables/functions.

5 years agoFix Bug#37202
Michael Albinus [Tue, 3 Sep 2019 11:55:42 +0000 (13:55 +0200)]
Fix Bug#37202

* lisp/shadowfile.el (shadow-debug): New defvar.
(shadow-read-files): Suppress error if there's no TODO file.

* test/lisp/shadowfile-tests.el (shadow-debug): Set to nil.
(shadow--tests-cleanup): New defun.  Apply to all tests.  (Bug#37202)
(shadow-test06-literal-groups): Cleanup temp buffer.
(shadow-test08-shadow-todo): Add debug messages.
(top): Cleanup initially.

5 years agoUpdate from Gnulib
Paul Eggert [Mon, 2 Sep 2019 19:37:52 +0000 (12:37 -0700)]
Update from Gnulib

This incorporates:
2019-08-25 intprops.h, verify.h: port better to clang
2019-08-21 New strip-trailing-space option for srclist-update
* .gitattributes: Remove doc/misc/texinfo.tex special case,
which is no longer needed now that Gnulib trims blank-at-eol.
* build-aux/install-sh, doc/misc/texinfo.tex, lib/intprops.h:
* lib/regex_internal.c, lib/verify.h: Copy from Gnulib.

5 years ago* doc/lispref/files.texi (Standard File Names): Mention .emacs.d too.
Paul Eggert [Mon, 2 Sep 2019 18:32:50 +0000 (11:32 -0700)]
* doc/lispref/files.texi (Standard File Names): Mention .emacs.d too.

5 years agoReword documentation markup description
Robert Pluim [Mon, 2 Sep 2019 15:28:59 +0000 (17:28 +0200)]
Reword documentation markup description

* etc/NEWS: Reword temporary note about documentation updates.

5 years agoAdd 'nsm-trust-local-network' to NEWS
Robert Pluim [Mon, 2 Sep 2019 15:26:10 +0000 (17:26 +0200)]
Add 'nsm-trust-local-network' to NEWS

* etc/NEWS: Describe 'nsm-trust-local-network', and warn against its
use.

5 years ago* admin/admin.el (set-version): Check for empty NEWS sections.
Glenn Morris [Sun, 1 Sep 2019 21:35:31 +0000 (14:35 -0700)]
* admin/admin.el (set-version): Check for empty NEWS sections.

5 years agoFix load-theme bug with user-emacs-directory
Paul Eggert [Sun, 1 Sep 2019 16:56:40 +0000 (09:56 -0700)]
Fix load-theme bug with user-emacs-directory

* lisp/custom.el (custom-theme-directory): Delay initialization,
since the value depends on user-emacs-directory (Bug#37256).

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Sep 2019 13:26:47 +0000 (06:26 -0700)]
; Auto-commit of loaddefs files.

5 years agoClarify what counts as whitespace in `string-blank-p'
Mattias Engdegård [Sun, 1 Sep 2019 12:26:18 +0000 (14:26 +0200)]
Clarify what counts as whitespace in `string-blank-p'

* lisp/emacs-lisp/subr-x.el (string-blank-p): Expand doc string.

5 years agopackage.el: Allow Package-Requires to span multiple lines (Bug#36301)
Thomas Fitzsimmons [Sat, 31 Aug 2019 14:48:59 +0000 (10:48 -0400)]
package.el: Allow Package-Requires to span multiple lines (Bug#36301)

* lisp/emacs-lisp/package.el (lm-header-multiline): Declare
function.
(package-buffer-info): Parse Package-Requires with
lm-header-multiline instead of lm-header.
(Bug#36301)

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
5 years agoMake user-emacs-directory a variable
Paul Eggert [Sun, 1 Sep 2019 01:17:20 +0000 (18:17 -0700)]
Make user-emacs-directory a variable

This is in response to Eli’s review here:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00712.html
* lisp/subr.el (user-emacs-directory): defvar, not defconst

5 years agoImprove documentation for recent XDG-related changes
Paul Eggert [Sun, 1 Sep 2019 01:16:17 +0000 (18:16 -0700)]
Improve documentation for recent XDG-related changes

Adjust documentation in the light of Eli’s review here:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00712.html
* doc/emacs/custom.texi (Init File, Find Init):
* doc/lispref/files.texi (Standard File Names):
* doc/lispref/os.texi (Init File):

5 years ago* doc/lispref/customize.texi: Fix typo.
Paul Eggert [Sat, 31 Aug 2019 21:48:26 +0000 (14:48 -0700)]
* doc/lispref/customize.texi: Fix typo.

5 years agoCalculate user-emacs-directory on startup
Paul Eggert [Sat, 31 Aug 2019 21:47:04 +0000 (14:47 -0700)]
Calculate user-emacs-directory on startup

Problem reported by Glenn Morris (Bug#583#56).
* lisp/startup.el (startup--xdg-config-default): New constant.
(startup--xdg-config-home-emacs): New var.
(startup--xdg-or-homedot): New function.
(normal-top-level): Use it to set user-emacs-directory early on.
(command-line): Also use it to determine the startup init directory.
* lisp/subr.el (user-emacs-directory): Just initialize to nil.

5 years agoCheck instead of relying on NOTREACHED
Paul Eggert [Sat, 31 Aug 2019 17:35:08 +0000 (10:35 -0700)]
Check instead of relying on NOTREACHED

NOTREACHED was designed for traditional lint decades ago,
and _Noreturn now normally subsumes its function.
In the one case in Emacs where NORETURN might help and _Noreturn does
not, check for NOTREACHED instead of assuming it.
* lib-src/etags.c (main):
* src/xterm.c (x_connection_closed):
Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED
is no longer needed there.  Also, one of the NOTREACHEDs was
misplaced, which defeated traditional lint checking anyway.
* lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED.
* src/emacs.c (main): Use eassume (false) rather than NOTREACHED,
so that running with ENABLE_CHECKING catches any internal error
causing the toplevel Frecursive_edit to return.

5 years ago* test/lisp/net/tramp-tests.el (tramp-test21-file-links): More cleanup.
Glenn Morris [Sat, 31 Aug 2019 17:30:14 +0000 (10:30 -0700)]
* test/lisp/net/tramp-tests.el (tramp-test21-file-links): More cleanup.

5 years agoFix compilation with CHECK_STRUCTS
Andreas Schwab [Sat, 31 Aug 2019 10:39:16 +0000 (12:39 +0200)]
Fix compilation with CHECK_STRUCTS

* src/pdumper.c (dump_hash_table): Update hash of Lisp_Hash_Table.

5 years ago; * src/floatfns.c: Don't use non-ASCII characters in comments.
Eli Zaretskii [Sat, 31 Aug 2019 06:58:45 +0000 (09:58 +0300)]
; * src/floatfns.c: Don't use non-ASCII characters in comments.

5 years agoAvoid signaling errors from ls-lisp--insert-directory on macOS
Eli Zaretskii [Sat, 31 Aug 2019 06:54:05 +0000 (09:54 +0300)]
Avoid signaling errors from ls-lisp--insert-directory on macOS

* lisp/ls-lisp.el (ls-lisp-sanitize): Don't assume the
directory entries for ".." and "." will either both be present
or both absent.  (Bug#37236)

5 years ago* src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140)
Mattias Engdegård [Thu, 29 Aug 2019 10:29:47 +0000 (12:29 +0200)]
* src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140)

5 years agoExtend tramp--test-check-files (Bug#37228)
Michael Albinus [Fri, 30 Aug 2019 11:54:42 +0000 (13:54 +0200)]
Extend tramp--test-check-files  (Bug#37228)

* test/lisp/net/tramp-tests.el (tramp--test-check-files): Test also
`directory-files-and-attributes'.  (Bug#37228)