summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/emacs-lisp/pcase.el (pcase): Tweak docstring.Michael Heerdegen2015-11-031-4/+4
|
* Avoid errors in redisplay--pre-redisplay-functionsEli Zaretskii2015-10-311-1/+1
| | | | | * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Don't use 'bobp', instead compare window-point with 1. (Bug#21730)
* * lisp/emacs-lisp/cl-generic.el: Add (major-mode MODE) contextStefan Monnier2015-10-291-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cl--generic-derived-specializers): New function. (cl--generic-derived-generalizer): New generalizer. (cl-generic-generalizers): New specializer (derived-mode MODE). (cl--generic-split-args): Apply the rewriter, if any. (cl-generic-define-context-rewriter): New macro. (major-mode): Use it to define a new context-rewriter, so we can write `(major-mode MODE)' instead of `(major-mode (derived-mode MODE))'. * lisp/frame.el (window-system): New context-rewriter so we can write `(window-system VAL)' instead of (window-system (eql VAL)). (cl--generic-split-args): Apply the rewriter, if any. (frame-creation-function): Use the new syntax. * lisp/term/x-win.el (window-system-initialization) (handle-args-function, frame-creation-function) (gui-backend-set-selection, gui-backend-selection-owner-p) (gui-backend-selection-exists-p, gui-backend-get-selection): * lisp/term/w32-win.el (window-system-initialization) (handle-args-function, frame-creation-function) (gui-backend-set-selection, gui-backend-get-selection) (gui-backend-selection-owner-p, gui-backend-selection-exists-p): * lisp/term/pc-win.el (gui-backend-get-selection) (gui-backend-selection-exists-p, gui-backend-selection-owner-p) (gui-backend-set-selection, window-system-initialization) (frame-creation-function, handle-args-function): * lisp/term/ns-win.el (window-system-initialization) (handle-args-function, frame-creation-function) (gui-backend-set-selection, gui-backend-selection-exists-p) (gui-backend-get-selection): * lisp/startup.el (handle-args-function): * lisp/term/xterm.el (gui-backend-get-selection) (gui-backend-set-selection): Use the new syntax.
* * lisp/emacs-lisp/smie.el: Use `declare' for `pure'Stefan Monnier2015-10-291-4/+4
| | | | | (smie-precs->prec2, smie-merge-prec2s, smie-bnf->prec2, smie-prec2->grammar): Use `declare'.
* * lisp/emacs-lisp/cl-generic.el: Accomodate future changesStefan Monnier2015-10-293-77/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | (cl--generic-generalizer): Add `name' field. (cl-generic-make-generalizer): Add corresponding `name' argument. (cl-generic-define-generalizer): New macro. (cl--generic-head-generalizer, cl--generic-eql-generalizer) (cl--generic-struct-generalizer, cl--generic-typeof-generalizer) (cl--generic-t-generalizer): Use it. (cl-generic-ensure-function): Add `noerror' argument. (cl-generic-define): Use it so we don't follow aliases. (cl-generic-define-method): Preserve pre-existing ordering of methods. (cl--generic-arg-specializer): New function. (cl--generic-cache-miss): Use it. (cl-generic-generalizers): Only fset a temporary definition during bootstrap. (cl--generic-struct-tag, cl--generic-struct-specializers): Allow extra arguments. * lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-generalizer) (eieio--generic-static-object-generalizer): Use cl-generic-define-generalizer. (eieio--generic-static-symbol-specializers): Allow extra arguments. * lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer) (eieio--generic-subclass-generalizer): Use cl-generic-define-generalizer. (eieio--generic-subclass-specializers): Allow extra arguments.
* * lisp/emacs-lisp/bytecomp.el (compile-defun): Add defvars in scope.Stefan Monnier2015-10-291-1/+4
|
* (internal--syntax-propertize): Save match-data here (bug#21766)Stefan Monnier2015-10-281-6/+5
| | | | | * lisp/emacs-lisp/syntax.el (internal--syntax-propertize): Save match-data. * lisp/simple.el (delete-trailing-whitespace): Undo last change.
* * lisp/emacs-lisp/macroexp.el: Tweak macroexp-if optimizationsStefan Monnier2015-10-281-13/+25
| | | | | | | (macroexp-unprogn): Make sure we never return an empty list. (macroexp-if): Remove unused (and unsafe) optimization. Optimize (if A T (if B T E)) into (if (or A B) T E) instead, which does occur occasionally.
* * lisp/emacs-lisp/seq.el (seq-mapn): New functionArtur Malabarba2015-10-281-1/+16
| | | | * doc/lispref/sequences.texi (Sequence Functions): Document seq-mapn
* * lisp/emacs-lisp/thunk.el (thunk-delay): Fix the macro.Nicolas Petton2015-10-281-2/+2
|
* * lisp/emacs-lisp/map.el: Better docstrings.Nicolas Petton2015-10-261-11/+12
|
* * lisp/emacs-lisp/seq.el: Better docstrings.Nicolas Petton2015-10-261-26/+31
|
* * lisp/emacs-lisp/seq.el: Rename all seq argumentss to sequence.Nicolas Petton2015-10-261-153/+153
|
* * lisp/emacs-lisp/ert.el: Print results without newline escapingPhillip Lord2015-10-261-2/+3
|
* * lisp/emacs-lisp/thunk.el: Better documentation.Nicolas Petton2015-10-231-4/+15
|
* `load-path' should contain only directory namesStephen Leake2015-10-231-1/+2
| | | | | * lisp/emacs-lisp/package.el (package-autoload-ensure-default-file): `load-path' should contain only directory names
* New library thunk.elNicolas Petton2015-10-231-0/+63
| | | | | | | | thunk.el is extracted from stream.el in ELPA, with additional tests. * lisp/emacs-lisp/thunk.el: New file. * test/automated/thunk-tests.el: New file. * etc/NEWS: Add information about thunk.el
* (/ N) now returns the reciprocal of NPaul Eggert2015-10-202-3/+3
| | | | | | | | | | | | | | | This is more compatible with Common Lisp and XEmacs (Bug#21690). See: http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg01053.html * lisp/color.el (color-hue-to-rgb, color-hsl-to-rgb) (color-xyz-to-srgb, color-xyz-to-lab): * lisp/emacs-lisp/cl-extra.el (cl-float-limits): * lisp/net/shr-color.el (shr-color-hue-to-rgb) (shr-color-hsl-to-rgb-fractions): Exploit the change to simplify the code a bit. * lisp/emacs-lisp/bytecomp.el (byte-compile-quo): Don’t complain about single-argument calls to ‘/’. * src/data.c (arith_driver, float_arith_driver): Implement the change.
* New function seq-positionNicolas Petton2015-10-201-2/+13
| | | | | | * lisp/emacs-lisp/seq.el (seq-position): New function. * test/automated/seq-tests.el: New tests for seq-position. * doc/lispref/sequences.texi: Add documentation for `seq-position'.
* * lisp/emacs-lisp/eldoc.el: Add back-to-indentation to the command listMark Oteiza2015-10-171-0/+1
|
* * emacs-lisp/package.el: Reload archive-contents if priorities changeArtur Malabarba2015-10-161-0/+10
| | | | | | | (package--old-archive-priorities): New variable. (package-read-all-archive-contents, package-menu--refresh): Use it to decide when the `package-archive-contents' needs to be read again.
* Fix typos in docstringsNicolas Petton2015-10-142-2/+2
| | | | | | * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/seq.el: Fix typos in the docstrings of the pcase macros.
* Better docstrings in seq.el and map.elNicolas Petton2015-10-142-7/+14
| | | | | * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/seq.el: Improve the docstring for the pcase patterns.
* * lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort):Artur Malabarba2015-10-071-1/+3
| | | | Check if column can be sorted before trying. (Bug#21639)
* lisp/emacs-lisp/package.el (package-install): Fix name errorAaron Ecay2015-10-061-10/+10
| | | | | * lisp/emacs-lisp/package.el (package-install): Fix error when pkg is not a package-desc object. Also clarify documentation. (Bug#21625)
* Fix a few problems with directed quotesPaul Eggert2015-10-012-2/+2
| | | | | | | | | | This is in response to a problem report by Kaushal Modi in: http://bugs.gnu.org/21588#25 * lisp/cedet/mode-local.el (describe-mode-local-overload): * lisp/emacs-lisp/bytecomp.el (byte-compile-fix-header): * lisp/info-xref.el (info-xref-check-all-custom): * lisp/mail/emacsbug.el (report-emacs-bug-hook): Prefer directed to undirected single quotes in diagnostics.
* * lisp/emacs-lisp/lisp-mode.el (let-when-compile): Work like let*Stefan Monnier2015-09-291-8/+12
|
* ; Remove extraneous "coding: utf-8" specifications in Elisp filesDmitry Gutov2015-09-297-17/+4
|
* Better documentation for seq-someNicolas Petton2015-09-281-2/+1
| | | | | | | * doc/lispref/sequences.texi: * lisp/emacs-lisp/seq.el: Update the documentation of seq-some to guarantee that the returned value is the first non-nil value that resulted from applying the predicate.
* Resurrect edebug-set-initial-mode, repurposing it to set the global mode.Alan Mackenzie2015-09-251-38/+28
| | | | | | | | | | | | | | | | lisp/emacs-lisp/edebug.el (edebug-initial-mode-alist): Uncomment, and amend to match current modes and functions. (edebug-set-initial-mode): Uncomment and change from setting a defun's `edebug-initial-mode''s property to setting the variable `edebug-initial-mode'. (top level): Create new binding C-x C-a C-m for `edebug-set-initial-mode'. doc/lispref/edebug.texi (Edebug Execution Modes): document `edebug-set-initial-mode' and its new key binding. (Edebug Options): Mention the new command in the pertinent place. etc/NEWS: Write entry for this change.
* Fix recent bootstrap problemsStefan Monnier2015-09-241-0/+2
| | | | | | * src/syntax.c (parse_sexp_propertize): Fix last fix. * lisp/nxml/nxml-mode.el (nxml-comment-quote-nested): Fix paren typo. * lisp/emacs-lisp/lisp-mode.el: Require cl-lib for cl-progv.
* Move let-when-compile to lisp-mode.elOleh Krehel2015-09-231-0/+13
| | | | | This fixes the bootstrapping problem of `let-when-compile' using `cl-progv' while being in subr.el (i.e. before cl stuff was loaded).
* * prolog.el: Fix indentation of empty lineStefan Monnier2015-09-221-1/+16
| | | | | | | | | | | | | | | | | * lisp/emacs-lisp/smie.el (smie-rules-function): Document new `empty-line-token' element. (smie-indent-empty-line): New function. (smie-indent-functions): Add it. * lisp/progmodes/prolog.el (prolog-smie-rules): Fix :list-intro behavior and use the new `empty-line-token' element (bug#21526). (prolog-mode-variables): Fix comment-start-skip setting to match comment-start. * test/indent/prolog.prolog: Add nested indentation tests. * lisp/newcomment.el (comment-normalize-vars): Fix default value of comment-start-skip not to misuse submatch 1.
* Better docstring and parameter name for seq-findNicolas Petton2015-09-211-6/+6
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-find): Improve the docstring and rename the parameter `sentinel' to `default'. * doc/lispref/sequences.texi (Sequence Functions): Update the documentation for `seq-find' accordingly.
* * lisp/emacs-lisp/syntax.el (syntax-begin-function): Make obsoleteStefan Monnier2015-09-201-0/+1
|
* '.' -> `.' in doc stringPaul Eggert2015-09-201-1/+1
| | | | | | * lisp/emacs-lisp/timer.el (run-at-time): In doc string, quote individual chars with grave quotes instead of straight quotes, as this works better when they are translated to curved quotes.
* Improve documentation of 'run-at-time'Eli Zaretskii2015-09-201-10/+11
| | | | | | | | * lisp/emacs-lisp/timer.el (run-at-time): Improve the doc string. In particular, don't refer to 'diary-entry-time', because it is unavailable until diary-lib is loaded. Also, refer to 'timer-duration-words', not 'timer-duration', as the latter's doc string says nothing about the accepted strings.
* * lisp/emacs-lisp/timer.el (run-at-time): Docstring formattingArtur Malabarba2015-09-191-12/+19
|
* * lisp/font-lock.el (font-lock-beginning-of-syntax-function): RemoveStefan Monnier2015-09-172-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (font-lock-fontify-block): Don't let-bind it. (font-lock-compile-keywords): Don't use it. (font-lock-set-defaults): Don't set it. Allow the variable alist to start one slot earlier, instead. * lisp/emacs-lisp/syntax.el (font-lock-beginning-of-syntax-function): Don't declare. (syntax-ppss): Don't use it either. * lisp/font-core.el (font-lock-defaults): Remove SYNTAX-BEGIN from docstring. * doc/emacs/display.texi (Font Lock): Don't mention font-lock-beginning-of-syntax-function. * doc/lispref/modes.texi (Font Lock Basics): Update description of font-lock-defaults. (Syntactic Font Lock): Remove font-lock-beginning-of-syntax-function. * lisp/loadhist.el (unload-feature-special-hooks): Remove font-lock-beginning-of-syntax-function. * lisp/obsolete/lazy-lock.el (lazy-lock-fontify-region): * lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): Don't let-bind font-lock-beginning-of-syntax-function.
* Backslash cleanup in Elisp source filesPaul Eggert2015-09-1717-33/+33
| | | | | | | | | | | This patch should not change behavior. It typically omits backslashes where they are redundant (e.g., in the string literal "^\$"). In a few places, insert backslashes where they make regular expressions clearer: e.g., replace "^\*" (equivalent to "^*") with "^\\*", which has the same effect as a regular expression. Also, use ‘\ %’ instead of ‘\%’ when avoiding confusion with SCCS IDs, and similarly use ‘\ $’ instead of ‘\$’ when avoiding confusion with RCS IDs, as that makes it clearer that the backslash is intended.
* Fix search argument in ‘lisp--el-match-keyword’ (Bug#21492) (Bug#21493)Daniel McClanahan2015-09-161-1/+2
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Fix search argument. (Bug#21492) (Bug#21493) Copyright-paperwork-exempt: yes
* Fix bugs in eieio-oref-default related to class symbolsStephen Leake2015-09-151-1/+2
| | | | | * lisp/emacs-lisp/eieio-core.el (class-p): Handle symbol properly. (eieio-oref-default): Handle class properly.
* * lisp/emacs-lisp/lisp-mode.el (lisp-mode-symbol-regexp): New constStefan Monnier2015-09-151-59/+49
| | | | | | | Use it everywhere "\\(\\sw\\|\\s_\\|\\\\.\\)+" was used. (cl-lib-fdefs): Add defgeneric. (cl-kw): Add all elements of eieio-kw and cl-lib-kw. (eieio-kw, cl-lib-kw, el-kw): Remove.
* Elisp mode: Make font-lock and imenu handle escaped characters in symbolsAlan Mackenzie2015-09-141-17/+17
| | | | | | | | | | Fixes debbugs#21449. lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression) (lisp--el-match-keyword, lisp-el-font-lock-keywords-1) (lisp-cl-font-lock-keywords-1, lisp-el-font-lock-keywords-2) (lisp-cl-font-lock-keywords-2, lisp-string-in-doc-position-p): Insert "\\|\\\\." into regexps which match symbols.
* * lisp/emacs-lisp/eieio-core.el (class-p): Accept class objectsStefan Monnier2015-09-111-4/+4
|
* Merge syntax-propertize--done and parse-sexp-propertize-doneStefan Monnier2015-09-111-52/+53
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/syntax.el (syntax-propertize--done): Remove. (syntax-propertize): Set syntax-propertize--done even if syntax-propertize-function is nil. Avoid recursive invocations. (syntax-propertize-chunks): New var. (internal--syntax-propertize): Use it. Rename from syntax--jit-propertize. Simplify. (parse-sexp-propertize-function): Don't set any more. * src/syntax.c (SETUP_SYNTAX_TABLE): Call parse_sexp_propertize as needed. (parse_sexp_propertize): Don't assume charpos is not yet propertized. Call Qinternal__syntax_propertize instead of Vparse_sexp_propertize_function. Truncate e_property if needed. (update_syntax_table_forward): Streamline. (syms_of_syntax): Define Qinternal__syntax_propertize. (syntax_propertize__done): Rename from parse_sexp_propertize_done.
* Add seq-findNicolas Petton2015-09-111-0/+13
| | | | | | | | | | | This function is similar to `seq-some' but returns the found element. In the cases where nil can be the found element, a sentinel optional argument can be provided to avoid ambiguities. * lisp/emacs-lisp/seq.el (seq-find): New function. * test/automated/seq-tests.el (test-seq-find): Add tests for `seq-find'. * doc/lispref/sequences.texi (Sequence Functions): Add documentation for seq-find.
* Revert some stray curved quotes I missed earlierPaul Eggert2015-09-105-7/+8
| | | | | | | Problem reported by David Kastrup in: http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00440.html * lisp/international/mule-cmds.el (leim-list-header): Use format-message with an ASCII-only format.
* Make syntax.c call syntax-propertize on demandStefan Monnier2015-09-091-0/+15
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/syntax.el (syntax--jit-propertize): New function. (parse-sexp-propertize-function): Use it. (syntax-propertize): Disable parse-sexp-propertize-function. * src/syntax.c (parse_sexp_propertize, update_syntax_table_forward): New functions. (syms_of_syntax): New vars `parse-sexp-propertize-done' and `parse-sexp-propertize-function'. * src/syntax.h (struct gl_state_s): Add `e_property_truncated' field. (UPDATE_SYNTAX_TABLE_FORWARD): Use update_syntax_table_forward. (SETUP_BUFFER_SYNTAX_TABLE): Set e_property_truncated. * lisp/progmodes/elisp-mode.el (elisp-byte-code-syntax-propertize): Don't assume `point' is set.
* * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Remove warningStefan Monnier2015-09-091-2/+5
|