summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Improve documentation of 'with-suppressed-warnings'.Philipp Stephani2020-05-081-5/+6
| | | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Refer to 'byte-compile-warnings' instead of 'byte-compile-warning-types', as only the former variable documents the available warning types.
* Revert "cl-loop: Calculate the array length just once"Noam Postavsky2020-05-051-9/+3
| | | | Don't merge to master. This is a safe-for-release fix for Bug#40727.
* Revert "cl-loop: Add missing guard condition"Noam Postavsky2020-05-051-25/+7
| | | | Don't merge to master. This is a safe-for-release fix for Bug#40727.
* Revert "Refix conditional step clauses in cl-loop"Noam Postavsky2020-05-051-37/+59
| | | | Don't merge to master. This is a safe-for-release fix for Bug#40727.
* Remove calls to non-existent functions from edebug.el.Alan Mackenzie2020-05-041-3/+1
| | | | | | | | | Do not merge to master. *lisp/emacs-lisp/edebug.el (edebug--display-1) (edebug-toggle-disable-breakpoint): Remove calls to edebug--overlay-breakpoints and edebug--overlay-breakpoints-removed which had been overlooked in a recent changed to edebug.
* Revert "Mark breakpoints in edebug with highlights". This fixes bug #40992Alan Mackenzie2020-05-031-40/+1
| | | | | | Do not merge to master. This reverts commit e8b3a15cb6ff187ce08afcb43bd9a0b7907268ca.
* Clarify semantics of trace-function CONTEXT argumentNoam Postavsky2020-04-251-1/+3
| | | | | * lisp/emacs-lisp/trace.el (trace-function-foreground): Explain that CONTEXT should be a function, when called from Lisp.
* ; Fix some typos and doc issues (bug#40695)Štěpán Němec2020-04-187-27/+23
|
* Fix edge case errors in filename-matching regexpsMattias Engdegård2020-04-142-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes fix actual or latent bugs in regexps that match file names, such as PATTERN arguments to 'directory-files'. See https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html * admin/authors.el (authors-obsolete-files-regexps) (authors-renamed-files-regexps): * lisp/auth-source-pass.el (auth-source-pass-entries): * lisp/calendar/todo-mode.el (todo-show, todo-find-filtered-items-file) (todo-filter-items, todo-reset-nondiary-marker, todo-reset-done-string) (todo-reset-comment-string, todo-reset-highlight-item): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches): * lisp/cedet/semantic/texi.el (semantic-texi-associated-files): * lisp/cedet/srecode/map.el (srecode-map-update-map): * lisp/dired.el (dired-re-no-dot): * lisp/emacs-lisp/autoload.el (update-directory-autoloads): * lisp/emacs-lisp/shadow.el (load-path-shadows-find): * lisp/files.el (auto-mode-alist, directory-files-no-dot-files-regexp): * lisp/finder.el (finder-compile-keywords): * lisp/generic-x.el (inetd-conf-generic-mode, named-boot-generic-mode) (resolve-conf-generic-mode, etc-modules-conf-generic-mode): * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview) (gnus-agent-regenerate-group, gnus-agent-update-files-total-fetched-for): * lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group): * lisp/gnus/gnus-score.el (gnus-score-search-global-directories): * lisp/gnus/gnus-util.el (gnus-delete-directory): * lisp/gnus/gnus-uu.el (gnus-uu-dir-files): * lisp/gnus/nndraft.el (nndraft-request-group): * lisp/gnus/nnmh.el (nnmh-request-group, nnmh-request-create-group): (nnmh-request-delete-group, nnmh-active-number, nnmh-update-gnus-unreads): * lisp/gnus/nnspool.el (nnspool-request-group): * lisp/gnus/spam-stat.el (spam-stat-process-directory) (spam-stat-test-directory): * lisp/help-fns.el (help-fns--first-release): * lisp/help.el (view-emacs-news): * lisp/international/quail.el (quail-update-leim-list-file): * lisp/international/titdic-cnv.el (batch-titdic-convert): * lisp/mail/mspools.el (mspools-set-vm-spool-files) (mspools-get-spool-files): * lisp/mail/rmail.el (rmail-secondary-file-regexp) (rmail-speedbar-match-folder-regexp): * lisp/net/ange-ftp.el (ange-ftp-delete-directory): * lisp/net/tramp.el (tramp-use-absolute-autoload-file-names): * lisp/obsolete/gulp.el (gulp-send-requests): * lisp/obsolete/vc-arch.el (vc-arch-trim-revlib): * lisp/org/ob-core.el (org-babel-remove-temporary-directory): * lisp/progmodes/ebnf2ps.el (ebnf-file-suffix-regexp, ebnf-style-database): * lisp/progmodes/executable.el (executable-command-find-posix-p): * lisp/startup.el (command-line): * lisp/textmodes/refer.el (refer-get-bib-files): * lisp/url/url-about.el (url-probe-protocols): * lisp/vc/vc-rcs.el (vc-rcs-register, vc-rcs-unregister): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test19-directory-files-and-attributes): * test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes): Replace ^ and $ with \` and \', respectively. Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.", to match anything but "." and "..", instead of several incorrect regexps.
* Fix error message for ‘cl-struct-unknown-slot’ (bug#39995)Philipp Stephani2020-04-121-1/+1
| | | | | * lisp/emacs-lisp/cl-macs.el (cl-struct-unknown-slot): Remove spurious format specifiers.
* Fix void-variable n-reb in re-builder (Bug#40409)Noam Postavsky2020-04-041-9/+8
| | | | | | | * lisp/emacs-lisp/re-builder.el (reb-while): Take the current value of the counter instead of its name. (reb-mark-non-matching-parenthesis): Bind n-reb to 0 at the start and don't wrongly treat it as dynamicly bound.
* Fix cl-concatenate (Bug#40180)Noam Postavsky2020-03-221-1/+1
| | | | | | * lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use apply, to avoid adding extra nesting of args. * test/lisp/emacs-lisp/cl-extra-tests.el (cl-concatenate): New test.
* Improve Package Menu hiding docstringsStefan Kangas2020-03-141-4/+16
| | | | | | | | * lisp/emacs-lisp/package.el (package-menu-toggle-hiding): Add reference to 'package-menu-hidden-regexps'. * lisp/emacs-lisp/package.el (package-menu-hide-package): Improve docstring to say that hiding is saved in a user option. Fix a typo. (Bug#39436)
* * lisp/emacs-lisp/package.el (package-install): Fix typo in docstring.Juri Linkov2020-03-101-1/+1
|
* ; lisp/emacs-lisp/seq.el: Explain why we don't use cl-lib hereNoam Postavsky2020-03-071-0/+4
|
* Eliminate use of cl-concatenate in 'seq' packageAndrew Eggenberger2020-03-072-6/+6
| | | | | | | | | | Fixes (Bug#39761) by making cl-extra dependent on seq rather than vice versa. * lisp/emacs-lisp/seq.el (seq-concatenate): Move cl-concatenate's code here instead of calling it. * lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use cl-concatenate. Copyright-paperwork-exempt: yes
* Fix bug with JIT stealth timersPaul Eggert2020-03-071-1/+1
| | | | | * lisp/emacs-lisp/timer.el (run-at-time): Don’t assume that Lisp time values must be conses (Bug#39944).
* Fix rx error with ? and ??Mattias Engdegård2020-03-051-1/+1
| | | | | | | | | The ? and ?? rx operators are special in that they can be written as characters (space and '?' respectively). This confused the definition look-up mechanism in rare cases. * lisp/emacs-lisp/rx.el (rx--expand-def): Don't look up non-symbols. * test/lisp/emacs-lisp/rx-tests.el (rx-charset-or): Test.
* * lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix error string.Mattias Engdegård2020-03-051-1/+1
|
* Bump checkdoc-version to match library headerStefan Kangas2020-03-041-1/+1
| | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-version): Bump version.
* rx: Improve 'or' compositionality (bug#37659)Mattias Engdegård2020-03-011-28/+48
| | | | | | | | | | | | | | | | | Perform 'regexp-opt' on nested 'or' forms, and after expansion of user-defined and 'eval' forms. Characters are now turned into strings for wider 'regexp-opt' scope. This preserves the longest-match semantics for string in 'or' forms over composition. * doc/lispref/searching.texi (Rx Constructs): Document. * lisp/emacs-lisp/rx.el (rx--normalise-or-arg) (rx--all-string-or-args): New. (rx--translate-or): Normalise arguments first, and check for strings in subforms. (rx--expand-eval): Extracted from rx--translate-eval. (rx--translate-eval): Call rx--expand-eval. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-def-in-or): Add tests. * etc/NEWS: Announce.
* Fix rx charset generationMattias Engdegård2020-02-291-1/+5
| | | | | | * lisp/emacs-lisp/rx.el (rx--charset-p): Don't overquote. (rx--generate-alt): Generate '.' for negated newline. * test/lisp/emacs-lisp/rx-tests.el (rx-any, rx-charset-or): Test.
* checkdoc: Don't mistake "cf." for sentence endŠtěpán Němec2020-02-281-1/+1
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-sentencespace-region-engine): Recognize "cf." as an abbreviation, not a sentence end.
* * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Change last fixStefan Monnier2020-02-241-55/+57
| | | | Make sure we always work in the selected-window's buffer.
* Shorten some ppss struct field namesNoam Postavsky2020-02-231-13/+13
| | | | | | | | | * lisp/emacs-lisp/syntax.el (ppss): Capitalize docstrings. (ppss-comment-depth): Renamed from ppss-comment-nesting. (ppss-quoted-p): Renamed from ppss-after-quote-p. (ppss-min-depth): Renamed from ppss-minimum-paren-depth. (ppss-open-parens): Renamed from ppss-open-paren-positions. * etc/NEWS: Announce the ppss-* accessors.
* Fix cursor-sensor--detect when current buf != selected window's bufFederico Tedin2020-02-211-3/+4
| | | | | | * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Avoid trying to read text properties from position taken from another buffer. (Bug#38740)
* Correct default regexp in 'package-menu-hide-package'Pieter van Oostrum2020-02-151-1/+2
| | | | | | * lisp/emacs-lisp/package.el (package-menu-mode-menu): Correct default regexp, so it only selects the package at point. (Bug#39436)
* Remove obsolete menu entry "Redisplay buffer"Pieter van Oostrum2020-02-151-2/+1
| | | | | | | | * lisp/emacs-lisp/package.el (package-menu-mode-menu): Remove obsolete menu entry "Redisplay buffer". (package-menu-mode-menu): Menu entry "Refresh Package List": make the doc string more accurate. (Bug#39436)
* Remove the optional KEEP-ORDER argument to regexp-optMattias Engdegård2020-02-131-34/+9
| | | | | | | | | | | | | This argument was added for the 'or' clause in rx, but it turned out to be a bad idea (bug#37659), and there seems to be little other use for it. * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Remove KEEP-ORDER. * doc/lispref/searching.texi (Regexp Functions): * etc/NEWS: Remove it from the documentation. * test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-test--match-all) (regexp-opt-test--check-perm, regexp-opt-test--explain-perm) (regexp-opt-keep-order, regexp-opt-longest-match): Simplify test.
* rx: Use longest match for all-string 'or' forms (bug#37659)Mattias Engdegård2020-02-121-1/+1
| | | | | | | | | | | | | | | | | Revert to the Emacs 26 semantics that always gave the longest match for rx 'or' forms with only string arguments. This guarantee was never well documented, but it is useful and people likely have come to rely on it. For example, prior to this change, (rx (or ">" ">=")) matched ">" even if the text contained ">=". * lisp/emacs-lisp/rx.el (rx--translate-or): Don't tell regexp-opt to preserve the matching order. * doc/lispref/searching.texi (Rx Constructs): Document the longest-match guarantee for all-string 'or' forms. * test/lisp/emacs-lisp/rx-tests.el (rx-or): Update test.
* Correct "different than" to "different from" where appropriateAlan Mackenzie2020-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | (doc/emacs/screen.texi) (doc/lispintro/emacs-lisp-intro.texi) (doc/misc/calc.texi) (doc/misc/gnus.texi) (doc/misc/sc.texi) (lisp/align.el) (lisp/allout-widgets.el) (lisp/allout.el) (lisp/emacs-lisp/gv.el) (lisp/font-lock.el) (lisp/gnus/mm-util.el) (lisp/mail/feedmail.el) (lisp/mail/sendmail.el) (lisp/mail/supercite.el) (lisp/org/org-attach.el) (lisp/progmodes/cc-langs.el) (lisp/progmodes/idlw-shell.el) (lisp/ps-print.el) (lisp/simple.el) (src/cmds.c) (src/editfns.c) (src/frame.h) (src/regex-emacs.c) (src/xfaces.c): Replace "different than" by "different from".
* More accurate documentation of 'package-menu-hide-package'Eli Zaretskii2020-02-081-3/+4
| | | | | | | | | | * doc/emacs/package.texi (Package Menu): Improve the description of the 'H' command. * lisp/emacs-lisp/package.el (package-menu-mode-menu): More accurate wording of the help-echo string. (package-menu-hide-package): Make the doc string more accurate. (Bug#39436)
* Revert "Signal user-error on duplicate package refresh"Stefan Kangas2020-02-061-4/+1
| | | | | | | | That commit caused errors when the connection was dropped in the middle of a package refresh. To avoid any further issues this close to the pretest, we simply remove this feature. (Bug#39187) Don't merge to master, where we will instead try to fix the bug.
* * lisp/emacs-lisp/debug.el (debug): Merge the non-interactive casesPaul Pogonyshev2020-01-311-150/+142
| | | | | | bug#38927 (cherry picked from commit 502059433ce0e9699eb73d21656ce6e9e127d63b)
* Doc fixes in package.elStefan Kangas2020-01-191-3/+9
| | | | | | | | * lisp/emacs-lisp/package.el (package-process-define-package) (package-generate-description-file): Doc fixes. (package-generate-autoloads, package--write-file-no-coding) (package--archive-file-exists-p, package-desc-status): Add doc strings.
* ; spelling fixesPaul Eggert2020-01-171-1/+1
|
* Fix wording and punctuation of a recent commitEli Zaretskii2020-01-171-2/+2
| | | | | | * lisp/textmodes/ispell.el (ispell-correct-p): Doc fix. * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-init): Fix capitalization and punctuation of comments.
* Add unattended spell-checking to checkdocDamien Cassou2020-01-171-50/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes checkdoc capable of spell-checking even when the user isn't using it interactively. When TAKE-NOTES is non-nil, checkdoc will run spell-checking (with ispell) and report spelling mistakes. Fixes: (bug#38583). * lisp/textmodes/ispell.el (ispell-word): Extract part of it to `ispell--run-on-word`. (ispell--run-on-word): New function, extracted from `ispell-word`. (ispell-error-checking-word): New function. (ispell-correct-p): New function. Use `ispell--run-on-word` and `ispell-error-checking-word`. * lisp/emacs-lisp/checkdoc.el (checkdoc-current-buffer): Pass TAKE-NOTES to `checkdoc-start`. (checkdoc-continue): Pass TAKE-NOTES to `checkdoc-this-string-valid`. (checkdoc-this-string-valid): Add optional argument TAKE-NOTES and pass it to `checkdoc-this-string-valid-engine`. (checkdoc-this-string-valid-engine): Add optional argument TAKE-NOTES and pass it to `checkdoc-ispell-docstring-engine`. (checkdoc-ispell-init): Call `ispell-set-spellchecker-params` and `ispell-accept-buffer-local-defs`. These calls are required to properly use ispell. The problem went unnoticed until now because checkdoc was only using ispell through the high-level command `ispell-word` which takes care of all the initialization for the user. (checkdoc-ispell-docstring-engine): Add optional argument TAKE-NOTES to force reporting of spell-checking errors. Throw error when (checkdoc-ispell-init) fails configuring ispell. Replace a few (if cond nil body) with (unless cond body). Replace (let ((var nil))) with (let (var)). Replace (if (not (eq checkdoc-autofix-flag 'never)) body) with just body because `checkdoc-autofix-flag` is checked at the beginning of the function. (cherry picked from commit 25adbc4a5ecc3e16625c0171607e3153bbdf7ab1)
* Move “Fix some broken conditional forms” to masterPaul Eggert2020-01-051-4/+4
| | | | | | | Revert 2020-01-04T19:17:12Z!eggert@cs.ucla.edu which recently I installed into the emacs-27 branch by mistake. These patches are now on master instead (via merging). Do not merge to master.
* Fix some broken conditional formsPaul Eggert2020-01-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2020-01/msg00088.html * lisp/cedet/ede/cpp-root.el (ede-create-lots-of-projects-under-dir): Remove this quick hack, which didn’t do anything anyway. * lisp/cedet/ede/pconf.el (ede-proj-configure-test-required-file): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col): * lisp/net/nsm.el (nsm-check-tls-connection): Use ‘when’ rather than bypassing it. This doesn’t affect behavior and is better style. * lisp/cedet/srecode/semantic.el (srecode-semantic-handle-:tag): Fix typo that suppressed an error. * lisp/filesets.el (filesets-run-cmd): Fix typo that mishandled spacing. * lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data): Fix typo that caused “GROUP has older different info in the cloud as of DATE, update it here?” prompt result to always be treated as “yes”. * lisp/gnus/mml-smime.el (mml-smime-openssl-encrypt): Simplify, since smime-encrypt-buffer signals error on failure. * lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify. The conversion of this file to utf-8-emacs in 2019-01-08T02:18:40Z!monnier@iro.umontreal.ca removed the distinction between Big5 and CNS fulltitles in the generated docstring. * lisp/org/org-agenda.el (org-agenda-show-and-scroll-up): * lisp/textmodes/table.el (table--generate-source-cell-contents): Simplify by removing useless code. * lisp/org/ox-odt.el (org-odt--format-timestamp): Fix typo that always output time-of-day even when the timestamp lacked it.
* Fix copyright years by handPaul Eggert2020-01-011-1/+1
| | | | These are dates that admin/update-copyright did not update.
* Update copyright year to 2020Paul Eggert2020-01-0188-88/+88
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Avoid unbounded growth of cl-random-state components (bug#38753)Mattias Engdegård2019-12-291-1/+1
| | | | | | | | | * lisp/emacs-lisp/cl-extra.el (cl-random): Perform the modulo 2**23 operation before updating the state instead of after. The result is always the same, but it prevents the state from growing into arbitrary large bignums. Patch from Christopher Wellons.
* Fix documentation of define-obsolete-* functionsEli Zaretskii2019-12-281-6/+6
| | | | | | | | | | | * doc/lispref/functions.texi (Obsolete Functions): Make documentation of functions that obsolete symbols match the advertised calling conventions. * lisp/emacs-lisp/byte-run.el (define-obsolete-function-alias) (define-obsolete-variable-alias, define-obsolete-face-alias): State in the doc strings that WHEN is a mandatory argument, to be consistent with the advertised calling convention. (Bug#38675)
* Trivial docstring fixesJuanma Barranquero2019-12-242-6/+7
| | | | | | | | | | | | | | | | | * ChangeLog.3: * lisp/emacs-lisp/cl-macs.el (cl-flet): * lisp/filesets.el (filesets-menu-ensure-use-cached): * lisp/progmodes/compile.el (compilation-context-lines): * lisp/progmodes/prolog.el (prolog-paren-indent): * lisp/progmodes/sql.el (sql-password-search-wallet-function): Fix typos in docstrings. * lisp/cedet/semantic/analyze.el (semantic-analyze-push-error): Doc fix. * lisp/emacs-lisp/map.el (map-put, map-info): Refill docstring. (map-contains-key): Fix typo. (map-every-p): Doc fix.
* More precise 'regexp-opt' documentationMattias Engdegård2019-12-181-5/+5
| | | | | | | | * lisp/emacs-lisp/regexp-opt.el (regexp-opt): * doc/lispref/searching.texi (Regexp Functions): Be more specific about how the KEEP-ORDER argument actually works. If nil, the regexp guarantees a longest match; this is the behaviour that many callers implicitly rely on.
* Allow characters and single-char strings in rx charsetsMattias Engdegård2019-12-131-6/+20
| | | | | | | | | | | | | | | | The `not' and `intersection' forms, and `or' inside these forms, now accept characters and single-character strings as arguments. Previously, they had to be wrapped in `any' forms. This does not add expressive power but is a convenience and is easily understood. * doc/lispref/searching.texi (Rx Constructs): Amend the documentation. * etc/NEWS: Announce the change. * lisp/emacs-lisp/rx.el (rx--charset-p, rx--translate-not) (rx--charset-intervals, rx): Accept characters and 1-char strings in more places. * test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-charset-or) (rx-def-in-charset-or, rx-intersection): Test the change.
* Add prefix to help.el uni-confusable* varsNoam Postavsky2019-12-131-1/+1
| | | | | | | | | * lisp/help.el (help-uni-confusables, help-uni-confusables-regexp): Rename from uni-confusable and uni-confusables-regexp, respectively. (help-uni-confusable-suggestions): Use ngettext. Use new variable name. * lisp/emacs-lisp/lisp-mode.el (lisp--match-confusable-symbol-character): Use new variable name.
* * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use 'user-error'.Juri Linkov2019-12-131-1/+1
|
* Use `or' instead of `union' for charset union in rxMattias Engdegård2019-12-121-15/+26
| | | | | | | | | | | | | | Design change suggested by Stefan Monnier. * doc/lispref/searching.texi (Rx Constructs): * etc/NEWS: Document. * lisp/emacs-lisp/rx.el (rx--translate-or): Detect charset arguments. (rx--charset-p): New. (rx--translate-not, rx--charset-intervals, rx--translate-union): Change from `union' to `or'. (rx--translate-form, rx--builtin-forms, rx): Remove `union'. * test/lisp/emacs-lisp/rx-tests.el (rx-union, rx-def-in-union) (rx-intersection): Rename tests and change `union' to `or' and `|'.