summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Nix some useless uses of looking-at, looking-backMark Oteiza2017-02-124-11/+11
| | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-kill-topic): (allout-next-topic-pending-encryption): * lisp/bookmark.el (bookmark-kill-line): * lisp/cus-edit.el (custom-save-variables, custom-save-faces): * lisp/cus-theme.el (custom-theme-write-variables): (custom-theme-write-faces): * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads): * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): * lisp/emacs-lisp/checkdoc.el (checkdoc-interactive-loop): (checkdoc-interactive-ispell-loop): (checkdoc-message-interactive-ispell-loop, checkdoc-this-string-valid): (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/elint.el (elint-get-top-forms): * lisp/emulation/viper-cmd.el (viper-backward-indent): * lisp/image-dired.el (image-dired-delete-char): * lisp/simple.el (kill-visual-line): Replace instances of looking-at, looking-back with char comparisons using following-char, preceding-char.
* Fix instrumenting code with propertized strings in EdebugGemini Lasswell2017-02-101-4/+2
| | | | | * lisp/emacs-lisp/edebug.el (edebug-read-function): Allow 'read' to decide what is and isn't a syntax error. (Bug#25068)
* New macro 'ert-with-message-capture'Gemini Lasswell2017-02-041-0/+24
| | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-message-capture): New macro. (Bug#25158) * test/lisp/autorevert-tests.el (auto-revert--wait-for-revert) (auto-revert-test00-auto-revert-mode) (auto-revert-test01-auto-revert-several-files) (auto-revert-test02-auto-revert-deleted-file) (auto-revert-test03-auto-revert-tail-mode) (auto-revert-test04-auto-revert-mode-dired): * test/lisp/filenotify-tests.el (file-notify-test03-autorevert): Use ert-with-message-capture.
* Avoid invalid read syntax errors due to 'ert-with-test-buffer'Gemini Lasswell2017-02-041-1/+1
| | | | | * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): Fix the 'declare' form. (Bug#24722)
* Fix a syntax error when evaluating pcase.el under EdebugEli Zaretskii2017-02-041-1/+2
| | | | | | * lisp/emacs-lisp/pcase.el (pcase-MACRO): Replace def-edebug-spec with an explicit 'put' form. Suggested by Gemini Lasswell <gazally@runbox.com>. (Bug#24717)
* Change edebug-max-depth from defconst to defcustomGemini Lasswell2017-02-041-1/+12
| | | | | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug-max-depth): Add defcustom. (Bug#24713) * etc/NEWS: Mention edebug-max-depth. * doc/lispref/edebug.texi (Checking Whether to Stop): Mention edebug-max-depth and index it. Add cross-references for max-lisp-eval-depth and max-specpdl-size. Co-authored-by: Eli Zaretskii <eliz@gnu.org>
* Rename to if-let* and when-let*Mark Oteiza2017-02-031-12/+24
| | | | | | | Make the existing if-let and when-let aliases. * lisp/emacs-lisp/subr-x.el (if-let*, when-let*): New macros. Rewrite docstrings, incorporating that from let* and the existing if-let. (if-let, when-let, and-let*): Alias them.
* ; Bump let-alistMark Oteiza2017-01-311-1/+1
| | | | * lisp/emacs-lisp/let-alist.el: Bump micro version (bug#24641).
* read-multiple-choice: explain dialog popups moreTed Zlatanov2017-01-311-0/+5
| | | | | * lisp/emacs-lisp/subr-x.el (read-multiple-choice): Explain when a graphical popup is used and how it can be avoided.
* Revert two accidental commitsDima Kogan2017-01-311-54/+0
| | | | | This reverts commit f3c77d11af65f3b319b1784b4c3cf08c51aa7997. This reverts commit 3c941b900007c9e79c00af0f21d88154f6d8af1a.
* stashDima Kogan2017-01-301-0/+54
|
* Don't warn about obsolete defgenerics when defining themNoam Postavsky2017-01-291-7/+8
| | | | | * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): The declaration code should run after the definition code (Bug#25556).
* Move cXXXr and cXXXXr to subr.elMark Oteiza2017-01-252-143/+24
| | | | | | | | | | | | | | | | | | * etc/NEWS: Mention new core Elisp. * doc/lispref/lists.texi (List Elements): Document and index the new functions. * doc/misc/cl.texi (List Functions): Change "defines" to "aliases". * lisp/subr.el (caaar, caadr, cadar, caddr, cdaar, cdadr, cddar) (cdddr, caaaar caaadr, caadar, caaddr, cadaar, cadadr, caddar): (cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar): (cddddr): New functions. * lisp/emacs-lisp/cl-lib.el (cl-caaar, cl-caadr, cl-cadar, cl-caddr): (cl-cdaar, cl-cdadr, cl-cddar cl-cdddr, cl-caaaar cl-caaadr): (cl-caadar, cl-caaddr, cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr): (cl-cdaaar, cl-cdaadr, cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr): (cl-cdddar, cl-cddddr): Alias to new subr functions. * lisp/emacs-lisp/cl.el (cl-unload-function): Remove cXXXr and cXXXXr elements.
* Give , and .@ doc strings. Fixes bug #24561.Alan Mackenzie2017-01-231-0/+10
| | | | | | | | | | | | | | | | | | | Also make *Help* links to ``' possible. Also make usable as such doc strings on the function-documentation property of a symbol. * lisp/emacs-lisp/backquote.el (top-level): Give , and '@ doc strings on the function-documentation property. Also give these symbols a reader-construct property. * lisp/help-fns.el (describe-function): Allow the function-documentation property to work. Use princ rather than prin1 to print the function's name when it has a reader-construct property. (help-fns-signature): Don't insert `high-usage' for a reader-construct. (describe-function-1): Adapt to process documentation on the function-documentation property. Print "a reader construct" when appropriate. * lisp/help-mode.el (help-xref-symbol-regexp): Amend this regexp also to match ``'.
* Prevent to use tabulated-list--near-rows unboundTino Calancha2017-01-221-2/+7
| | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506).
* Fix free var FOO-mode-{syntax,abbrev}-table warningsNoam Postavsky2017-01-191-0/+2
| | | | | | * lisp/emacs-lisp/derived.el (define-derived-mode): Unconditionally defvar the syntax and abbrev tables so that the compiler will know that they are dynamically bound variables (Bug#25446).
* (cl-defstruct): Improve error message for slots w/o value (bug#25312)Stefan Monnier2017-01-031-1/+17
| | | | | | * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't signal an error but emit a warning for those coders who forgot to put a default value in their slot.
* Update copyright year to 2017 in masterPaul Eggert2017-01-012-2/+2
| | | | | | Run admin/update-copyright in the master branch. This fixes files that were not already fixed in the emacs-25 branch before it was merged here.
* Merge from origin/emacs-25Paul Eggert2017-01-0183-83/+83
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Fix copyright years by handPaul Eggert2017-01-011-1/+1
| | | | | | | | | | These are dates that admin/update-copyright did not update, or updated incorrectly.
| * Update copyright year to 2017Paul Eggert2016-12-3182-82/+82
| | | | | | | | Run admin/update-copyright.
| * * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)Stefan Monnier2016-12-281-3/+3
| | | | | | | | | | (inline--dont-quote): Quote the function with #' when passing it to `apply'. Cherry picked from commit e6161f648903d821865b9610b3b6aa0f82a5dcb7.
* | Merge from origin/emacs-25Paul Eggert2017-01-011-8/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9adb101 Document 'describe-fontset' 229315c ; Add missing symbol quoting. 3d94931 Repair desktop restoration on text terminals 43022f9 Ignore forward-sexp-function in js-mode indentation code b19fb49 Improve documentation of 'define-coding-system' 467768f Fix Bug#25162 6db78ae Fix a typo in define-abbrev-table 5f7d906 Bump makeinfo requirement from 4.7 to 4.13 442e2f6 Fixes related to select-enable-clipboard e4ac450 Define struct predicate before acccesors 08decbd Doc fix for vc-git 5531e75 Further improve make-dist checking 953bf67 Improve previous make-dist change 129645a Make make-dist --snapshot do some sanity checks # Conflicts: # lisp/menu-bar.el
| * Define struct predicate before acccesorsNoam Postavsky2016-12-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | The accessor functions use the predicate function, which causes problems when reloading after unload-feature: the compiler-macro property is still present on the predicate symbol, and the compiler fails to find the definition when trying to inline it into the accessor function (Bug#25088). * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Move predicate definition before field accessor definitions.
| * * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix docstringPhilipp Stephani2016-12-071-3/+4
| | | | | | | | | | so that it matches the actual implementation. See https://lists.gnu.org/archive/html/help-gnu-emacs/2016-04/msg00071.html
* | Give eval-and-compile a correct edebug spec. Fixes bug #16184 properly.Alan Mackenzie2017-01-012-7/+4
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug_offset_indices): Revert abortive commit from Thu Dec 29 09:22:36 2016 +0000 which didn't really fix the bug. * lisp/emacs-lisp/byte-run.el (eval-and-compile): Change the edebug spec from t to (&rest def-form).
* | Checkdoc: use syntax functions instead of regexPhilipp Stephani2016-12-311-28/+31
| | | | | | | | | | | | | | | | | | | | | | In checkdoc.el, get rid of the error-prone regex to find definition forms, and use existing syntax-based navigation functions instead. This fixes a corner case with one-argument `defvar' forms. * lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): New function. (checkdoc-next-docstring, checkdoc-defun): Use it. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--next-docstring): Add unit test.
* | Initialize edebug-offset-indices to a cons, not nil. Fixes bug #16184.Alan Mackenzie2016-12-291-3/+6
| | | | | | | | | | | | | | | | This is because there are times when this variable is changed by setcar before an atom is pushed onto it by debug-enter. This happens, for example, whilst instrumenting c-font-lock-declarations in .../lisp/progmodes/cc-fonts.el. * lisp/emacs-lisp/edebug.el (edebug-offset-indices): initialize to '(0).
* | * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)Stefan Monnier2016-12-271-3/+3
| | | | | | | | (inline--dont-quote): Quote the function with #' when passing it to `apply'.
* | Checkdoc: Don't require a space before an arg listPhilipp Stephani2016-12-261-1/+1
| | | | | | | | | | | | | | | | | | See Bug#24998. * lisp/emacs-lisp/checkdoc.el (checkdoc-defun-regexp): Don't require a space before a argument list. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--bug-24998): Add unit test.
* | * src/data.c (Fmake_variable_frame_local): RemoveStefan Monnier2016-12-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'. * src/data.c (swap_in_symval_forwarding, set_internal) (set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local) (Fmake_local_variable, Fkill_local_variable, Flocal_variable_p): Don't pay attention to ->frame_local any more. (syms_of_data): Remove Qtrapping_frame_local and don't defsubr Smake_variable_frame_local. * etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal of make-variable-frame-local. * lisp/help-fns.el (describe-variable): Don't handle the now impossible frame-local case. * lisp/subr.el (make-variable-frame-local): Remove obsolescence data. * src/frame.c (store_frame_param): * src/eval.c (specbind): Don't pay attention to ->frame_local any more. * src/widget.c (first_frame_p): Remove, unused.
* | Fix rx-any with range with ?\] and ?-Noam Postavsky2016-12-181-1/+1
| | | | | | | | | | | | * lisp/emacs-lisp/rx.el: Make sure not to produce a circular list (Bug#25123). * test/lisp/emacs-lisp/rx-tests.el (rx-char-any): New test.
* | Make seq-into return the sequence when no conversion neededNicolas Petton2016-12-161-6/+22
| | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-into): Do not convert the sequence when no conversion is needed. * test/lisp/emacs-lisp/seq-tests.el (test-seq-into-and-identity): Add a regression test checking for identity.
* | Fix circular list handling in seq-mapnNicolas Petton2016-12-151-1/+4
| | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments. * test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists): Add a regression test.
* | Replace ldefs-boot with a much smaller filePhillip Lord2016-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (bootstrap-build,generate-ldefs-boot): New targets. (bootstrap): Depend on bootstrap-build. * admin/ldefs-clean.el: New file. * lisp/Makefile.in (compile-first): Depend on loaddefs.el * lisp/ldefs-boot.el: Remove. * lisp/ldefs-boot-auto.el: New file. * lisp/ldefs-boot-manual.el: New file. * lisp/loadup.el: Load ldefs-boot-manual.el. * src/emacs.c (generating_ldefs_boot): New variable. (main): Check whether we are generating ldefs. * src/eval.c (autoload-do-load): Dump autoload forms to stderr when requested. * src/lisp.h (generating_ldefs_boot): New variable. * admin/gitmerge.el, admin/make-tarball.txt, admin/notes/copyright, lisp/Makefile.in, lisp/cus-dep.el, lisp/emacs-lisp/elint.el, lisp/finder.el, lisp/loadup.el, msdos/mainmake.v2: Update reference to ldefs-boot. * admin/update_autogen: Alter mechanism for ldefs-boot generation.
* | Minor fix for define-derived-modeGlenn Morris2016-12-121-5/+6
| | | | | | | | | | | | * lisp/emacs-lisp/derived.el (define-derived-mode): Do not let eg eval-defun reset the values of syntax or abbrev tables, since they might have been defined externally. (Bug#16160)
* | Move backtrace to ELisp using a new mapbacktrace primitiveClément Pit--Claudel2016-12-121-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/eval.c (get_backtrace_starting_at, backtrace_frame_apply) (Fmapbacktrace, Fbacktrace_frame_internal): New functions. (get_backtrace_frame, Fbacktrace_debug): Use `get_backtrace_starting_at'. * lisp/subr.el (backtrace--print-frame): New function. (backtrace): Reimplement using `backtrace--print-frame' and `mapbacktrace'. (backtrace-frame): Reimplement using `backtrace-frame--internal'. * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Pass a base to `mapbacktrace' instead of searching for "(debug" in the output of `backtrace'. * test/lisp/subr-tests.el (subr-test-backtrace-simple-tests) (subr-test-backtrace-integration-test): New tests. * doc/lispref/debugging.texi (Internals of Debugger): Document `mapbacktrace' and missing argument BASE of `backtrace-frame'.
* | Minor advice.el fixGlenn Morris2016-12-121-1/+1
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/advice.el (ad-preactivate-advice): Avoid setting the function definition of nil. This was happening during bootstrap of org-compat.el, apparently due to eager macro expansion of code behind a (featurep 'xemacs) test.
* | Do not allow nil to be defined as a functionGlenn Morris2016-12-101-0/+1
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defun): * src/data.c (Ffset): Do not allow "nil". (Bug#25110)
* | Add some sanity checking of defun arglistNicolas Richard2016-12-101-0/+4
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defun): Check for malformed argument lists. (Bug#15715)
* | Retain message logging in map-y-or-n-pGlenn Morris2016-12-071-2/+1
| | | | | | | | | | * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Stop disabling logging to Messages buffer. (Bug#13326)
* | Merge from origin/emacs-25Paul Eggert2016-12-071-1/+1
|\| | | | | | | 35ce3fb Don't assume window-point and point are the same
| * Don't assume window-point and point are the sameNoam Postavsky2016-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | The function `cursor-sensor--detect' calls `bobp' to decide whether to check properties at (1- (window-point)). However, (window-point) may be at beginning of buffer, even if (point) is not. In this case an `args-out-of-range' error will be signaled (Bug#25104). * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Check the value of (window-point) against (point-min), rather than (bobp) to decide if (1- (window-point)) is accessible.
* | Docstring improvement for seq-some (bug#25129)Nicolas Petton2016-12-071-1/+2
| | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-some): Make the docstring less confusing regarding the returned value.
* | Fix ert-tests when running compiledNoam Postavsky2016-12-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/ert-tests.el (ert-test-deftest): Don't test for specific macroexpansion, just check result of evaluation. (ert-test-record-backtrace): Don't hardcode representation of closure in expected backtrace, this lets the test succeed even when the test code is compiled. * lisp/emacs-lisp/ert.el (ert--expand-should-1): Also pass `byte-compile-macro-environment' to `macroexpand', this allows the `should' macro to properly handle macroexpansion of macros that were defined in the same file when it's being compiled (Bug #17851).
* | Fix markup in read-multiple-choice doc (Bug#25102)Glenn Morris2016-12-031-1/+1
| | | | | | | | * lisp/emacs-lisp/subr-x.el (read-multiple-choice): Doc fix.
* | Add function to trigger debugger on variable writeNoam Postavsky2016-12-021-0/+91
| | | | | | | | | | | | | | * lisp/emacs-lisp/debug.el (debug-on-variable-change): (debug--variable-list): (cancel-debug-on-variable-change): New functions. (debugger-setup-buffer): Add watchpoint clause.
* | * lisp/emacs-lisp/subr-x.el (hash-table-keys, hash-table-values): Use cl-loop.Tino Calancha2016-11-261-6/+3
| |
* | Add "using" to cl-loop debug spec (Bug#24750)Mark Oteiza2016-11-251-0/+1
| | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-loop): Add element to account for "using" hash table clause.
* | buff-menu: Add command to unmark all buffersTino Calancha2016-11-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bind 'U' in buff-menu, bs and electric-buff-menu to commands to unmark all buffers (Bug#24880). * lisp/emacs-lisp/tabulated-list.el (tabulated-list-header-overlay-p): New predicate; return non-nil if tabulated-list has a fake header. * lisp/buff-menu.el (Buffer-menu-unmark-all-buffers): New command; remove all flags that use a particular mark from all the lines. Bind it to 'M-DEL'. (Buffer-menu-unmark-all): New command; remove all flags from all the lines. Bind it to 'U'. (Buffer-menu-marker-char, Buffer-menu-del-char): New variables. (Buffer-menu-delete, Buffer-menu-mark): Use them. (Buffer-menu-mode-map): Update menus. (Buffer-menu-mode): Update mode doc. * lisp/bs.el (bs-unmark-all, bs-unmark-previous): New commands. (bs-mode-map): Bind them to 'U' and '<backspace>' respectively. (bs-mode): Update mode doc. * lisp/ebuff-menu.el (electric-buffer-menu-mode-map): Bind Buffer-menu-unmark-all to 'U' and Buffer-menu-unmark-all-buffers to 'M-DEL'. (bs--down, bs-down, bs--up, bs-up, bs-unmark-current, bs-mark-current): Use point instead of cursor in doc string. (electric-buffer-list): Update mode doc. * doc/emacs/buffers.texi (Several Buffers): Mention Buffer-menu-unmark-all and Buffer-menu-unmark-all-buffers. ; * etc/NEWS: Add an entry per each new feature.