Commit graph

77931 commits

Author SHA1 Message Date
Andrea Corallo
e20cdf937e * lisp/emacs-lisp/comp.el (comp-fwprop-insn): Fix phi function. 2020-11-08 21:22:53 +01:00
Andrea Corallo
a5408d5715 * lisp/emacs-lisp/comp.el (comp-common-supertype-2): Fix null intersection 2020-11-07 21:11:39 +01:00
Andrea Corallo
75e8ee728f Merge remote-tracking branch 'savannah/master' into HEAD 2020-11-07 16:21:36 +01:00
Stefan Monnier
e8f5657bc7 * lisp/emacs-lisp/lisp-mode.el: Avoid false-positive "hidden arg" in strings
(lisp--match-hidden-arg): Don't misfire in strings and comments.

Reported by: Andrii Kolomoiets <andreyk.mad@gmail.com>
2020-11-07 10:15:22 -05:00
Andrea Corallo
6c271ffaa8 * Fix non native compiled build
* lisp/emacs-lisp/advice.el (ad-add-advice): Do not try to
	install trampolines in vanilla builds.
2020-11-07 12:43:06 +01:00
Andrea Corallo
4a69e953f3 Allow for native compilation qualities to be specified per input file
* lisp/emacs-lisp/bytecomp.el (byte-native-qualities): Define
	variable.
	(byte-compile-from-buffer): Spill compilation qualities.
	* lisp/emacs-lisp/comp.el (comp-speed, comp-debug): Make
	them file local variables.
	(comp-ctxt): Add `speed' and `debug' slots.
	(comp-spill-speed, comp-spill-lap-function): Make use of these.
	(comp-spill-lap-function): Spill qualities from
	`byte-native-qualities'.
	(comp-limplify-top-level): Do not use `comp-speed' but ctxt value
	unstead.
	(comp-final): Do not propagate qualities as they are already
	in the `comp-ctxt'.
	(comp--native-compile): Close on `byte-native-qualities'.
	* src/comp.c (comp_t): Add 'speed' and 'debug' fields.
	(emit_comment, emit_mvar_rval, emit_static_object)
	(emit_ctxt_code, Fcomp__init_ctxt): Use these instead of the
	global variables.
	(Fcomp__compile_ctxt_to_file): Set comp.speed and comp.debug and
	use them.
2020-11-07 11:45:55 +01:00
Andrea Corallo
acf101c636 Handle type hierarchy in native compiler forward propagation
2020-11-07  Andrea Corallo  <andrea.corallo@arm.com>

	* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add fixnum
	and bignum.
	* lisp/emacs-lisp/comp.el (comp-ctxt): Add `supertype-memoize'
	slot.
	(comp-supertypes, comp-common-supertype-2)
	(comp-common-supertype): New functions.
	(comp-fwprop-insn): Make use of `comp-common-supertype' to
	identify the common supertype to be propagated.
2020-11-07 11:27:14 +01:00
Stefan Kangas
ece1e1da5e Delete outdated comment about C rewrite in apropos.el
Maybe it made sense to rewrite apropos.el in C for speed in 1991, but
today the speed increase would not outweigh the maintenance burden.

* lisp/apropos.el: Delete outdated comment.
2020-11-07 08:26:12 +01:00
Mattias Engdegård
b7b9bbb93d Rectify skip-set argument
* lisp/gnus/gnus-search.el (gnus-search-query-end-of-input):
Remove brackets that don't belong.  Found by relint.
2020-11-06 23:02:29 +01:00
Mattias Engdegård
6e9564f09a Fix javac message parsing column number off-by-one
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
'javac': Column numbers are 1-based by default; remove subtraction and
η-reduce.  Translate regexp to rx (mechanised).
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
Adapt 'javac' test cases to the change.
2020-11-06 17:16:00 +01:00
Mattias Engdegård
aea936562b * lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
A more precise type is desirable but at it is now correct ('list' is not).
2020-11-06 13:55:33 +01:00
Mattias Engdegård
1b9e159525 Change the default value of gdb-mi-decode-strings to t (bug#44173)
This is likely to be a more commonly wanted default value today.

* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): Change default.
* doc/emacs/building.texi (Source Buffers): Update manual.
* etc/NEWS: Announce.
2020-11-06 13:55:32 +01:00
Mauro Aranda
527413fb2f Go back to not using custom-push-theme when enabling a theme
* lisp/custom.el (enable-theme): Relying on custom-push-theme to
handle theme settings and prior user settings was a mistake.  The
theme settings haven't changed between loading the theme and enabling
it, so we don't need all of what custom-push-theme does.  However, we
still need to save a user setting outside of Customize, in order to be
able to get back to it, so do that in enable-theme itself.
2020-11-06 09:34:08 -03:00
Juri Linkov
af6891629d Support transient input methods in Isearch mode (bug#44266)
* doc/emacs/mule.texi (Select Input Method): Rename
transient-input-method to activate-transient-input-method.

* doc/emacs/search.texi (Special Isearch):
Document isearch-transient-input-method.

* lisp/international/isearch-x.el (isearch-transient-input-method):
New function.
(isearch-process-search-multibyte-characters):
Call 'deactivate-transient-input-method' after 'read-string'.

* lisp/international/mule-cmds.el (mule-menu-keymap): Remove
duplicate menu item 'describe-input-method'.  Add new menu item
'activate-transient-input-method'.
(default-transient-input-method): Rename from transient-input-method.
(current-transient-input-method)
(previous-transient-input-method): New buffer-local variables.
(deactivate-input-method): Don't add
current-transient-input-method to input-method-history.
(toggle-input-method): Call deactivate-transient-input-method
when current-transient-input-method is non-nil.
(activate-transient-input-method): Rename from transient-input-method.
(deactivate-transient-input-method): New function with body from
renamed function transient-input-method.

* lisp/isearch.el (isearch-menu-bar-map): Add new menu item
'isearch-transient-input-method'.
(isearch-mode-map): Bind 'C-x \' to isearch-transient-input-method.
(isearch-forward): Add isearch-transient-input-method to docstring.
(isearch-message-prefix): Use shorter string for narrowed buffer.
2020-11-06 10:31:58 +02:00
Eric Abrahamsen
ac471ff09d Fixes and improvements to gnus-search
* lisp/gnus/gnus-search.el (gnus-search-default-engines): Change type
from a list of two-element lists, to alist. This matches nnir's old
option type, and should make transition easier.
(nnir-imap-default-search-key): Note that variable is obsolete.
(gnus-search-transform-expression): Interpret the "attachment" key as
"body" in imap searches. Allow specifying larger/smaller message size
values in KB or MB units.
(gnus-search-server-to-engine): Fix error in this function, and
clarify somewhat.
2020-11-05 19:47:58 -08:00
Mauro Aranda
6782994645 Enable/disable buttons, tool bar and menu items in Custom buffer (Bug#14398)
* lisp/cus-edit.el (custom-reset-extended-menu): Keymap menu for the
Revert... menu button.
(custom-reset-menu): Keep for backward compatibility, but default to
nil, so we prefer the keymap menu instead.
(custom-reset): Pass the new keymap menu to widget-choose.

(custom-commands): Add an element to each list item, to manage its
enable/disable state.  Add docstring.
(custom-command-buttons): New variable, to hold the buttons that act
on all options in a Custom buffer.
(custom-buffer-create-internal): When creating the command buttons,
add the optional :notify function to enable/disable them.  Add the
buttons to the new variable custom-command-buttons.
(customize-menu-create): Notify the command buttons after creating the
Custom buffer, so they are correctly enabled/disabled.
(custom-redraw-magic, custom-notify): Notify the command buttons and
update the tool bar when changing a widget to the modified state.
2020-11-05 18:56:29 -03:00
Andrea Corallo
c6abe97f94 * A native compiler forward propagation fix
* lisp/emacs-lisp/comp.el (comp-fwprop-insn): Fix `comp-mvar'
	`const-vld' slot left unset while propagating in phis.
2020-11-05 22:34:12 +01:00
Basil L. Contovounesios
4610241a9b Fix coding system in eww-display-pdf
* lisp/net/eww.el (eww-display-pdf): Make *eww pdf* buffer unibyte
before populating it to avoid conversions.  The binding for
coding-system-for-write is then no longer necessary, and can be
delegated to the viewer invoked by mailcap-view-mime.  Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.  (Bug#44338)
2020-11-05 21:06:39 +00:00
Alan Mackenzie
2ecbf4cfae Allow minibuffer to stay in its original frame. Tidy up this area.
* doc/emacs/mini.texi (Basic Minibuffer): Add an entry for
minibuffer-follows-selected-frame.

* doc/lispref/minibuf.texi (Minibuffer Misc): Describe the new parameter to
minibufferp, LIVE.

* etc/NEWS: Add an entry describing the new minibuffer strategy.

* lisp/cus-start.el (minibuffer-prompt-properties--setter): Add an entry for
minibuffer-follows-selected-frame.

* lisp/minibuffer.el (minibuffer-message): Check for the current buffer being
an _active_ minibuffer rather than merely a minibuffer.

* src/frame.c (do_switch_frame): Call move_minibuffer_onto_frame.

* src/lisp.h (Top level): Add prototypes for move_minibuffer_onto_frame and
is_minibuffer.

* src/minibuf.c (minibuf_follows_frame): New function which ignores local and
let-bound values of minibuffer-follows-selected-frame.
(choose_minibuf_frame): Reformulate this function to reuse a minibuffer window
where possible, and to ensure no other frame has its minibuffer current, but
only when `minibuffer-follows-selected-frame'.
(move_minibuffer_onto_frame): New function.
(live_minibuffer_p): New function.
(Fminibufferp): Add a new &optional parameter LIVE.  Reformulate, possibly
calling live_minibuffer_p.
(read_minibuf): move the incrementation of minibuf_level to before the call of
choose_minibuf_frame.  Empty the miniwindows of frames without an active
minibuffer, rather than of all but the current frame.
(is_minibuffer): New function.
(read_minibuf_unwind): Note the miniwindow being restored and resize all other
miniwindows to zero size.
(minibuffer-follows-selected-frame): New configuration variable.

* src/window.c (candidate_window_p): In some scenarios, check the miniwindow
holds an active minibuffer.

* src/xdisp.c (get_window_cursor_type): Suppress the cursor for non-active
miniwindows, regardless of minibuf_level.
2020-11-05 19:27:43 +00:00
Basil L. Contovounesios
bfd3124202 Improve eww support for externally viewed PDFs
The *eww pdf* buffer is only needed when viewing PDFs within Emacs,
e.g., with doc-view-mode.  External PDF viewers are called with a
temporary file, so the buffer is not needed in that case.  What's
more, mailcap-view-mime erased the buffer and left it in
fundamental-mode until now, so the user was left staring at a
useless, empty buffer.  To make things even worse, external viewers
were invoked synchronously until now, so the user could not browse
the PDF file and use Emacs simultaneously.

* lisp/net/mailcap.el (mailcap--async-shell): New function.
(mailcap-view-mime): Use it to invoke external viewers
asynchronously.  Mention erasure of current buffer in that case in
docstring.  Add a period between the temporary file name and its
extension.

* lisp/net/eww.el (eww-display-pdf): Simplify using
insert-buffer-substring.  Fix coding-system-for-write for a stream
of raw bytes.  Pop to *eww pdf* buffer only if it is used for
displaying a document; otherwise kill it.  (bug#44338)
2020-11-05 17:34:23 +00:00
Michael Albinus
334e2ab440 Still fixes for Tramp directory-files-*
* lisp/net/tramp.el (tramp-handle-directory-files):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Fix COUNT.

* lisp/net/tramp-crypt.el (tramp-crypt-handle-directory-files):
Implement COUNT.

* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
* lisp/net/tramp-integration.el (tramp-eshell-directory-change):
Use `nbutlast'.

* lisp/net/tramp-rclone.el (tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file): Reorder cache flushing.
(tramp-rclone-handle-directory-files):
Use `tramp-compat-directory-files'.

* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
Fix NOSORT and COUNT.

* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Fix NOSORT.

* test/lisp/net/tramp-tests.el (tramp--test-share-p): New defun.
(tramp-test05-expand-file-name-relative): Use it.
(tramp-test16-directory-files)
(tramp-test19-directory-files-and-attributes): Strengthen test.
(tramp-test20-file-modes): Simplify check.
2020-11-05 17:36:04 +01:00
Lars Ingebrigtsen
ef5211d0aa Let pdf-view-mode take precedence over doc-view-mode
* lisp/net/mailcap.el (mailcap-mime-data): Note the order, and let
pdf-view-mode take precedence, since it's an optional package
(bug#44338).
2020-11-05 16:10:17 +01:00
Basil L. Contovounesios
771046f5d8 Sync biblatex entries and fields with v3.15
* lisp/textmodes/bibtex.el (bibtex-BibTeX-entry-alist): Fix
abbreviation of PhD.
(bibtex-biblatex-entry-alist, bibtex-biblatex-field-alist): Sync
standard entry and field types with those described in the biblatex
v3.15 manual of 2020-08-19 (bug#44322).
2020-11-05 11:30:34 +00:00
Stephen Berman
233d350d19 Improve display of tabulated list header line labels (bug#44068)
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Ensure sort indicator appears after the label of any selected
sortable column that is wide enough and enable label truncation
when narrowing a column.

* lisp/emacs-lisp/timer-list.el (timer-list-mode): Improve column
alignment.
(timer-list--function-predicate): Correct typo in doc string.
2020-11-04 23:52:21 +01:00
Eric Abrahamsen
125956725b Avoid use of eieio-oset-default
* lisp/gnus/gnus-search.el: Replace with an :initform tag on the slot
definition. `symbol-value' is necessary, otherwise the defclass macro
will treat the option as a quoted symbol.
2020-11-04 10:40:25 -08:00
Stefan Monnier
d6cb106a37 * lisp-mode.el: Fix missing highlight of "hidden" string arg
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2)
(lisp-cl-font-lock-keywords-2): Highlight "hidden arg" even if it
already has another face.
2020-11-04 11:37:00 -05:00
Manuel Uberti
43431f7108 * lisp/progmodes/project.el (project--files-in-directory): Fix formatting
Copyright-paperwork-exempt: yes
2020-11-04 10:42:20 -05:00
Reuben Thomas
2668bb47b0 Remove unused variable in ispell.el (thanks, Stefan Kangas)
* lisp/textmodes/ispell.el (ispell-check-version): Remove unused
variable `speller'.
2020-11-04 08:50:25 +00:00
Stefan Kangas
f7ea667b54 Fix warnings in url-irc.el
* lisp/url/url-irc.el (zenirc-server-alist, zenirc-buffer-name):
Declare to fix warnings.
(url-irc-rcirc): Silence warning by adding missing password argument
to rcirc-connect.
2020-11-04 07:40:16 +01:00
Stefan Kangas
197a53f7b8 * lisp/obsolete/nnir.el: Add "Obsolete-since" header. 2020-11-04 07:12:21 +01:00
Stefan Kangas
0d39d1e2f3 * lisp/cedet/srecode.el: Use lexical-binding. 2020-11-04 07:11:46 +01:00
Stefan Monnier
a63d905175 Fix misuses of make-local-variable on hooks
* lisp/vc/smerge-mode.el (smerge-ediff):
* lisp/progmodes/python.el (python-pdbtrack-setup-tracking):
* lisp/net/tramp-smb.el (tramp-smb-call-winexe):
* lisp/net/secrets.el (secrets-mode):
* lisp/mail/rmail.el (rmail-variables):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/erc/erc-log.el (erc-log-setup-logging): Use `add-hook`.

* lisp/eshell/em-unix.el (eshell/diff):
* lisp/eshell/em-hist.el (eshell-hist-initialize): Don't
`make-local-variable` on hooks.
2020-11-04 00:24:45 -05:00
Eric Abrahamsen
9bcdebd9b7 Remove gmane search engine
Remove the gnus-search-gmane class and all associated methods.  If
search functionality is ever resurrected, then revert this commit.

* lisp/gnus/gnus-search.el: Delete code, and remove from default value
of `gnus-search-default-engines'.
2020-11-03 21:20:17 -08:00
Eric Abrahamsen
0328b21d1e Move nnir.el to lisp/obsolete
* lisp/obsolete/nnir.el: This is no longer used, but users might still
be requiring it.
2020-11-03 21:20:17 -08:00
Eric Abrahamsen
7fad12c59b New gnus-search library
This library provides a fundamental reworking of the search
functionality previously found in nnir.el.  It uses class-based search
engines to interface with external searching facilities, and a parsed
search query syntax that can search multiple engines.

* lisp/gnus/gnus-search.el: New library containing search
functionality for Gnus.
* doc/misc/gnus.texi: Document.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): Remove references to nnir,
change meaning of prefix argument, change values of nnselect-function
and nnselect-args.
* lisp/gnus/nnselect.el: Replace references to nnir
(nnselect-request-article): Use gnus-search functions, and search
criteria.
(nnselect-request-thread, nnselect-search-thread): Use gnus-search
thread search.
(gnus-summary-make-search-group): Switch to use gnus-search function
and arguments.
* test/lisp/gnus/search-tests.el: Tests for new functionality.
2020-11-03 21:20:17 -08:00
Stefan Monnier
9aa6b5bb89 * lisp/progmodes/tcl.el: Use lexical-binding
Remove redundant `:group` args.
2020-11-03 23:02:13 -05:00
Eli Zaretskii
bec4a6daca Fix last change
* lisp/mwheel.el (mwheel-scroll): Don't use passive tense in doc
string.
2020-11-03 21:48:23 +02:00
Juri Linkov
a6240cb263 Horizontal mouse wheel scrolling amount (bug#43568)
* lisp/mwheel.el (mouse-wheel-scroll-amount-horizontal): New defcustom.
(mwheel-scroll): Use it.

* doc/emacs/frames.texi (Mouse Commands): Update doc about horizontal
scrolling step.
2020-11-03 21:06:11 +02:00
Michael Albinus
2fffc1dfdf Some Tramp fixes for directory-files-* and delete-*
* lisp/files.el (delete-directory): Simplify check for trash.

* lisp/net/ange-ftp.el (ange-ftp-delete-file): Implement TRASH.

* lisp/net/tramp-compat.el (tramp-compat-directory-files)
(tramp-compat-directory-files-and-attributes)
(tramp-compat-directory-empty-p): New defaliases.

* lisp/net/tramp.el (tramp-handle-directory-files-and-attributes)
(tramp-skeleton-delete-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory): Use them.

* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
Implement COUNT.

* test/lisp/net/tramp-tests.el (tramp-test14-delete-directory):
Do not run trash test for ange-ftp.
(tramp-test16-directory-files)
(tramp-test19-directory-files-and-attributes): Check COUNT argument.
2020-11-03 18:47:32 +01:00
Reuben Thomas
f9d6e463d3 Factor out some common code in ispell.el
* lisp/textmodes/ispell.el (ispell-with-safe-default-directory): Add
  macro.
  (ispell-call-process, ispell-call-process-region): Use it.
2020-11-03 16:56:50 +00:00
Reuben Thomas
640b41cd9b Simplify ispell-check-version’s use of -vv flag
* lisp/textmodes/ispell.el (ispell-check-version): All supported spell
checker programs accept -vv, including aspell for many years, so use
it.
2020-11-03 16:56:34 +00:00
Harald Jörg
84f74136d3 cperl-mode: Fix indentation for Emacs 26
* lisp/progmodes/cperl-mode.el (cperl-mode): Add a fix
which is only required for Emacs versions older than 27.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug30393):
Add a test to verify correct indentation (bug#30393).
2020-11-03 15:28:40 +01:00
Mauro Aranda
bd8f4b04d5 Fix customizing user options of type face
* lisp/cus-edit.el (face): Move the %f escape after the tag, because
otherwise customizing a face user option doesn't work:
custom-variable-value-create thinks that everything up until the first
":" is part of the tag, and the item widget doesn't know how to handle
the %f escape.
2020-11-03 10:02:51 -03:00
Stefan Kangas
2d4c981b21 Use lexical-binding in some url-*.el files
* lisp/url/url-dired.el:
* lisp/url/url-ftp.el:
* lisp/url/url-irc.el: Use lexical-binding.
2020-11-03 04:37:44 +01:00
Stefan Kangas
39561fbfb3 Use lexical-binding in solitaire.el
* lisp/play/solitaire.el: Use lexical-binding.  Remove redundant
:group args.
2020-11-03 04:19:53 +01:00
Stefan Kangas
74dd264d08 Use lexical-binding in some of emulation/edt*.el
* lisp/emulation/edt-vt100.el:
* lisp/emulation/edt-pc.el:
* lisp/emulation/edt-lk201.el: Use lexical-binding.
2020-11-03 03:55:50 +01:00
Stefan Kangas
0462ba3032 Use lexical-binding in pcmpl-rpm.el
* lisp/pcmpl-rpm.el: Use lexical-binding.  Remove redundant :group
args.
(pcmpl-rpm-packages): Quote function symbol as such.
2020-11-03 02:23:46 +01:00
Stefan Kangas
499847ab95 Use lexical-binding in pcmpl-cvs.el
* lisp/pcmpl-cvs.el: Use lexical-binding.
(executable): Remove unnecessary require.
(pcmpl-cvs-binary): Remove redundant :group arg.
(pcmpl-cvs-tags): Quote function symbol as such.
2020-11-03 02:11:19 +01:00
Stefan Kangas
e1644c065e ; * lisp/pcomplete.el: Fix typo. 2020-11-03 02:04:22 +01:00
Stefan Kangas
a7374f668b Fix exiting the finder-commentary buffer
* lisp/finder.el (finder-exit): Fix exiting the finder-commentary
buffer.  (Bug#44384)
(finder-buffer): New defconst.
(finder-list-keywords): Use above new defconst.
2020-11-03 01:45:32 +01:00