summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix point position after revert-buffer in tabulated-list modeEli Zaretskii2019-10-271-1/+6
| | | | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Don't use count-screen-lines, as it is unreliable when lines are truncated and the region ends before a newline (the root cause is in vertical-motion, but is very hard to fix there). Instead, use vertical-motion directly, as the problems with counting/not counting the newline that ends the region are not relevant to what we need in this function, which is simply the number of the current window line. (Bug#37941)
* Expand rx definitions inside (not ...)Mattias Engdegård2019-10-271-0/+3
| | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-not): * test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-def-in-not): * doc/lispref/searching.texi (Rx Constructs, Extending Rx): Allow user-defined rx constructs to be expanded inside (not ...) forms, for better composability (bug#37849).
* * lisp/tab-bar.el (tab-bar-switch-to-recent-tab): New command.Juri Linkov2019-10-271-0/+2
| | | | | | | | | (tab-recent): Alias to tab-bar-switch-to-recent-tab. (tab-bar--tab-index-recent): New internal function. (tab-bar-close-tab-select): Add new default option 'recent'. (tab-bar-close-tab): Handle it. * lisp/emacs-lisp/seq.el (seq-sort-by, seq-remove): Add autoload.
* rx.el: Refactor user-definition expansionMattias Engdegård2019-10-241-41/+56
| | | | | | * lisp/emacs-lisp/rx.el (rx--translate-not): Simplify structure. * lisp/emacs-lisp/rx.el (rx--expand-def): New. (rx--translate-symbol, rx--translate-form): Use rx--expand-def.
* rx doc string tweaksMattias Engdegård2019-10-221-3/+4
| | | | | * lisp/emacs-lisp/rx.el (rx--translate-seq, rx--translate-or, rx): Say "zero or more" instead of "one or more" where applicable.
* Make edebug-eval-last-sexp interactively take a zero prefixLars Ingebrigtsen2019-10-221-10/+29
| | | | | | * lisp/emacs-lisp/edebug.el (edebug-eval-last-sexp): Make the zero prefix work analogously to in eval-last-sexp (bug#28895). (edebug-eval-print-last-sexp): Ditto.
* * lisp/emacs-lisp/cursor-sensor.el: Make it possible to reveal invisible textStefan Monnier2019-10-211-8/+18
| | | | | (cursor-sensor-mode): Hook into post-command-hook as well. (cursor-sensor--detect): Make argument optional.
* Tiny clean-up of previous edebug patchLars Ingebrigtsen2019-10-211-1/+1
| | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Clean up code slightly.
* Ensure we always remove the breakpoint overlaysLars Ingebrigtsen2019-10-211-1/+1
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--display-1): Remove the overlays here -- this cleans up after exiting no matter how we exited.
* Add fringe markers to edebug breakpointsLars Ingebrigtsen2019-10-211-5/+18
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Set a fringe element to mark the breakpoint. (edebug-breakpoint): Fringe marker.
* Don't try to add nil packages on refreshStefan Kangas2019-10-211-1/+4
| | | | | | | | | * lisp/emacs-lisp/package.el (package-read-archive-contents): Don't try to add nil entries. Warn instead. (Bug#28502) * test/lisp/emacs-lisp/package-tests.el (package-test-update-archives/ignore-nil-entry): New test. * test/lisp/emacs-lisp/package-resources/with-nil-entry/archive-contents: New file.
* Add a command to toggle an edebug breakpointLars Ingebrigtsen2019-10-201-4/+39
| | | | | | | | | | * doc/lispref/edebug.texi (Breakpoints): Document this. * lisp/emacs-lisp/edebug.el (edebug-disabled-breakpoint): New face (bug#23472). (edebug-enabled-breakpoint): Rename. (edebug--overlay-breakpoints): Use the new face. (edebug-toggle-disable-breakpoint): New command and keystroke.
* Add missing rx symbols `bow' and `eow' to documentationMattias Engdegård2019-10-201-2/+2
| | | | | * doc/lispref/searching.texi (Rx Constructs): * lisp/emacs-lisp/rx.el (rx): Add missing synonyms.
* Make edebug-mode-map take precedenceLars Ingebrigtsen2019-10-201-2/+6
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--recursive-edit): Bind minor-mode-overriding-map-alist to avoid other minor modes hiding the edebug commands (bug#11018).
* Fix edebug--restore-breakpoints re-instrumentinging bug-outLars Ingebrigtsen2019-10-201-17/+18
| | | | | * lisp/emacs-lisp/edebug.el (edebug--restore-breakpoints): Don't bug out when instrumenting/de-instrumenting/re-instrumenting.
* Add a new edebug-breakpoint faceLars Ingebrigtsen2019-10-201-1/+4
| | | | | | * doc/lispref/edebug.texi (Breakpoints): Mention it. * lisp/emacs-lisp/edebug.el (edebug-breakpoint): New face.
* New command to clear all breakpoints in a functionLars Ingebrigtsen2019-10-201-0/+12
| | | | | | | * doc/lispref/edebug.texi (Breakpoints): Mention it. * lisp/emacs-lisp/edebug.el (edebug-unset-breakpoints): New command and keystroke.
* Preserve breakpoints when Edebug-reinstrumenting functionsLars Ingebrigtsen2019-10-202-6/+28
| | | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): New function (bug#23470). * lisp/emacs-lisp/seq.el (seq-position): Autoload.
* Change default to cancel all edebug-on-entry in cancel-edebug-on-entryLars Ingebrigtsen2019-10-201-11/+20
| | | | | * lisp/emacs-lisp/edebug.el (cancel-edebug-on-entry): Make the default to cancel all edebug-on-entry.
* Use user-error in cancel-edebug-on-entryLars Ingebrigtsen2019-10-201-1/+1
| | | | | * lisp/emacs-lisp/edebug.el (cancel-edebug-on-entry): This is a user-class error, so use user-error.
* Instrument function if it hasn't been already in edebug-set-breakpointLars Ingebrigtsen2019-10-201-0/+5
| | | | | * lisp/emacs-lisp/edebug.el (edebug-set-breakpoint): Instrument form automatically when using this function (bug#23469).
* Fix up previous edebug breakpoint overlay changeLars Ingebrigtsen2019-10-201-6/+8
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Only make the overlays in edebug mode, so that we remove them when we exit.
* Mark breakpoints in edebug with highlightsLars Ingebrigtsen2019-10-201-1/+23
| | | | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints) (edebug--overlay-breakpoints-remove): New functions (bug#23468). (edebug-modify-breakpoint): Use them to highlight breakpoints. (edebug--display-1): Restore breakpoint highlights. (edebug--recursive-edit): Remove highlights on exit.
* lisp/*.el: Fix typos and improve some docstringsJuanma Barranquero2019-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (auth-source-backend-parse-parameters) (auth-source-search-collection) (auth-source-secrets-listify-pattern) (auth-source--decode-octal-string, auth-source-plstore-search): * lisp/registry.el (registry-lookup) (registry-lookup-breaks-before-lexbind) (registry-lookup-secondary, registry-lookup-secondary-value) (registry-search, registry-delete, registry-size, registry-full) (registry-insert, registry-reindex, registry-prune) (registry-collect-prune-candidates): * lisp/subr.el (nbutlast, process-live-p): * lisp/tab-bar.el (tab-bar-list): * lisp/cedet/ede/linux.el (ede-linux--get-archs) (ede-linux--include-path, ede-linux-load): * lisp/erc/erc-log.el (erc-log-all-but-server-buffers): * lisp/erc/erc-pcomplete.el (pcomplete-erc-commands) (pcomplete-erc-ops, pcomplete-erc-not-ops, pcomplete-erc-nicks) (pcomplete-erc-all-nicks, pcomplete-erc-channels) (pcomplete-erc-command-name, pcomplete-erc-parse-arguments): * lisp/eshell/em-term.el (eshell-visual-command-p): * lisp/gnus/gnus-cache.el (gnus-cache-fully-p): * lisp/gnus/nnmail.el (nnmail-get-active) (nnmail-fancy-expiry-target): * lisp/mail/mail-utils.el (mail-string-delete): * lisp/mail/supercite.el (sc-hdr, sc-valid-index-p): * lisp/net/ange-ftp.el (ange-ftp-use-smart-gateway-p): * lisp/net/nsm.el (nsm-save-fingerprint-maybe) (nsm-network-same-subnet, nsm-should-check): * lisp/net/rcirc.el (rcirc-looking-at-input): * lisp/net/tramp-cache.el (tramp-get-hash-table): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-smb.el (tramp-smb-get-share) (tramp-smb-get-localname, tramp-smb-read-file-entry) (tramp-smb-get-cifs-capabilities, tramp-smb-get-stat-capability): * lisp/net/zeroconf.el (zeroconf-list-service-names) (zeroconf-list-service-types, zeroconf-list-services) (zeroconf-get-host, zeroconf-get-domain) (zeroconf-get-host-domain): * lisp/nxml/rng-xsd.el (rng-xsd-compile) (rng-xsd-make-date-time-regexp, rng-xsd-convert-date-time): * lisp/obsolete/erc-hecomplete.el (erc-hecomplete) (erc-command-list, erc-complete-at-prompt): * lisp/org/ob-scheme.el (org-babel-scheme-get-buffer-impl): * lisp/org/ob-shell.el (org-babel--variable-assignments:sh-generic) (org-babel--variable-assignments:bash_array) (org-babel--variable-assignments:bash_assoc) (org-babel--variable-assignments:bash): * lisp/org/org-clock.el (org-day-of-week): * lisp/progmodes/cperl-mode.el (cperl-char-ends-sub-keyword-p): * lisp/progmodes/gud.el (gud-find-c-expr, gud-innermost-expr) (gud-prev-expr, gud-next-expr): * lisp/textmodes/table.el (table--at-cell-p, table--probe-cell) (table--get-cell-justify-property) (table--get-cell-valign-property) (table--put-cell-justify-property) (table--put-cell-valign-property): Fix typos. * lisp/so-long.el (fboundp): Doc fix. (so-long-mode-line-info, so-long-mode) (so-long--check-header-modes): Fix typos. * lisp/emulation/viper-mous.el (viper-surrounding-word) (viper-mouse-click-get-word): Fix typos. (viper-mouse-click-search-word): Doc fix. * lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p) (erc-bounds-of-word-at-point): Fix typos. (erc-decode-string-from-target, define-erc-response-handler): Refill docstring. * lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC): Fix typo. (erc-dcc-get-host, erc-dcc-auto-mask-p, erc-dcc-get-file): Doc fixes. * lisp/erc/erc-networks.el (erc-network-name): Fix typo. (erc-determine-network): Refill docstring. * lisp/net/dbus.el (dbus-list-hash-table) (dbus-string-to-byte-array, dbus-byte-array-to-string) (dbus-check-event): Fix typos. (dbus-introspect-get-property): Doc fix. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Rename ARGS to ARGUMENTS. Doc fix. (tramp-adb-sh-fix-ls-output, tramp-adb-execute-adb-command) (tramp-adb-find-test-command): Fix typos. * lisp/net/tramp.el (tramp-set-completion-function) (tramp-get-completion-function) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-get-inode, tramp-get-device, tramp-mode-string-to-int) (tramp-call-process, tramp-call-process-region) (tramp-process-lines): Fix typos. (tramp-interrupt-process): Doc fix. * lisp/org/ob-core.el (org-babel-named-src-block-regexp-for-name) (org-babel-named-data-regexp-for-name): Doc fix. (org-babel-src-block-names, org-babel-result-names): Fix typos. * lisp/progmodes/inf-lisp.el (lisp-input-filter): Doc fix. (lisp-fn-called-at-pt): Fix typo. * lisp/progmodes/xref.el (xref-backend-identifier-at-point): Doc fix. (xref-backend-identifier-completion-table): Fix typo.
* New command edebug-remove-instrumentationLars Ingebrigtsen2019-10-201-0/+18
| | | | | | | * doc/lispref/edebug.texi (Instrumenting): Document it. * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): New command (bug#15843).
* Fix doc string and interactive spec of cancel-edebug-on-entryLars Ingebrigtsen2019-10-201-1/+24
| | | | | | | | * lisp/emacs-lisp/edebug.el (cancel-edebug-on-entry): Add doc string and make the interactive spec complete over functions that have the spec (bug#10806). (edebug-cancel-edebug-on-entry): Add alias for discoverability. (edebug-on-entry): Clarify what this command does.
* Revert "Add an edebug-cancel-debug-on-entry alias"Lars Ingebrigtsen2019-10-201-2/+0
| | | | | | This reverts commit cea9577b7d6fcf01599afd48078f8ff1defb1297. cancel-edebug-on-entry and cancel-debug-on-entry are not the same functions.
* Add an edebug-cancel-debug-on-entry aliasLars Ingebrigtsen2019-10-201-0/+2
| | | | | * lisp/emacs-lisp/debug.el (edebug-cancel-debug-on-entry): Add an alias for easier discoverability (bug#10806).
* Use [^z-a] for matching any character (anychar/anything) in rxMattias Engdegård2019-10-181-1/+1
| | | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-symbol): * test/lisp/emacs-lisp/rx-tests.el (rx-any, rx-atoms): Use [^z-a] instead of ".\\|\n" for anychar. The new expression is faster (about 2×) and does not allocate regexp stack space. For example, (0+ anychar) now matches strings of any size (bug#37659).
* Add `unmatchable' as alias for (or) in rx (bug#37659)Mattias Engdegård2019-10-181-2/+3
| | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-symbol, rx--builtin-symbols, rx): * test/lisp/emacs-lisp/rx-tests.el (rx-atoms): * doc/lispref/searching.texi (Rx Constructs): * etc/NEWS: Add `unmatchable', more descriptive than (or), and corresponding to the variable `regexp-unmatchable'.
* Add `anychar' as alias to `anything' in rx (bug#37659)Mattias Engdegård2019-10-181-4/+3
| | | | | | | | | * lisp/emacs-lisp/rx.el (rx--translate-symbol, rx--builtin-symbols, rx): * test/lisp/emacs-lisp/rx-tests.el (rx-atoms): * doc/lispref/searching.texi (Rx Constructs): * etc/NEWS: Add `anychar', an alias for `anything'. Since `anychar' is more descriptive (and slightly shorter), treat it as the preferred name.
* Extend debug spec of cl-flet (Bug#34481)Michael Heerdegen2019-10-171-1/+3
| | | | | * lisp/emacs-lisp/cl-macs.el (cl-flet): Extend debug spec to cover definitions of the form (FUNC EXP).
* lisp/*.el: Force non-nil result to t, to match docstringJuanma Barranquero2019-10-171-1/+2
| | | | | | | | | | | | | * lisp/emacs-lock.el (emacs-lock-live-process-p): * lisp/shadowfile.el (shadow-file-match): * lisp/emacs-lisp/edebug.el (edebug-basic-spec): * lisp/mail/rmail.el (rmail-expunge-confirmed): * lisp/net/soap-client.el (soap-should-encode-value-for-xs-element): * lisp/progmodes/idlwave.el (idlwave-quoted): * lisp/progmodes/idlw-shell.el (idlwave-shell-filename-string): * lisp/textmodes/refbib.el (r2b-isa-proceedings): * lisp/textmodes/texnfo-upd.el (texinfo-find-lower-level-node): Normalize boolean result.
* Fix some &rest body edebug specsLars Ingebrigtsen2019-10-164-6/+6
| | | | | | | | | | | | * lisp/ses.el (ses--letref): * lisp/emacs-lisp/crm.el (crm--completion-command): Fix edebug &rest body spec (bug#28747). * lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): * lisp/emacs-lisp/inline.el (inline--leteval) (inline--letlisteval, inline-letevals):
* Update CEDET manual tests so that they run.Eric Ludlam2019-10-151-0/+2
| | | | | | | To run visit test/manual/cedet/cedet-utests.el M-x eval-buffer M-x cedet-utest Author: Eric Ludlam <zappo@gnu.org>
* Add new macro `benchmark-progn'Lars Ingebrigtsen2019-10-151-0/+24
| | | | | | * doc/lispref/debugging.texi (Profiling): Mention it. * lisp/emacs-lisp/benchmark.el (benchmark-progn): New macro.
* Correctly explain test failures with mixed uni/multibyte stringsMattias Engdegård2019-10-131-0/+5
| | | | | | | | | * lisp/emacs-lisp/ert.el (ert--explain-equal-rec): * test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-equal): When explaining a difference between a unibyte and a multibyte string, first convert both to multibyte. Otherwise, we might end up comparing unibyte char C to multibyte char C, 127<C<256, and not detect the difference (bug#30219).
* Make the cl-letf doc string link to the manualLars Ingebrigtsen2019-10-121-0/+2
| | | | | * lisp/emacs-lisp/cl-macs.el (cl-letf): Add a link to the manual from the doc string (bug#24459).
* ert-deftest macro doc string clarificationLars Ingebrigtsen2019-10-121-0/+4
| | | | | * lisp/emacs-lisp/ert.el (ert-deftest): Mention that macros are expanded when defined, not when tested (bug#21742).
* * lisp/emacs-lisp/map.el (map-into) <hash-table>: Allow keyword argsAndrea Corallo2019-10-111-9/+22
| | | | | | | | (map--into-hash): New function, extracted from `map-into <hash-table>`. Speed it up a bit by using gethash instead of map-elt when we know we're accessing a hash table. * test/lisp/emacs-lisp/map-tests.el (test-map-into): Add corresponding test.
* Make checkdoc work better with cl-lib functionsdick r. chiang2019-10-101-3/+2
| | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info): Make checkdoc work for cl-lib methods with more complex parameter lists (bug#37063). Copyright-paperwork-exempt: yes
* Allow global-edebug-prefix to be nilLars Ingebrigtsen2019-10-091-2/+3
| | | | | | * lisp/emacs-lisp/edebug.el (global-edebug-prefix): Allow global-edebug-prefix to be nil (if the user doesn't want that prefix) (bug#25188).
* Fix typos in lisp/*.elJuanma Barranquero2019-10-091-3/+3
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/generator.el (cps--with-value-wrapper) (cps-inhibit-atomic-optimization, iter-close): * lisp/gnus/nnir.el (nnir-imap-search-arguments) (nnir-imap-search-argument-history, nnir-categorize) (nnir-ignored-newsgroups) (nnir-retrieve-headers-override-function) (nnir-imap-default-search-key, nnir-namazu-additional-switches) (gnus-group-make-nnir-group, nnir-add-result) (nnir-compose-result, nnir-run-imap, nnir-imap-make-query) (nnir-imap-query-to-imap, nnir-imap-expr-to-imap) (nnir-imap-next-term, nnir-run-swish-e, nnir-run-namazu) (nnir-read-parm, nnir-read-server-parm, nnir-search-thread): Trivial doc fixes.
* Filter packages by name in list-packages. (Bug#36981)Federico Tedin2019-10-081-12/+35
| | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-menu-filter-by-name): New function to filter packages by name. (package-menu-clear-filter): New function to clear applied filters. (package-menu-filter-by-keyword): Rename function from package-menu-filter. (package-menu--generate): Don't change 'q' binding anymore. (package-menu-mode-map): Bind '/ n' to package-menu-filter-by-name, '/ k' to package-menu-filter-by-keyword and '/ /' to package-menu-clear-filter. (package-menu-mode-menu): Update menu entries for the three functions. * test/lisp/emacs-lisp/package-tests.el (package-test-list-filter-by-name) (package-test-list-clear-filter): New tests. * doc/emacs/package.texi: Document usage of package-menu-filter-by-name, package-menu-clear-filter and update reference to package-menu-filter-by-keyword. * etc/NEWS: Announce changes.
* * lisp/emacs-lisp/package.el (package--get-deps): Fix thinkoStefan Monnier2019-10-081-1/+2
| | | | | * test/lisp/emacs-lisp/package-tests.el (package-test-get-deps): Adjust test to new calling convention.
* Use text properties instead of truncating stringsLars Ingebrigtsen2019-10-071-1/+1
| | | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag): Use this to allow using commands like `C-s' to search for even truncated bits. * lisp/international/mule-util.el (truncate-string-to-width): Allow using text properties to truncate strings instead of actually truncating strings (bug#17782).
* Improve recent doc fix for cl-reduceBasil L. Contovounesios2019-10-071-8/+10
| | | | | | | * lisp/emacs-lisp/cl-seq.el: (cl-reduce): Clarify treatment of :INITIAL-VALUE when :FROM-END is non-nil. Improve wording when SEQ is empty and :INITIAL-VALUE is unspecified (bug#37400). Describe behavior when SEQ comprises a single element.
* cl-reduce doc fixLars Ingebrigtsen2019-10-071-0/+5
| | | | | * lisp/emacs-lisp/cl-seq.el (cl-reduce): Clarify what happens when SEQ is the empty list (bug#37400).
* Make mailcap-prefer-mailcap-viewers work as documentedLars Ingebrigtsen2019-10-071-0/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-find): Autoload. * lisp/net/mailcap.el (mailcap-parse-mailcaps): Note where all the entries come from so that we can later distinguish between user values and system values (bug#36771). (mailcap-parse-mailcap): Take a source parameter. (mailcap-possible-viewers): No need to sort wildcards/exact matches; these are later sorted anyway. (mailcap-add-mailcap-entry): Remove `after' parameter. (mailcap-mime-info): Make mailcap-prefer-mailcap-viewers work as documented.
* * eieio-core.el (eieio--full-class-object): New function.Stefan Monnier2019-10-063-25/+27
| | | | | | | | | | | | | Rather than explicitly call eieio-class-un-autoload, the autoloading is now performed on-demand if you use eieio--full-class-object. * lisp/emacs-lisp/eieio-core.el (eieio-class-un-autoload): Remove. (eieio--full-class-object): New function, to replace it. (eieio-oref, eieio--class-precedence-list): * lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object): Use it instead of eieio-class-un-autoload. * lisp/emacs-lisp/eieio.el (eieio-class-parents, child-of-class-p): Load the class if needed.