summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* xref-find-definitions: Exclude more generic function items.Stephen Leake2015-08-132-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Add doc string. (cl--generic-find-defgeneric-regexp): New. (find-function-regexp-alist): Add it. * lisp/emacs-lisp/find-func.el (find-feature-regexp): Move here from elisp-mode.el, change to search for ";;; Code:" (find-alias-regexp): Move here from elisp-mode.el, cleaned up. (find-function-regexp-alist): Add them. * lisp/progmodes/elisp-mode.el: (elisp--xref-format, elisp--xref-format-extra): Change back to defvar due to bug#21237. (elisp--xref-find-definitions): Exclude co-located default methods for generic functions. Also exclude implicitly declared defgeneric. (elisp--xref-find-definitions): Handle C source properly. Exclude minor mode variables defined by 'define-minor-mode'. * test/automated/elisp-mode-tests.el: Declare generic functions, add tests for them. (xref-elisp-test-run): Fix bug. (emacs-test-dir): Improve initial value. (find-defs-defun-defvar-el): Don't expect defvar. (find-defs-feature-el): Match change to find-feature-regexp.
* * emacs-lisp/lisp-mnt.el (lm-header): save-excursionArtur Malabarba2015-08-121-10/+11
|
* Merge remote-tracking branch ↵Nicolas Petton2015-08-082-2/+9
|\ | | | | | | 'origin/fix/subsequence-error-with-negative-sequences'
| * Improve error signalling for seq-subseq.Phillip Lord2015-08-072-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing behaviour for seq-subseq is to error when indexes are too large, but to silently ignore numbers which are too negative for lists. String and vector handling errors in both cases. This has been regularlised. Error signalling behaviour has been explicitly added to the docstring of seq-subseq, and also to cl-subseq which largely defers to seq-subseq (and is therefore also impacted by this change). Tests have been added for these exceptional cases, as well as one non exceptional base case.
* | * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Don't burp onStefan Monnier2015-08-071-2/+3
|/ | | | non-struct vectors.
* * lisp/emacs-lisp/package.el: Simplify describe-package-1Artur Malabarba2015-08-061-34/+49
| | | | | | | | | (package-help-section-name-face): New face. (package--print-help-section): New function. (describe-package-1): Refactor section printing. (package-make-button): Use face instead of font-lock-face, which doesn't work on buttons.
* * lisp/emacs-lisp/package.el: Define custom facesArtur Malabarba2015-08-061-13/+84
| | | | | | | | | | | (package-name-face, package-description-face) (package-status-built-in-face, package-status-external-face) (package-status-available-face, package-status-new-face) (package-status-held-face, package-status-disabled-face) (package-status-installed-face, package-status-dependency-face) (package-status-unsigned-face, package-status-incompat-face) (package-status-avail-obso-face): New faces. (package-menu--print-info-simple): Use them.
* * lisp/emacs-lisp/package.el (package-menu-mode-map): Convert menuArtur Malabarba2015-08-041-53/+33
| | | | | definitions to `easy-menu-define', improve a couple to account for async, and add a couple of new commands.
* Substitute some customization etc. doc stringsPaul Eggert2015-08-021-1/+3
| | | | | | | | | | | | | | | | | | | These changes apply substitute-command-keys to some doc strings that were going through untranslated when creating customization or other widgets. * lisp/cus-edit.el (custom-group-value-create): * lisp/wid-edit.el (widget-default-create): (widget-push-button-value-create): Treat the widget tag as a doc string. * lisp/emacs-lisp/cl-extra.el (cl--describe-class-slot): Treat the :documentation value as a doc string. * lisp/wid-edit.el (widget-choose): Treat the choice names as doc strings. (widget-default-create): Treat the :doc value as a doc string. (widget-toggle-value-create): Treat the :on and :off values as doc strings. (widget-documentation-string-value-create): Substitute the doc string.
* ; Auto-commit of loaddefs files.Glenn Morris2015-08-011-1/+1
|
* Don't overflow if computing approximate percentagePaul Eggert2015-07-312-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align-region): * lisp/cedet/semantic.el (semantic-repeat-parse-whole-stream): * lisp/cedet/semantic/wisent.el (wisent-parse-region): * lisp/cus-edit.el (custom-buffer-create-internal): * lisp/emacs-lisp/checkdoc.el (checkdoc-interactive-ispell-loop) (checkdoc-message-interactive-ispell-loop, checkdoc-next-error) (checkdoc-next-message-error): * lisp/emacs-lisp/eieio-opt.el (eieio-display-method-list): * lisp/epa.el (epa-progress-callback-function): * lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command): * lisp/ffap.el (ffap-menu-rescan): * lisp/gnus/nnbabyl.el (nnbabyl-retrieve-headers): * lisp/gnus/nndiary.el (nndiary-retrieve-headers): * lisp/gnus/nneething.el (nneething-retrieve-headers): * lisp/gnus/nnmbox.el (nnmbox-retrieve-headers): * lisp/gnus/nnmh.el (nnmh-retrieve-headers): * lisp/gnus/nnml.el (nnml-retrieve-headers): * lisp/gnus/nnspool.el (nnspool-retrieve-headers): * lisp/gnus/nntp.el (nntp-retrieve-headers) (nntp-retrieve-articles): * lisp/imenu.el (imenu--relative-position): * lisp/international/ja-dic-cnv.el (skkdic-collect-okuri-nasi) (skkdic-convert-okuri-nasi): * lisp/net/ange-ftp.el (ange-ftp-process-handle-hash): * lisp/nxml/rng-valid.el (rng-compute-mode-line-string): * lisp/org/org-list.el (org-update-checkbox-count): * lisp/org/org.el (org-table-map-tables) (org-update-parent-todo-statistics): * lisp/play/decipher.el (decipher-insert-frequency-counts) (decipher-analyze-buffer): * lisp/profiler.el (profiler-format-percent): * lisp/progmodes/cc-cmds.el (c-progress-update): * lisp/progmodes/cpp.el (cpp-highlight-buffer): * lisp/progmodes/idlwave.el (idlwave-convert-xml-system-routine-info) (idlwave-list-load-path-shadows): * lisp/progmodes/opascal.el (opascal-step-progress): * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info) (vhdl-scan-directory-contents): * lisp/textmodes/bibtex.el (bibtex-progress-message): * lisp/textmodes/flyspell.el (flyspell-small-region) (flyspell-external-point-words): * lisp/textmodes/table.el (table-recognize): Prefer (floor (* 100.0 NUMERATOR) DENOMINATOR) when calculating progress-report percentages and the like. This avoids problems if (* 100 NUMERATOR) would overflow. * lisp/gnus/gnus-registry.el (gnus-registry-import-eld): * lisp/gnus/registry.el (registry-reindex): Use (* 100.0 ...) rather than (* 100 ...) to avoid int overflow issues. * lisp/descr-text.el (describe-char): * lisp/org/org-colview.el (org-nofm-to-completion): * lisp/ps-print.el (ps-plot): * lisp/simple.el (what-cursor-position): Prefer (round (* 100.0 NUMERATOR) DENOMINATOR) to a more-complicated and less-accurate approximation.
* * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Fix bugArtur Malabarba2015-07-311-4/+5
| | | | | | When updating the very last entry, tabulated-list-print would erase it and then try to look at the next one (which obviously isn't there).
* add file name to autoload error messages.Stephen Leake2015-07-221-111/+124
| | | | | * lisp/emacs-lisp/autoload.el (autoload-save-buffers): add condition-case to add file name to error message.
* (advice--called-interactively-skip): Fix inf-loop (bug#21083)Stefan Monnier2015-07-211-2/+3
| | | | | * lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip): Fix inf-loop (bug#21083).
* Make eldoc timer non-repeatableDmitry Gutov2015-07-211-1/+1
| | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-schedule-timer): Make the timer non-repeatable. Since it's on post-command hook, that just wasted CPU cycles.
* * lisp/emacs-lisp/package.el: Fix warningsArtur Malabarba2015-07-171-0/+2
|
* * lisp/emacs-lisp/package.el (package-buffer-info):Artur Malabarba2015-07-171-1/+3
| | | | Add author and maintainers to `package-buffer-info'.
* * lisp/emacs-lisp/package.el: Many small changesArtur Malabarba2015-07-171-18/+25
| | | | | | | | Replace all instances of 'face with 'font-lock-face. (describe-package-1): Improve some strings and move the summary up the list. (package-install-file): Update docstring. (package-menu-hide-package): Bind to `H'.
* * lisp/emacs-lisp/package.el (package--with-work-buffer-async):Artur Malabarba2015-07-171-17/+17
| | | | Fix error handling.
* Add support for gv.el in map.elNicolas Petton2015-07-091-66/+60
| | | | | | | * lisp/emacs-lisp/map.el (map-elt, map-delete): Declare a gv-expander. * lisp/emacs-lisp/map.el (map-put): Refactor using `setf' and `map-elt'. * test/automated/map-tests.el: Update tests to work with the new implementations of map-elt and map-put.
* * lisp/emacs-lisp/debug.el (debug-help-follow): Use describe-symbol.Glenn Morris2015-07-091-5/+1
|
* (gv-setter, gv-synthetic-place, gv-delay-error): New funs/macrosStefan Monnier2015-07-072-34/+58
| | | | | | | | | * lisp/emacs-lisp/gv.el (gv-setter): New function. (gv-invalid-place): New error. (gv-get): Use them. (gv-synthetic-place, gv-delay-error): New places. * lisp/emacs-lisp/cl-generic.el (cl--generic-setf-rewrite): Remove. (cl-defgeneric, cl-defmethod): Use gv-setter.
* * lisp/emacs-lisp/package.el (package-compute-transaction): Bug fixArtur Malabarba2015-07-071-2/+2
| | | | Fix void variable due to `found-something' being in the wrong `let'.
* Add online-help support to describe typesStefan Monnier2015-07-079-249/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/help-fns.el (describe-symbol-backends): Move to help-mode.el. (describe-symbol): Improve the selection of default. * lisp/help-mode.el: Require cl-lib. (describe-symbol-backends): Move from help-fns.el. (help-make-xrefs): Use it. * lisp/emacs-lisp/cl-extra.el (describe-symbol-backends): Add entry for types. (cl--typedef-regexp): New const. (find-function-regexp-alist): Add entry for types. (cl-help-type, cl-type-definition): New buttons. (cl-find-class): New function. (cl-describe-type): New command. (cl--describe-class, cl--describe-class-slot) (cl--describe-class-slots): New functions, moved from eieio-opt.el. * lisp/emacs-lisp/cl-generic.el (cl--generic-method-documentation) (cl--generic-all-functions, cl--generic-specializers-apply-to-type-p): New functions. Moved from eieio-opt.el. (cl--generic-class-parents): New function, extracted from cl--generic-struct-specializers. (cl--generic-struct-specializers): Use it. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Use pcase-dolist. Improve constructor's docstrings. (cl-struct-unknown-slot): New error. (cl-struct-slot-offset): Use it. * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Record the type definition in current-load-list. * lisp/emacs-lisp/eieio-core.el (eieio--known-slot-names): New var. (eieio--add-new-slot): Set it. (eieio-defclass-internal): Use new name for current-load-list. (eieio-oref): Add compiler-macro to warn about unknown slots. * lisp/emacs-lisp/eieio.el (defclass): Update eieio--known-slot-names as compile-time as well. Improve constructor docstrings. * lisp/emacs-lisp/eieio-opt.el (eieio-help-class) (eieio--help-print-slot, eieio-help-class-slots): Move to cl-extra.el. (eieio-class-def): Remove button. (eieio-help-constructor): Use new name for load-history element. (eieio--specializers-apply-to-class-p, eieio-all-generic-functions) (eieio-method-documentation): Move to cl-generic.el. (eieio-display-method-list): Use new names. * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Add "define-linline". (lisp-fdefs): Remove "defsubst". (el-fdefs): Add "defsubst", "cl-defsubst", and "define-linline". * lisp/emacs-lisp/macroexp.el (macroexp--warned): New var. (macroexp--warn-and-return): Use it to avoid inf-loops. Add `compile-only' argument.
* (eieio-persistent-save): Don't ignore `file' arg (bug#20972)Stefan Monnier2015-07-061-31/+22
| | | | | * lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Don't ignore `file' arg. Always use utf-8-emacs. Use with-temp-buffer and cl-letf.
* * lisp/emacs-lisp/eieio-core.el (eieio--class-v): RemoveStefan Monnier2015-07-024-30/+26
| | | | | | * lisp/emacs-lisp/eieio-core.el, lisp/emacs-lisp/eieio.el, lisp/emacs-lisp/eieio-opt.el, lisp/emacs-lisp/eieio-compat.el: Use cl--find-class instead.
* * lisp/emacs-lisp/seq.el (seq-difference): Fix typo in docstringNicolas Richard2015-07-021-1/+1
|
* (cl--copy-slot-descriptor): Copy the `props' alist as wellStefan Monnier2015-07-011-1/+6
| | | | | | * lisp/emacs-lisp/cl-preloaded.el (cl--copy-slot-descriptor-1): Rename from cl--copy-slot-descriptor. (cl--copy-slot-descriptor): New function. Copy the alist (bug#20914).
* Spelling fixesPaul Eggert2015-06-301-1/+1
|
* In strings, prefer plain ` and ' to \` and \'Paul Eggert2015-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-insert-listified): * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): * lisp/ls-lisp.el (ls-lisp-UCA-like-collation) (ls-lisp-string-lessp): * lisp/menu-bar.el (menu-bar-open): * lisp/obsolete/otodo-mode.el (todo-top-priorities): * lisp/progmodes/compile.el (compile): * lisp/progmodes/etags.el (tags-loop-scan): * lisp/progmodes/make-mode.el (makefile-browser-insert-continuation): * lisp/subr.el (posn-actual-col-row): * lisp/term/pc-win.el (x-list-fonts): * lisp/textmodes/texinfmt.el (texinfmt-version): * lisp/textmodes/texnfo-upd.el (texinfo-master-menu): * lisp/time.el (display-time-world-list): * lisp/tmm.el (tmm-menubar): * src/buffer.c (syms_of_buffer): * src/fileio.c (syms_of_fileio): Omit unnecessary and confusing backslash before quote. * lisp/erc/erc.el (erc-cmd-LASTLOG): * lisp/progmodes/flymake.el (flymake-fix-file-name): * lisp/progmodes/vhdl-mode.el (vhdl-in-extended-identifier-p): Fix string that was intended to escape a backslash and not a quote.
* Improve reproducibility of generated loaddefs file.Glenn Morris2015-06-301-137/+144
| | | | | | | | | * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads): Make the return value the modtime of the input file (if no autoloads). (update-directory-autoloads): In the "no autoloads" section, use "most recent modtime" rather than "current time". ; http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00688.html
* * lisp/emacs-lisp/package.el (package--remove-hidden): Fix logicArtur Malabarba2015-06-301-2/+4
| | | | (Bug#20930)
* Add seq-min and seq-maxNicolas Petton2015-06-301-1/+11
| | | | | | | Bump version number. * lisp/emacs-lisp/seq.el (seq-min, seq-max): New functions. * test/automated/seq-tests.el: Add tests for seq-min and seq-max.
* * lisp/emacs-lisp/package.el (package-compute-transaction):Artur Malabarba2015-06-301-11/+15
| | | | Don't assume version sorting.
* * lisp/emacs-lisp/package.el (package--save-selected-packages):Artur Malabarba2015-06-301-5/+7
| | | | | Don't save before init time, to avoid overwriting configurations. (Bug#20855)
* * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print):Artur Malabarba2015-06-291-3/+3
| | | | Don't block remember-pos if buffer isn't displayed. (Bug#20921)
* * package.el (describe-package): Use symbol-at-point as additional guessNicolas Richard2015-06-291-1/+2
|
* * package.el (describe-package): Convert the guess to a stringNicolas Richard2015-06-291-1/+2
|
* cl-extra fixes for most-negative-fixnumPaul Eggert2015-06-271-11/+10
| | | | | | | * lisp/emacs-lisp/cl-extra.el (cl-gcd, cl-lcm, cl-random): Don't mishandle an argument equal to most-negative-fixnum, whose absolute value equals itself. (cl-gcd, cl-lcm): Use dolist rather than doing it by hand.
* Initialize cl--gensym-counter to 0Paul Eggert2015-06-272-11/+6
| | | | | | | | | | | | Previously it was initialized to a random value, which made it harder to reproduce earlier Emacs runs. The need for a random value went away when Emacs introduced and used the #: syntax for uninterned symbols (Bug#20862). * doc/misc/cl.texi (Creating Symbols, Common Lisp Compatibility): Document that cl--gensym-counter now starts with 0. * lisp/emacs-lisp/cl-lib.el (cl--gensym-counter): Remove. (cl--random-time): Move to near only remaining use. * lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Initialize to 0.
* Improve docstring for macroexp-let2Paul Eggert2015-06-271-11/+34
| | | | | | | * lisp/emacs-lisp/macroexp.el (macroexp-let2): Improve as per suggestion by RMS in: http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00621.html Also, rename args to match new doc string.
* Fix indentation for with-output-to-stringLeo Liu2015-06-261-1/+2
| | | | | | | | * lisp/emacs-lisp/cl-indent.el: Fix indentation for `with-output-to-string' in elisp. Revert "lisp/emacs-lisp/cl-indent.el: Fix indent of with-output-to-string" This reverts commit 659199f2ca5f283fb246faa78a244e5ca25f53dd.
* lisp/emacs-lisp/cl-indent.el: Fix indent of with-output-to-stringOleh Krehel2015-06-251-1/+1
| | | | | | * lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function): `with-output-to-string' should have the same indent as `progn'. This is in line with the declaration of `with-output-to-string'.
* * lisp/emacs-lisp/package.el: Exclude packages by nameArtur Malabarba2015-06-221-4/+44
| | | | | | (package-hidden-regexps): New variable. (package-menu--refresh): Use it. (package-menu-hide-package): New command.
* * lisp/emacs-lisp/package.el: Rename hide-obsolete to toggle-hidingArtur Malabarba2015-06-221-11/+11
|
* Make find-function-on-key use the current windowDmitry Gutov2015-06-221-5/+28
| | | | | | | | * lisp/emacs-lisp/find-func.el (find-function-on-key-do-it): Extract from `find-function-on-key', add a second argument. (find-function-on-key): Use it (bug#19679). (find-function-on-key-other-window) (find-function-on-key-other-frame): New commands.
* Revert "Define `map-elt' as a generalized variable"Nicolas Petton2015-06-211-28/+24
| | | | This reverts commit 8b6d82d3ca86f76ed964063b3941a7c6ab0bf1c6.
* Fix some “nested” quoting confusion in doc stringsPaul Eggert2015-06-211-5/+5
| | | | | | | | | * lisp/emacs-lisp/advice.el (ad-map-arglists): * lisp/kermit.el (kermit-clean-on): * lisp/mh-e/mh-comp.el (mh-repl-group-formfile): * src/keyboard.c (Frecursive_edit): Use curved quotes when quoting text containing apostrophe, so that the apostrophe isn't curved in the output.
* Define `map-elt' as a generalized variableNicolas Petton2015-06-211-24/+28
| | | | | | | | | | | * lisp/emacs-lisp/map.el (map-elt): Define a gv-expander. * lisp/emacs-lisp/map.el (map--dispatch): Tighten the code. * lisp/emacs-lisp/map.el (map-put): Redefine it as a function using a `setf' with `map-elt'. * test/automated/map-tests.el: Comment out `test-map-put-literal'.
* Reuse `alist-get' in map.elNicolas Petton2015-06-211-10/+2
| | | | | * lisp/emacs-lisp/map.el (map-elt): Use `alist-get' to retrieve alist elements.