Andrea Corallo [Wed, 7 Oct 2020 21:38:00 +0000 (23:38 +0200)]
* Fix failure when eln-cache is removed (introduced by 4a1bb46260)
* src/comp.c (make_directory_wrapper, make_directory_wrapper_1):
New functions.
(Fcomp_el_to_eln_filename): If base_dir is not
specified and we are searching across `comp-load-path' try to
create a directory if does not exists.
Andrea Corallo [Wed, 7 Oct 2020 18:43:00 +0000 (20:43 +0200)]
* Fix some nits in comp.el
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Use
`cl-defmethod' where correct in place of `cl-defgeneric'.
(comp-tampoline-compile): Add missing #.
Andrea Corallo [Sun, 4 Oct 2020 07:16:24 +0000 (09:16 +0200)]
Make filename hashing compatible with self contained builds (bug#43532)
* Makefile.in (lispdirrel): Add replace template.
(epaths-force): Form correctly 'PATH_REL_LOADSEARCH' into epath.h
* configure.ac (lispdirrel): Define variable (relative path of the
lisp files from the installation directory).
* src/comp.c (Fcomp_el_to_eln_filename): Update algorithm not to
rely on 'PATH_DUMPLOADSEARCH' but on 'PATH_REL_LOADSEARCH'.
* src/epaths.in (PATH_REL_LOADSEARCH): Add macro template.
Eli Zaretskii [Sat, 3 Oct 2020 17:49:18 +0000 (20:49 +0300)]
Avoid segfaults in lookup_image when faces were freed
* src/image.c (lookup_image): Make sure the frame's face cache
exists and has at least the basic faces. If FACE_ID is not a
basic face, and is no longer cached, fall back on the 'default'
face. (Bug#43700)
* etc/NEWS: Document the feature (bug#4787).
* lisp/wid-edit.el (widget--simplify-menu): New function, to convert
extended menus into simplified menus when using the menu to prompt
through the minibuffer.
(widget-choose): Accept a keymap menu. When not using x-popup-menu,
simplify the menu with widget--simplify-menu. Document the changes in
the docstring.
Alan Mackenzie [Fri, 2 Oct 2020 21:21:06 +0000 (21:21 +0000)]
Enhance syntax-tests.el to test comments in parse-partial-sexp
This now tests the interface between parse-partial-sexp and the low level
comment function in syntax.c
* test/src/syntax-tests.el (syntax-comments-midpoint): New function.
(syntax-pps-comments): New macro.
(top level): Two new syntax-br-comments tests and five new syntax-pps-comments
tests.
* test/data/syntax-comments.txt (top level): Amend some test fragments and add
some more.
Calc: fix formatting and parsing Unix time (bug#43759)
The number of days from epoch to Jan 1, 1970 that was used in parsing
and formatting Unix time was incorrect. The previous fix
(in e368697ce36) was incomplete.
Reported by Vincent Belaïche.
* lisp/calc/calc-forms.el (math-unix-epoch): New constant.
(math-format-date-part, math-parse-standard-date, calcFunc-unixtime):
Use math-unix-epoch instead of a constant that is sometimes wrong.
* test/lisp/calc/calc-tests.el (calc-unix-date): New test.
Alan Mackenzie [Fri, 2 Oct 2020 17:25:02 +0000 (17:25 +0000)]
Enhance syntax-tests.el to test comments in scan-lists
This now tests the interface between scan_lists and the comment functions.
* test/src/syntax-tests.el (syntax-br-comments): New macro.
({-in, ;-in, /*-in): Set parse-sexp-ignore-comments to t.
(top level): Add 15 tests for comments inside brace lists.
* test/data/syntax-comments.txt (top level): Amend some test fragments.
Glenn Morris [Fri, 2 Oct 2020 16:33:53 +0000 (09:33 -0700)]
Merge from origin/emacs-27
2af6b3147d Clarification in Tramp manual 8fbaca7d41 Check Emacs version used for Tramp compilation 90e5549f02 Don't signal an error when saving files on WdebDAV volumes 6f73cc3579 ; * lisp/net/eww.el (eww-search-words): Doc fix. ce0842a165 * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it. (...
* lisp/ebuff-menu.el (electric-buffer-list): Ensure that point is
restored, which isn't always the case if
global-display-line-numbers-mode (bug#43755). This enables
selecting buffers again.
Andrea Corallo [Fri, 2 Oct 2020 12:42:43 +0000 (14:42 +0200)]
* When advising search in `comp-eln-load-path' the first writable dir
* lisp/emacs-lisp/comp.el (comp-tampoline-compile): Do not crash
if we can't write in the first entry in `comp-eln-load-path' but
search for another one.
Stefan Monnier [Fri, 2 Oct 2020 10:34:37 +0000 (10:34 +0000)]
CC Mode: Convert the handling of c-special-indent-hook to standard usage
* lisp/progmodes/cc-styles.el (c-set-style): Use kill-local-variable rather
than copying the hook's global value to the local binding.
(c-make-styles-buffer-local): Remove redundant make-variable-buffer-local.
Robert Pluim [Fri, 2 Oct 2020 08:47:06 +0000 (10:47 +0200)]
Don't error if no GPG signing key configured
* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Partially revert
"Make mml-secure-epg-sign bug out if we can't find an identity".
It causes signing to fail for people who have not set up
mml-secure-{smime,openpgp}-sign-with-sender, which is a regression
from Emacs-26 (Bug#40118). In such a situation gpg will use its
default key.
Do not merge to master. On master Emacs will query the user.
The calculation of business days was broken in 2012 (probably 310e60d9454fe2 or thereabouts) when the date representation changed
epoch so that Jan 1, 1 AD became day number 1 instead of 0. Repair
this, along with an unrelated bug that prevented arbitrary holiday
weekdays from working.
Reported by Aaron Zeng.
* lisp/calc/calc-forms.el (math-to-business-day)
(math-from-business-day): Correct calculation of weekdays using Calc's
current (Rata Die) chronology. Modify loop condition to cope with odd
sets of holiday weekdays.
* test/lisp/calc/calc-tests.el (calc-business-days): New test.
Andrea Corallo [Fri, 2 Oct 2020 07:52:40 +0000 (09:52 +0200)]
Clean-up testsuite for vanilla builds
Tag all native compiler tests and skip them in vanilla builds
* test/Makefile.in (SELECTOR_DEFAULT, SELECTOR_EXPENSIVE)
(SELECTOR_ALL): Define selectors for vanilla or nativecomp builds.
* test/src/comp-tests.el: Do not native compile test files on
vanilla.
(comp-deftest): New macro to define tests tagging as :nativecomp.
* lisp/ebuff-menu.el (electric-buffer-list): Ensure that point is
restored, which isn't always the case if
global-display-line-numbers-mode (bug#43755). This enables
selecting buffers again.
* lisp/progmodes/python.el (python-shell-send-statement): Don't
send a cookie, because that leads to the naked expression not
being evaled (bug#43450).
(python-shell-send-region): Allow not sending a cookie.
(python-shell-buffer-substring): Ditto.
Stop using a dynamically bound 'generated-autoload-file' variable
* doc/lispref/loading.texi (Autoload): Document change of name
(bug#39823).
* lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Pass
the file name in.
(autoload-generated-file): Ditto.
(autoload-file-load-name): Ditto.
(generate-file-autoloads): Ditto.
(autoload--setup-output): Ditto.
(autoload-generate-file-autoloads): Ditto, and alter doc string to
reflect when `generated-autoload-file' is heeded.
(update-file-autoloads): Pass outfile in to functions.
(autoload-find-destination): Ditto.
(update-directory-autoloads): Make into an obsolete shim around
`make-directory-autoloads'.
(make-directory-autoloads): Renamed from
`update-directory-autoloads' with new semantics.
(batch-update-autoloads): Adjust caller.
Tino Calancha [Thu, 1 Oct 2020 21:33:56 +0000 (23:33 +0200)]
Fix wdired-do-perm-changes when over Tramp
* lisp/wdired.el (wdired-do-perm-changes) Use set-file-modes
instead of external program (bug#39284). This fixes the problem
of passing the wrong argument to the external chmod.
Juri Linkov [Thu, 1 Oct 2020 19:17:40 +0000 (22:17 +0300)]
Use new faces isearch-group-odd and isearch-group-even (bug#43702)
* lisp/isearch.el (isearch-group-odd, isearch-group-even): New faces
instead of isearch-group-1 .. isearch-group-9.
(isearch-highlight): Use new faces.
* lisp/progmodes/sql.el (sql-add-product): Re-correct argument
spec. Previous change was due to my mistake; I have
resolved back to the prior behavior (Bug#39960).
* test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
test to insure I don't make the same mistake again.
Gemini Lasswell [Thu, 1 Oct 2020 17:59:58 +0000 (19:59 +0200)]
Restore some public debugging functions removed in Emacs 27
* lisp/emacs-lisp/backtrace.el (backtrace--to-string): New function.
(backtrace-to-string): Use it. Fix whitespace (bug#40728).
* lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function.
Mark it as obsolete.
(debugger-toggle-locals, debug-help-follow): New aliases.
* lisp/simple.el (visual-line-mode): Only save values once, even
if the mode is switched on twice (bug#43730). This makes both
previously set local values for variables like truncate-lines, as
well as default values for truncate-lines restorable.
martin rudalics [Thu, 1 Oct 2020 00:00:06 +0000 (02:00 +0200)]
Fix segfault in some cases when restoring a selected window
* src/xdisp.c (restore_selected_window): Fix the more grave
problems caused by a function deleting the previously selected
frame or window (bug#39977).
Stefan Monnier [Wed, 30 Sep 2020 23:08:47 +0000 (19:08 -0400)]
* doc/emacs/basic.texi (Basic Undo): Explain the C-/ situation in xterm
AFAICT, in ttys you can send a `C-_` to Emacs either by pressing
`C-/` (e.g. xterm, uxterm, rxvt, xfce4-terminal, gnome-terminal)
or by pressing `C--` (e.g. rxvt, Linux console).
When recipient has no public key, make offer to skip it optional.
* epa-mail.el (epa-mail-offer-skip): New option.
(epa-mail-encrypt): If epa-mail-offer-skip is nil,
don't offer to skip a keyless recipient, just cause error.
* lisp/cedet/semantic/bovine/scm.el (semantic-lex-scheme-symbol):
Symbols do not have to start with a word-constituent character
(bug#40034). In particular, symbols like : and . are valid.
Fix problem of having the wrong window selected after saving foo.gpg
* lisp/epa.el (epa--select-keys): Restore the window configuration
after selecting the key to use (bug#43703). This also ensures
that the buffer we were editing ends up as the current buffer
after saving it, instead of selecting a different window.
Eli Zaretskii [Wed, 30 Sep 2020 14:33:58 +0000 (17:33 +0300)]
Fix 'move-to-column' when invisible text follows a TAB
* src/indent.c (scan_for_column): Accept 2 more arguments, and
report through them the position corresponding to PREVCOL. All
callers changed.
(Fmove_to_column): Use the prev_col's position to test for a TAB
instead of assuming that the TAB is just before point (which is
false when there's invisible text around). (Bug#43587)