Stefan Kangas
737d22f295
Prefer setq-local in tar-mode.el
...
* lisp/tar-mode.el (tar-summarize-buffer, tar-mode, tar-extract):
Prefer setq-local.
2020-12-07 11:11:54 +01:00
Stefan Kangas
69f039bf6d
Prefer setq-local in tcl.el
...
* lisp/progmodes/tcl.el (tcl-mode, inferior-tcl-mode, inferior-tcl):
(tcl-auto-fill-mode, tcl-guess-application): Prefer setq-local.
2020-12-07 11:07:10 +01:00
Michael Albinus
09b040cb58
* lisp/net/tramp.el (tramp-read-passwd): Use connection-local `auth-sources'.
...
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
Move setting of connection-local variables up.
2020-12-07 10:38:24 +01:00
Stefan Monnier
300c581370
* lisp/emacs-lisp/lisp-mode.el: Give paren syntax to [...] in lisp-data-mode
...
(lisp-data-mode-syntax-table): Rename from lisp--mode-syntax-table.
Adjust all users. Set [...] to have paren syntax.
(lisp-data-mode): Don't set `lisp-syntax` arg any more
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-syntax-table):
Don't bother setting [...] to have paren syntax any more.
* lisp/progmodes/inf-lisp.el (inferior-lisp-mode): Don't use
`lisp-syntax` arg of lisp-mode-variables any more.
2020-12-06 22:18:48 -05:00
Mattias Engdegård
c13b4fa61e
Remove Calc bignum remnants
...
* lisp/calc/calc-macs.el (Math-natnum-lessp):
* lisp/calc/calc-ext.el (math-norm-bignum, math-compare-bignum):
* lisp/calc/calc-math.el (math-zerop-bignum)
(math-scale-bignum-digit-size): Remove.
* lisp/calc/calc-bin.el (math-integer-log2, calcFunc-rot, math-clip):
* lisp/calc/calc-comb.el (math-prime-test, calcFunc-prfac)
(calcFunc-totient, calcFunc-moebius):
* lisp/calc/calc-ext.el (math-gcd):
* lisp/calc/calc-funcs.el (calcFunc-betaB):
* lisp/calc/calc-math.el (math-nth-root-int-iter, calcFunc-ilog):
Replace Math-natnum-lessp with <.
2020-12-06 23:43:53 +01:00
Juri Linkov
f13ae2bb95
* lisp/vc/vc-git.el: Update args of backend API calls in the header comments
...
https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg00283.html
2020-12-06 23:19:23 +02:00
Juri Linkov
3fe6cea6e0
* lisp/vc/vc.el: Update args of backend API calls in the header comments
...
https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg00283.html
2020-12-06 23:18:13 +02:00
Juri Linkov
a40be60ec8
Backport Handle read-char-from-minibuffer and y-or-n-p from pre-command-hook
...
* lisp/subr.el (read-char-from-minibuffer-insert-char)
(read-char-from-minibuffer-insert-other, y-or-n-p-insert-y)
(y-or-n-p-insert-n, y-or-n-p-insert-other):
Check for 'minibufferp' before executing the body.
(read-char-from-minibuffer, y-or-n-p): Let-bind this-command
before calling read-from-minibuffer. (Bug#45029)
; Do not merge to master.
2020-12-06 23:12:13 +02:00
Juri Linkov
5204c7420b
Handle calling read-char-from-minibuffer and y-or-n-p from pre-command-hook
...
* lisp/subr.el (read-char-from-minibuffer-insert-char)
(read-char-from-minibuffer-insert-other, y-or-n-p-insert-y)
(y-or-n-p-insert-n, y-or-n-p-insert-other):
Check for 'minibufferp' before executing the body.
(read-char-from-minibuffer, y-or-n-p): Let-bind this-command
before calling read-from-minibuffer. (Bug#45029)
2020-12-06 23:09:07 +02:00
Andrea Corallo
715a1ca174
Merge remote-tracking branch 'savannah/master' into HEAD
2020-12-06 18:07:27 +01:00
Andrea Corallo
27f666e111
* Unify common fallback exit point in `comp-cstr-union-1-no-mem'.
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem): Define
a local function `give-up' as a common fall-back exit point.
2020-12-06 18:07:03 +01:00
Andrea Corallo
ac40a60696
Couple of `comp-cstr-union-1-no-mem' improvements for mixed neg pos union
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem):
Generalize disjoint pos types vs neg values conditions.
(comp-cstr-union-1-no-mem): Do not propagate ranges when we are
already returning integer as generic type.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add corresponding tests.
2020-12-06 18:02:18 +01:00
Philipp Stephani
40e11743ca
Print a backtrace on unhandled errors in batch mode (Bug#44942).
...
* src/eval.c (signal_or_quit): Print a backtrace in batch mode if no
error handler was found.
* test/src/eval-tests.el (eval-tests/backtrace-in-batch-mode)
(eval-tests/backtrace-in-batch-mode/demoted-errors): New unit tests.
* etc/NEWS: Document change.
2020-12-06 17:47:52 +01:00
Eli Zaretskii
87a9fc6dcd
Improve error message text of "C-x C-SPC"
...
* lisp/simple.el (pop-global-mark): Mention the buffer name in the
error message. Suggested by T.V Raman <raman@google.com>.
2020-12-06 17:43:18 +02:00
Eli Zaretskii
32090a3de4
Improve documentation of streams in batch mode
...
* doc/lispref/os.texi (Batch Mode):
* doc/lispref/streams.texi (Input Streams, Output Streams): Better
documentation of I/O streams in batch mode, with more
cross-references.
2020-12-06 15:54:37 +02:00
Michael Albinus
2bd76cc107
Make Tramp scripts more unique and robust
...
* lisp/net/tramp-sh.el (tramp-uudecode, tramp-perl-file-truename)
(tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode, tramp-perl-pack)
(tramp-perl-unpack, tramp-hexdump-encode, tramp-awk-encode)
(tramp-hexdump-awk-encode, tramp-od-encode, tramp-od-awk-encode)
(tramp-awk-decode): Use format specifiers supported by
`tramp-expand-script'. Adapt docstring.
(tramp-vc-registered-read-file-names): Adapt docstring.
(tramp-sh-handle-file-local-copy): Let-bind local `default-directory'.
(tramp-expand-script): New defun.
(tramp-maybe-send-script, tramp-find-inline-encoding): Use it.
(tramp-local-coding-commands): Simplify.
2020-12-06 14:24:13 +01:00
Mattias Engdegård
75a91a0bb5
Unicode integrals in Calc
...
* lisp/calc/calccomp.el (math-compose-integ): Use Unicode integral
signs when available instead of a crude ASCII approximation, with a
shorter stem to save space.
2020-12-06 13:11:18 +01:00
Basil L. Contovounesios
e84a1ffde9
Avoid modifying nnimap user option in spam.el
...
* lisp/gnus/nnimap.el (nnimap--split-download-body): New variable.
(nnimap-fetch-inbox): Use it in conjunction with
nnimap-split-download-body.
* lisp/gnus/spam.el: Don't load nnimap.el at compile time for a
dynamic variable.
(spam-setup-widening): Rather than unconditionally set user option
nnimap-split-download-body, set nnimap--split-download-body to a
unique non-nil value only if the variable was nil (bug#44981).
(spam-teardown-widening): New function that undoes this if
nnimap--split-download-body still holds the unique value.
(spam-unload-hook): Call spam-teardown-widening to revert any change
to the value of nnimap--split-download-body.
2020-12-06 11:45:52 +00:00
Stefan Kangas
61497defb4
; * lisp/subr.el (interactive-p): Note to not remove in a hurry.
2020-12-06 10:37:31 +01:00
Stefan Kangas
ba02ac89e6
; * lisp/gnus/spam.el (spam-setup-widening): Silence byte-compiler.
2020-12-06 10:06:33 +01:00
Stefan Kangas
e5c06669b8
Prefer setq-local in several progmodes
...
* lisp/progmodes/executable.el (executable-interpret):
* lisp/progmodes/f90.el (f90-mode):
* lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics):
* lisp/progmodes/fortran.el (fortran-mode):
* lisp/progmodes/gud.el (gud-gdb, sdb, dbx, xdb, perldb, pdb)
(jdb, gud-mode, gud-common-init, gdb-script-mode)
(gud-tooltip-activate-mouse-motions):
* lisp/progmodes/hideshow.el (hs-minor-mode):
* lisp/progmodes/icon.el (icon-mode):
* lisp/progmodes/ld-script.el (ld-script-mode):
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/modula2.el (m2-mode):
* lisp/progmodes/simula.el (simula-mode):
* lisp/progmodes/subword.el (subword-setup-buffer):
* lisp/progmodes/which-func.el (which-function): Prefer setq-local.
2020-12-06 10:06:22 +01:00
Eli Zaretskii
34feded008
Support ks_c_5601-1987 encoding
...
* lisp/language/korean.el (ks_c_5601-1987): Define as an alias for
'korean-iso-8bit. (It is sometimes used in email messages.)
2020-12-06 10:01:20 +02:00
Stefan Kangas
79d287c7b5
Prefer setq-local in emulation/*.el
...
* lisp/emulation/edt.el (edt-select-mode):
* lisp/emulation/viper-cmd.el (viper-refresh-mode-line):
(viper-minibuffer-setup-sentinel):
* lisp/emulation/viper.el (viper-comint-mode-hook): Prefer setq-local.
2020-12-06 08:54:50 +01:00
Stefan Kangas
7c113c344e
Prefer setq-local in url/*.el
...
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/url/url-http.el (url-http-parse-headers):
* lisp/url/url-util.el (url-extract-mime-headers): Prefer setq-local.
2020-12-06 08:51:23 +01:00
YAMAMOTO Mitsuharu
da00a6f317
Fix Xaw widget text disappearing when built with cairo (bug#43418)
...
* lwlib/lwlib-utils.c (crxft_font_open_name): Use FcFontMatch to
get a pattern to pass to cairo_ft_font_face_create_for_pattern.
2020-12-06 14:21:35 +09:00
Andrea Corallo
09ec39e352
* Memoize `comp-cstr-union-1'
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Do not synthesize the
copier.
(comp-cstr-ctxt): Add `union-1-mem-no-range' `union-1-mem-range'
slots.
(comp-cstr-copy): New function.
(comp-cstr-union-1-no-mem): Rename from `comp-cstr-union-1'.
(comp-cstr-union-1): New function.
2020-12-05 22:33:35 +01:00
Andrea Corallo
2eb41ec137
More improvements to `comp-cstr-union-1' for mixed positive/negative cases
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1): Better handle
mixed positive/negated cases.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add a number of tests.
2020-12-05 19:01:04 +01:00
Andrea Corallo
f923de6853
* Fix `comp-cstr-to-type-spec'
...
* lisp/emacs-lisp/comp-cstr.el (comp-star-or-num-p): New predicate.
(comp-type-spec-to-cstr): Make use of.
(comp-cstr-to-type-spec): Output correctly type specifiers
as (not (or integer ...
2020-12-05 19:01:04 +01:00
Andrea Corallo
726e40fb7c
Fix union of homogeneously negated input constraints
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1): Fix logic.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add a couple of tests.
2020-12-05 19:01:03 +01:00
Andrea Corallo
cbbdb4e199
* Add `with-comp-cstr-accessors' macro.
...
* lisp/emacs-lisp/comp-cstr.el (with-comp-cstr-accessors): New macro.
(comp-cstr-union-1): Make use of `with-comp-cstr-accessors'.
2020-12-05 19:01:03 +01:00
Andrea Corallo
7c1d90a41d
Initial support for union of negated constraints
...
* lisp/emacs-lisp/comp-cstr.el (comp-range-negation): New
function.
(comp-cstr-union-homogeneous-no-range): Rename from
`comp-cstr-union-no-range'.
(comp-cstr-union-homogeneous): Rename from `comp-cstr-union'.
(comp-cstr-union-1): New function.
(comp-cstr-union-no-range, comp-cstr-union): Rewrite in function
of `comp-cstr-union-1'.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add a bunch of tests.
2020-12-05 19:01:03 +01:00
Andrea Corallo
1fb249f6db
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-no-range): Cosmetic.
2020-12-05 19:01:03 +01:00
Andrea Corallo
9b85ae6aa5
Initial constraint negation support
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Add `neg' slot.
(comp-range-negation, comp-cstr-negation)
(comp-cstr-negation-make): New functions.
(comp-type-spec-to-cstr): Enable `not` in type specifiers.
(comp-cstr-to-type-spec): Update logic to handle negation.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add a test.
2020-12-05 19:01:03 +01:00
Stefan Monnier
fc54c83518
* lisp/progmodes/perl-mode.el: Fix handling of s'foo'bar'
...
(perl-syntax-propertize-function): Don't put a syntax-property
on regexp-op delimiters if they're already handled correctly
by the normal syntax tables.
(perl-syntax-propertize-special-constructs): Mark the middle
quote of s'foo'bar' as punctuation.
* test/manual/indent/perl.perl: Add new test cases.
2020-12-05 10:41:20 -05:00
Stefan Kangas
dc39c66d3b
; * lisp/play/doctor.el (make-doctor-variables): Fix indentation.
2020-12-05 12:06:19 +01:00
Stefan Kangas
a77f5abd98
Prefer setq-local in play/*.el
...
* lisp/play/decipher.el (decipher-mode):
* lisp/play/doctor.el (make-doctor-variables):
* lisp/play/dunnet.el (dun-mode):
* lisp/play/gomoku.el (gomoku-mode): Prefer setq-local.
2020-12-05 12:06:19 +01:00
Basil L. Contovounesios
e5a18efd3d
Fix last change to shell-command
...
* lisp/simple.el: Specify comint-term-environment arglist in
function declaration.
(shell-command): Load shell.el before calling
comint-term-environment; otherwise it is undefined. Allow
async-shell-command-width to take precedence over the COLUMNS value
returned by comint-term-environment. (Bug#45034)
2020-12-05 10:45:17 +00:00
Eli Zaretskii
6916e7954a
Improve documentation of 'ps-print-color-p'
...
* doc/emacs/misc.texi (PostScript Variables): Improve and clarify
the description of 'ps-print-color-p'. (Bug#44962)
2020-12-05 12:19:27 +02:00
Stefan Kangas
f254c8b5f3
Prefer setq-local in mail/*.el
...
* lisp/mail/emacsbug.el (report-emacs-bug):
* lisp/mail/rfc822.el (rfc822-addresses):
* lisp/mail/rmail.el (rmail-perm-variables, rmail-show-message-1):
* lisp/mail/rmailedit.el (rmail-edit-mode):
(rmail-edit-current-message, rmail-cease-edit):
* lisp/mail/rmailsum.el (rmail-new-summary-1, rmail-summary-mode):
(rmail-summary-update-highlight):
* lisp/mail/sendmail.el (mail-mode): Prefer setq-local.
2020-12-05 10:54:14 +01:00
Eli Zaretskii
6663b2f211
; * lisp/simple.el (move-beginning-of-line): Doc fix.
2020-12-05 11:00:05 +02:00
Stefan Kangas
5ef30fbf11
Prefer setq-local in vc/*.el
...
* lisp/vc/add-log.el (find-change-log, change-log-mode):
* lisp/vc/cvs-status.el (cvs-status-mode):
* lisp/vc/diff-mode.el (diff-restrict-view, diff-find-file-name):
(diff-mode, diff-setup-whitespace, diff-apply-hunk):
* lisp/vc/diff.el (diff-no-select):
* lisp/vc/ediff-util.el (ediff-setup):
* lisp/vc/log-edit.el (log-edit, log-edit-mode):
* lisp/vc/log-view.el (log-view-mode):
* lisp/vc/pcvs.el (cvs-temp-buffer, cvs-make-cvs-buffer):
(cvs-update-filter, cvs-mode, cvs-mode-commit)
(cvs-mode-edit-log, cvs-vc-command-advice):
* lisp/vc/smerge-mode.el (smerge-match-conflict):
(smerge-ediff, smerge-mode):
* lisp/vc/vc-annotate.el (vc-annotate-mode):
(vc-annotate, vc-annotate-display):
* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode):
* lisp/vc/vc-dir.el (vc-dir-mode):
* lisp/vc/vc-dispatcher.el (vc-setup-buffer):
(vc-compilation-mode, vc-start-logentry):
* lisp/vc/vc-git.el (vc-git-log-view-mode):
* lisp/vc/vc-hg.el (vc-hg-log-view-mode):
* lisp/vc/vc-hooks.el (vc-refresh-state):
* lisp/vc/vc-mtn.el (vc-mtn-log-view-mode):
* lisp/vc/vc-svn.el (vc-svn-log-view-mode):
* lisp/vc/vc.el (vc-register, vc-diff-internal):
(vc-find-revision-save, vc-find-revision-no-save):
(vc-log-internal-common, vc-region-history): Prefer setq-local.
2020-12-05 08:58:12 +01:00
Dmitry Gutov
c86dc8d488
Always show the summary
...
* lisp/progmodes/xref.el (xref--show-defs-minibuffer):
Always show the summary (at least for now).
2020-12-05 03:01:34 +02:00
Dmitry Gutov
940bb6e984
Fontify the group and the line number
...
* lisp/progmodes/xref.el (xref--show-defs-minibuffer):
Fontify the group and the line number.
2020-12-05 03:01:34 +02:00
Dmitry Gutov
2945fe74a9
Hide the common parent directory, if any
...
* lisp/progmodes/xref.el (xref--show-defs-minibuffer):
Hide the common parent directory, if any.
2020-12-05 03:01:34 +02:00
William Xu
469f0a6516
xref--show-defs-minibuffer: new "show definitions" UI
...
* lisp/progmodes/xref.el (xref--show-defs-minibuffer):
New function to use as xref-show-definitions-function
(https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00824.html ).
2020-12-05 03:00:38 +02:00
Andrea Corallo
eb8d15547b
* Do not compile comp-cstr.el in vanilla builds
...
* lisp/Makefile.in (compile-targets): Filter out 'comp-cstr.elc'
in vanilla builds.
2020-12-04 23:23:32 +01:00
Andrea Corallo
39bdb3f6f5
Vanilla build warning clean-up
...
* lisp/emacs-lisp/disass.el (native-comp-unit-file)
(subr-native-comp-unit): Declare function.
* lisp/progmodes/elisp-mode.el (native-compile): Likewise.
* lisp/emacs-lisp/package.el (comp-el-to-eln-filename): Likewise.
* lisp/startup.el (normal-top-level): Silence warning.
* src/data.c (syms_of_data): 'Ssubr_native_lambda_list' is always
defined.
* src/pdumper.c (dump_cold_native_subr): Move under ifdefs.
(dump_drain_cold_data): Add ifdefs.
2020-12-04 23:21:15 +01:00
Andrea Corallo
dcfd367d28
* Fix `load-history' causing a number of spurious compiler warnings
...
* src/comp.c (Fcomp__register_subr): Fix missing entry into
`load-history' indicating that the loaded function was already an
autoload.
2020-12-04 23:21:08 +01:00
Spencer Baugh
39915c7084
* src/alloc.c (Fgarbage_collect_maybe): New function
2020-12-04 17:21:02 -05:00
Dmitry Gutov
27af17b9ee
Improve docstrings
...
* lisp/progmodes/xref.el (xref-search-program-alist)
(xref-search-program): Improve docstrings.
2020-12-04 23:23:03 +02:00