Commit graph

73234 commits

Author SHA1 Message Date
Aaron S. Hawley
d64c72f50c Allow generating wiki and mediawiki tables
* lisp/textmodes/table.el (table--generate-source-prologue)
(table--generate-source-epilogue)
(table--generate-source-scan-rows)
(table--generate-source-cells-in-a-row): Insert the wiki/mediawiki
separators.

* lisp/textmodes/table.el (table-source-languages): Add support
for wiki and mediawiki tables (bug#13287).

2019-06-27  Lars Ingebrigtsen  <larsi@gnus.org>

	* doc/emacs/text.texi (Table Misc): Mention the new wiki and
	mediawiki formats.
2019-06-27 13:55:04 +02:00
Wilfred Hughes
573de396f0 Apply font-lock in hexl-mode buffers
* lisp/hexl.el (hexl-mode): After setting font-lock-defaults, we
need to call `font-lock-ensure' to apply hexl-mode faces
(bug#24645).
2019-06-27 13:30:36 +02:00
Juanma Barranquero
e3b70e6b2d Add :local specifier to defcustom
* lisp/custom.el (custom-declare-variable): Allow the new :local
parameter (bug#14591).
(defcustom): Document it.
2019-06-27 13:26:45 +02:00
Paul Eggert
1d9bb2ff70 Tweak ‘error’ and ‘user-error’ doc strings
* lisp/net/tramp.el (tramp-user-error):
* lisp/subr.el (user-error):
Say that user errors are sometimes called pilot errors.
* lisp/subr.el (error, user-error):
Reorder wording to discuss mechanism first, then formatting advice,
rather than going back and forth between the two topics.
Tighten up the wording a bit.
2019-06-27 02:37:08 -07:00
Stefan Kangas
f90e0c5661 Clarify error and user-error docstrings
* lisp/subr.el (error, user-error)
* lisp/net/tramp.el (tramp-user-error): Change "pilot error" to "user
error" and improve documentation.
2019-06-27 02:37:08 -07:00
Mattias Engdegård
cda2f52b94 Document bug in `replace-regexp-in-string'
`replace-regexp-in-string' omits the first START characters of the
input string in its return value.  This is a clear bug, but fixing it
probably causes more trouble; document the behaviour instead (bug#36372).

* doc/lispref/searching.texi (Search and Replace)
* lisp/subr.el (replace-regexp-in-string):
Document current behaviour.
2019-06-26 19:39:32 +02:00
Stefan Monnier
85871ae9ce * lisp/textmodes/page-ext.el (sort-pages-buffer): Fix typo
Reported by Marco Wahl <marcowahlsoft@gmail.com>.
Update `Commentary:` to use the new command names.
(pages--ctl-x-ctl-p-map): Fix `mark-page` binding.
(pages-directory-mode-map): Update `add-new-page` => `pages-add-new-page`.
2019-06-26 12:49:01 -04:00
Andrzej P
d4a0e41829 Fix redisplay of registers in gdb-mi
* lisp/progmodes/gdb-mi.el (gdb-update): Call
gdb-get-changed-registers before updating the GDB-MI buffers.
(Bug#16366)

Copyright-paperwork-exempt: yes
2019-06-26 19:14:25 +03:00
Bruce Stephens
baee135c31 * lisp/calc/calc-ext.el (math-scalarp): Fix typo 2019-06-26 10:26:18 -04:00
Stefan Monnier
0b4e003766 Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"
This reverts commit 698ff554ac.
2019-06-26 10:24:59 -04:00
Johan Claesson
699fce296b help-C-file-name shouldn't error out if we can't find the name
* lisp/help-fns.el (help-C-file-name): Make help-C-file-name
return nil instead of signalling an error if we can't find the
file name (bug#17250).

Copyright-paperwork-exempt: yes
2019-06-26 16:06:42 +02:00
Stefan Monnier
698ff554ac * lisp/calc/calc-ext.el (math-scalarp): Fix typo 2019-06-26 10:03:48 -04:00
Noam Postavsky
9233865b70 Fix (rx-to-string (and (literal STR) (regexp STR)) regression
* lisp/emacs-lisp/rx.el (rx-regexp, rx-literal): Check the cadr of the
form for stringness, not the form itself.
* test/lisp/emacs-lisp/rx-tests.el (rx-to-string-lisp-forms): New test.
2019-06-26 08:50:27 -04:00
Mattias Engdegård
260b6c2c93 Merge consecutive constant `concat' args (bug#14769)
Suggested by Shigeru Fukaya <shigeru.fukaya@gmail.com>

* lisp/emacs-lisp/byte-opt.el (byte-optimize-concat): New.
(concat): Add byte-optimizer.
2019-06-26 11:39:12 +02:00
Stefan Monnier
1bc1672f77 * lisp/calc/calc.el: Take advantage of native bignums.
Remove redundant :group args.

(calc-trail-mode): Use inhibit-read-only.
(math-bignum-digit-length, math-bignum-digit-size)
(math-small-integer-size): Delete constants.
(math-normalize): Use native bignums.
(math-bignum, math-bignum-big): Delete functions.
(math-make-float): The mantissa can't be a calc bignum any more.
(math-neg, math-scale-left, math-scale-right, math-scale-rounding)
(math-add, math-sub, math-mul, math-idivmod, math-quotient)
(math-format-number, math-read-number, math-read-number-simple):
Don't bother handling calc bignums.
(math-div10-bignum, math-scale-left-bignum, math-scale-right-bignum)
(math-add-bignum, math-sub-bignum, math-mul-bignum, math-mul-bignum-digit)
(math-div-bignum, math-div-bignum-digit, math-div-bignum-big)
(math-div-bignum-part, math-div-bignum-try, math-format-bignum)
(math-format-bignum-decimal, math-read-bignum): Delete functions.
(math-numdigs): Don't presume that native ints are small enough to use
a slow algorithm.

* lisp/calc/calc-aent.el (calc-do-quick-calc):
* lisp/calc/calc-vec.el (calcFunc-vunpack):
* lisp/calc/calc-alg.el (math-beforep): Don't bother handling calc bignums.

* lisp/calc/calc-bin.el (math-bignum-logb-digit-size)
(math-bignum-digit-power-of-two): Remove constants.
(calcFunc-and, math-binary-arg, calcFunc-or, calcFunc-xor)
(calcFunc-diff, calcFunc-not, math-clip, math-format-twos-complement):
Use Emacs's builtin bignums.
(math-and-bignum, math-or-bignum, math-xor-bignum, math-diff-bignum)
(math-not-bignum, math-clip-bignum)
(math-format-bignum-radix, math-format-bignum-binary)
(math-format-bignum-octal, math-format-bignum-hex): Delete functions.
(math-format-binary): Fix old copy&paste error.

* lisp/calc/calc-comb.el (calc-prime-factors): Adjust for unused arg.
(math-prime-test): math-fixnum is now the identity.

* lisp/calc/calc-ext.el: Require cl-lib.
(math-oddp): Use cl-oddp.  Don't bother with calc bignums.
(math-integerp, math-natnump, math-ratp, math-realp, math-anglep)
(math-numberp, math-scalarp, math-vectorp, math-objvecp, math-primp)
(math-num-natnump, math-objectp, math-check-integer, math-compare):
Don't bother handling calc bignums.
(math-check-fixnum): Use fixnump.
(math-fixnum, math-fixnum-big, math-bignum-test): Remove functions.
(math--format-integer-fancy): Rename from math-format-bignum-fancy.
Adjust for internal bignums.

* lisp/calc/calc-funcs.el (calcFunc-besJ): Use cl-isqrt.

* lisp/calc/calc-macs.el (Math-zerop, Math-integer-negp)
(Math-integer-posp, Math-negp, Math-posp, Math-integerp)
(Math-natnump, Math-ratp, Math-realp, Math-anglep, Math-numberp)
(Math-scalarp, Math-vectorp, Math-objectp, Math-objvecp)
(Math-integer-neg, Math-primp, Math-num-integerp):
Don't bother handling calc bignums.
(Math-bignum-test): Delete function.

* lisp/calc/calc-math.el (math-use-emacs-fn): Remove unused `fx`.
(math-isqrt, math-sqrt): Use cl-isqrt.  Don't bother handling calc bignums.
(math-isqrt-bignum, math-isqrt-bignum-iter, math-isqrt-small):
Delete function.

* lisp/calc/calc-misc.el (math-fixnump, math-fixnatnump): Use fixnump.
(math-evenp): Use cl-evenp.
(math-zerop, math-negp, math-posp, math-div2): Don't bother handling
calc bignums.
(math-div2-bignum): Delete function.
2019-06-25 23:05:11 -04:00
Noam Postavsky
9552ee4df7 Merge from emacs-26
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary.
572e34bb6f Rename 'make-symbolic-link' argument NEWNAME to LINKNAME
04477adedc Check that length of data returned by sysctl is non-zero
81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): D...
9d48979ca8 Fix Python tests depending on system-type
fcf6cc3177 Fix problem with wdired test when symlinks cannot be created.
4701e0663e Improve wording of documentation of click events

# Conflicts:
#	lisp/textmodes/sgml-mode.el
#	test/lisp/textmodes/sgml-mode-tests.el
2019-06-25 22:04:13 -04:00
Noam Postavsky
66aa770942 Merge from emacs-26
2b765c650a Remove outdated comment in winner.el (Bug#36185)
2019-06-25 22:02:27 -04:00
Noam Postavsky
648fdbbcec Don't bind search-spaces-regexp around possible autoload (Bug#35802)
* lisp/isearch.el (isearch-search-fun-default): Move possible autoload
trigger outside let-binding of search-spaces-regexp.
* lisp/char-fold.el (char-fold-make-table): Remove no longer needed
workaround.

* lisp/info.el (Info-search-whitespace-regexp):
* lisp/isearch.el (search-whitespace-regexp):
* src/search.c (syms_of_search) <search-spaces-regexp>: Add warning
about adding capturing groups to the value.

* test/lisp/char-fold-tests.el: Remove, binding search-spaces-regexp
to a different should be considered a bug.
2019-06-25 22:00:03 -04:00
Noam Postavsky
b59ffd2290 Support (rx (and (regexp EXPR) (literal EXPR))) (Bug#36237)
* lisp/emacs-lisp/rx.el (rx-regexp): Allow non-string forms.
(rx-constituents): Add literal constituent, which is like a plain
STRING form, but allows arbitrary lisp expressions.
(rx-literal): New function.
(rx-compile-to-lisp): New variable.
(rx--subforms): New helper function for handling subforms, including
non-constant case.
(rx-group-if, rx-and, rx-or, rx-=, rx->=, rx-repeat, rx-submatch)
(rx-submatch-n, rx-kleene, rx-atomic-p): Use it to handle non-constant
subforms.
(rx): Document new form, wrap non-constant forms with concat call.
* test/lisp/emacs-lisp/rx-tests.el (rx-tests--match): New macro.
(rx-nonstring-expr, rx-nonstring-expr-non-greedy): New tests.
* etc/NEWS: Announce changes.
2019-06-25 22:00:03 -04:00
Lars Ingebrigtsen
e8d174304a Fix previous patch to dired-mark-if
* lisp/dired.el (dired-mark-if): Don't use looking-at to check for
characters.
2019-06-26 01:15:06 +02:00
Noam Postavsky
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Use
syntax-ppss-table if set.  This is only needed on the release branch,
on master the caller (syntax-propertize) already does this.
(sgml-mode): Set syntax-ppss-table to sgml-tag-syntax-table.  This
correctly classifies parens as punctuation, so they won't confuse the
parser.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New test copied from master, with two cases added for this bug.
2019-06-25 18:58:23 -04:00
Noam Postavsky
06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary. 2019-06-25 18:58:23 -04:00
Dima Kogan
7dcefa7a2b View-search-... now hit all the matches, regardless of window position
* lisp/view.el (view-search): Jump to the next/prev occurrence of
the search, even if it's displayed in the buffer (bug#18131).
This seems more logical than the previous (undocumented) behaviour.
2019-06-26 00:49:24 +02:00
Emilio C. Lopes
349b778dde Support opening a new connection when reverting a telnet buffer
* net/telnet.el (telnet-connect-command): New variable.
(telnet-revert-buffer): New function.
(telnet-mode): Use `telnet-revert-buffer' as `revert-buffer-function'.
(telnet, rsh): Set `telnet-connect-command' accordingly (bug#18312).

Copyright-paperwork-exempt: yes
2019-06-25 23:40:22 +02:00
Arash Esbati
52e17e53b7 Suppress warning about unix-sync in nnmaildir.el
* nnmaildir.el (nnmaildir-request-replace-article): Check if the
function `unix-sync' is bound before running it.
2019-06-25 23:24:47 +02:00
Ivan Shmakov
3942821425 Check labels in smerge-mode
* lisp/vc/diff.el (diff-check-labels): Separated out into its own
function (bug#18850)...
(diff-no-select): ... from here.

* lisp/vc/smerge-mode.el (smerge-diff): Use diff-check-labels.
2019-06-25 23:23:01 +02:00
Basil L. Contovounesios
4217398de3 Avoid using subr-x.el function in files.el
* lisp/files.el (file-size-human-readable): Open code string-empty-p
call.  This was the single occurrence of a subr-x.el function in
files.el, which does not (yet) load subr-x.el.
2019-06-25 22:12:02 +01:00
Stefan Monnier
5463b7e77a * lisp/emacs-lisp/cl-extra.el (cl-isqrt): Speed up bignum case 2019-06-25 17:08:01 -04:00
Jonathan Shin Hayase
955e370373 Highlight zsh glob flags and qualifiers in sh-mode
* lisp/progmode/sh-script.el (sh-syntax-propertize-function):
Add regexps to highlight zsh glob flags and alternate qualifiers
without mistaking them for comments. (bug#19455).
2019-06-25 23:00:20 +02:00
Stefan Monnier
51e4457a90 * lisp/tar-mode.el: Use lexical-binding; remove redundant :groups.
(tar-new-entry): Remove unused var `buffer`.
2019-06-25 16:36:53 -04:00
Lars Ingebrigtsen
98247645a7 Move widen/narrow in tabulated lists to } and {
* doc/emacs/buffers.texi (Several Buffers): Document it.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map):
Move widen/narrow to `}' and `{'.
2019-06-25 22:34:55 +02:00
Stefan Monnier
93b823b6e4 * lisp/net/tramp.el (tramp-file-name-handler): Use autoload-do-load 2019-06-25 16:09:48 -04:00
Ivan Shmakov
0ab24743f1 Heed default directory in tar-untar-buffer
* lisp/tar-mode.el (tar-untar-buffer): Fix use the value of
default-directory local to the tar-mode buffer (bug#19865).
2019-06-25 19:54:35 +02:00
Glenn Morris
55ccd1b485 * lisp/info.el (info-emphasis): Fix doc, version. 2019-06-25 09:13:22 -07:00
Vaidheeswaran C
9de1177a1e Preserve header lines from derived modes in tabulated lists
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Preserve header line set by derived modes (bug#21025).
2019-06-25 18:09:54 +02:00
Drew Adams
90c25b2452 Make dired commands report how many files they mark
* lisp/dired.el (dired-mark-if): Report the number of files marked
when called, not the total number of marked files (bug#22457).
2019-06-25 17:44:56 +02:00
Stefan Monnier
da263640c8 * lisp/simple.el (forward-visible-line, end-of-visible-line): Use invisible-p 2019-06-25 11:35:56 -04:00
Lars Ingebrigtsen
b26c2767ed Add a new command to report the number and size of the marked files
2019-06-25  Constantino Calancha  <f92capac@gmail.com>

	* lisp/dired.el (dired-mode-map): New keystroke and menu binding
	(bug#22829).

2019-06-25  Lars Ingebrigtsen  <larsi@gnus.org>

	* doc/emacs/dired.texi (Marks vs Flags): Document it.

	* lisp/dired.el (dired-number-of-marked-files): New command.
2019-06-25 16:29:03 +02:00
Phil Sainty
9e81b22113 Fix `goto-address-url-regexp'
* lisp/net/goto-addr.el (goto-address-uri-schemes-ignored): New
variable.
(goto-address-uri-schemes): Ditto.
(goto-address-url-regexp): Use them to compose the final regexp.

* lisp/net/goto-addr.el: The URI schemes to be recognised by
`goto-address-mode' were not regexp-quoted (Bug#23343).
2019-06-25 16:02:12 +02:00
Tino Calancha
0454bfd331 Make winner restore point in all windows that display a buffer
* lisp/window.el (window--before-delete-windows): New defun.
(delete-window, delete-other-windows): Use it.
* lisp/winner.el (winner-set): Use marker in 'window-prev-buffers'
when available and different than the value returned by
'winner-get-point' (bug#23621).
2019-06-25 15:42:17 +02:00
Bastian Beischer
e195bbd95a Use xref in cedet
* lisp/cedet/semantic/complete.el (semantic-complete-jump-local)
* lisp/cedet/semantic/analyze/refs.el
(semantic-analyze-proto-impl-toggle): Use xref to handle jumping
(bug#23793).

Copyright-paperwork-exempt: yes
2019-06-25 15:12:04 +02:00
Drew Adams
72963b4e82 Fontify _emphasis_ in info nodes
* lisp/info.el (Info-fontify-node): Fontify _emphasis_ (bug#23798).
(info-emphasis): New face.
2019-06-25 14:53:52 +02:00
Robert Weiner
e9b05221ab Unlispify even more in custom-unlispify-menu-entry
* lisp/cus-edit.el (custom-unlispify-menu-entry): Also allow : and
/ as separators in symbols when making the symbols look more
human-readable (bug#23986).
2019-06-25 14:53:52 +02:00
Michael Shields
14fc8a108b [PATCH 1/1] Pass frame-parameters to server-create-tty-frame
* lisp/server.el: Pass frame-parameters when creating frames, even
on a tty (bug#24147).
2019-06-25 14:53:51 +02:00
Basil L. Contovounesios
0d51f54236 Fix recent tex-mode safe-local-variable changes
* lisp/textmodes/tex-mode.el (tex-verbatim-environments): Replace
(delq t ...) with more usual (memq nil ...).
(latex-noindent-environments, latex-noindent-commands): Fix typos
and thinkos in safe-local-variable logic.
2019-06-25 13:40:32 +01:00
Fritz Stelzer
235ca1b4db Make xref-show-xrefs-function a defcustom
* lisp/progmodes/xref.el (xref-show-xrefs-function): Make into a
defcustome (bug#29206).

* lisp/progmodes/xref.el (xref-show-definitions-function): Ditto.

Copyright-paperwork-exempt: yes
2019-06-25 13:10:07 +02:00
Antoine Beaupré
ba476dc975 Add imenu support to package-menu-mode
* lisp/vc/vc-git.el (vc-git-grep-template): Include <C> in
template to be more consistent with lgrep/rgrep (bug#35326).  This
will introduce the --color and -i flags to the "git grep" command.

Copyright-paperwork-exempt: yes
2019-06-25 13:10:07 +02:00
Hong Xu
093f5d0045 Add imenu support to package-menu-mode
* gnus-cite.el (gnus-message-citation-mode): Fontify if the major
mode is derived from message-mode (not necessarily equal to
message-mode) (bug#25124).
2019-06-25 01:31:10 +02:00
Damien Cassou
cf9f481d98 Add imenu support to package-menu-mode
* lisp/emacs-list/package.el
(package--imenu-prev-index-position-function
package--imenu-extract-index-name-function): Add Imenu functions
to package-menu-mode (bug#27134).
2019-06-25 01:31:10 +02:00
Stefan Monnier
0ef3163959 * lisp/textmodes/tex-mode.el (latex-noindent-commands): New custom var
(latex-find-indent): Obey it.
(latex-noindent-environments): Make it into a defcustom as well.
2019-06-24 19:21:07 -04:00