summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/emacs-lisp/nadvice.el: Add buffer-local support to add-function.Stefan Monnier2012-11-142-5/+31
| | | | | | (advice--buffer-local-function-sample): New var. (advice--set-buffer-local, advice--buffer-local): New functions. (add-function, remove-function): Use them.
* * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Defend againstStefan Monnier2012-11-141-3/+5
| | | | | | | potential binding of print-gensym to t, and prettify (back)quotes in case they appear in args's default values. Fixes: debbugs:12884
* * lisp/emacs-lisp/nadvice.el: Add around advice for interactive specs.Stefan Monnier2012-11-141-25/+41
| | | | | | | (advice-eval-interactive-spec): New function. (advice--make-interactive-form): Support around advice. Fixes: debbugs:12844
* * lisp/emacs-lisp/gv.el (setf): Fix debug spec for multiple assignments.Stefan Monnier2012-11-131-1/+1
| | | | Fixes: debbugs:12879
* * emacs-lisp/advice.el: Fix typos in comment.Tsuyoshi Kitamoto2012-11-131-2/+2
|
* * lisp/emacs-lisp/advice.el: Layer on top of nadvice.el.Stefan Monnier2012-11-131-492/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove out of date self-require hack. (ad-do-advised-functions): Use simple `dolist'. (ad-advice-name, ad-advice-protected, ad-advice-enabled) (ad-advice-definition): Redefine as functions. (ad-advice-classes): Move before first use. (ad-make-origname, ad-set-orig-definition, ad-clear-orig-definition) (ad-make-mapped-call, ad-make-advised-docstring, ad-make-plain-docstring) (ad--defalias-fset): Remove functions. (ad-make-advicefunname, ad-clear-advicefunname-definition): New functions. (ad-get-orig-definition): Rewrite. (ad-make-advised-definition-docstring): Change base docstring. (ad-real-orig-definition): Rewrite. (ad-map-arglists): Change name of called function. (ad--make-advised-docstring): Redirect `function' from ad-Advice-... (ad-make-advised-definition): Simplify. (ad-assemble-advised-definition): Tweak for new calling context. (ad-activate-advised-definition): Setup ad-Advice-* instead of ad-Orig-*. (ad--defalias-fset): Rename from ad-handle-definition. Make it set the function and call ad-activate if needed. (ad-activate, ad-deactivate): Don't call ad-handle-definition any more. (ad-recover): Clear ad-Advice-* instead of ad-Orig-*. (ad-compile-function): Compile ad-Advice-*. (ad-activate-on-top-level, ad-with-auto-activation-disabled): Remove. (ad-start-advice, ad-stop-advice): Remove.
* * lisp/emacs-lisp/advice.el: Remove support for freezing.Stefan Monnier2012-11-121-117/+21
| | | | | | (ad-make-freeze-docstring, ad-make-freeze-definition): Remove functions. (ad-make-single-advice-docstring, ad-defadvice-flags, defadvice): Remove support for `freeze'.
* * lisp/emacs-lisp/cl.el (dolist, dotimes, declare): Use advice-add toStefan Monnier2012-11-124-53/+68
| | | | | | | | | | | | | | | override the default. * lisp/emacs-lisp/cl-macs.el (cl-dolist, cl-dotimes): Rewrite without using cl--dotimes/dolist. * lisp/subr.el (dolist, dotimes, declare): Redefine them normally, even when `cl' is loaded. * lisp/emacs-lisp/nadvice.el (advice--normalize): New function, extracted from add-advice. (advice--strip-macro): New function. (advice--defalias-fset): Use them to handle macros. (advice-add): Use them. (advice-member-p): Correctly handle macros.
* Merge from emacs-24; up to 2012-11-09T14:45:15Z!dmantipov@yandex.ruGlenn Morris2012-11-122-6/+7
|\
| * * lisp/emacs-lisp/gv.el (gv-define-simple-setter): One more fix.Stefan Monnier2012-11-121-2/+3
| | | | | | | | Fixes: debbugs:12871
| * Document debugger-bury-or-killGlenn Morris2012-11-101-3/+3
| | | | | | | | | | | | | | | | * doc/lispref/debugging.texi (Using Debugger): Mention debugger-bury-or-kill. * lisp/emacs-lisp/debug.el (debugger-bury-or-kill): Doc tweak. * etc/NEWS: Related edit.
| * * lisp/emacs-lisp/debug.el (debugger-bury-or-kill): Fix :version.Glenn Morris2012-11-101-1/+1
| |
* | * lisp/emacs-lisp/nadvice.el: New package.Stefan Monnier2012-11-124-367/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (special-form-p): New function. * lisp/emacs-lisp/elp.el: Use lexical-binding and advice-add. (elp-all-instrumented-list): Remove var. (elp-not-profilable): Remove elp-wrapper. (elp-profilable-p): Use autoloadp and special-form-p. (elp--advice-name): New const. (elp-instrument-function): Use advice-add. (elp--instrumented-p): New predicate. (elp-restore-function): Use advice-remove. (elp-restore-all, elp-reset-all): Use mapatoms. (elp-set-master): Use elp--instrumented-p. (elp--make-wrapper): Rename from elp-wrapper, return a function suitable for advice-add. Use cl-inf. (elp-results): Use mapatoms+elp--instrumented-p. * lisp/emacs-lisp/debug.el: Use lexical-binding and advice-add. (debug-function-list): Remove var. (debug): Rename arg, and then let-bind it explicitly inside. (debugger-setup-buffer): Rename arg. (debugger-setup-buffer): Adjust counts to new debug-on-entry setup. (debugger-frame-number): Adjust to new debug-on-entry setup. (debug--implement-debug-on-entry): Rename from implement-debug-on-entry, add argument. (debugger-special-form-p): Remove, use special-form-p instead. (debug-on-entry): Use advice-add. (debug--function-list): New function. (cancel-debug-on-entry): Use it, along with advice-remove. (debug-arglist, debug-convert-byte-code, debug-on-entry-1): Remove. (debugger-list-functions): Use debug--function-list instead of debug-function-list. * lisp/emacs-lisp/advice.el (ad-save-real-definition): Remove, unused. (ad-special-form-p): Remove, use special-form-p instead. (ad-set-advice-info): Use add-function and remove-function. (ad--defalias-fset): Adjust accordingly. * test/automated/advice-tests.el: New tests.
* | Auto-commit of loaddefs files.Glenn Morris2012-11-111-9/+14
| |
* | Merge from emacs-24; up to 2012-11-08T14:54:03Z!monnier@iro.umontreal.caGlenn Morris2012-11-106-29/+66
|\|
| * * lisp/emacs-lisp/advice.el: Require `cl-lib' at run-time to fixStefan Monnier2012-11-081-1/+2
| | | | | | | | miscompilation of trace.el.
| * * lisp/emacs-lisp/gv.el (gv-define-simple-setter): Fix last change.Stefan Monnier2012-11-071-1/+2
| | | | | | | | Fixes: debbugs:12812
| * More cl-lib and gv doc updatesGlenn Morris2012-11-071-19/+33
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl.el (define-setf-expander, defsetf) (define-modify-macro): Doc fixes. * doc/misc/cl.texi (Obsolete Setf Customization): Give defsetf gv.el replacements. * etc/NEWS: Related edit.
| * Small doc updates for generalized variablesGlenn Morris2012-11-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/gv.el (gv-letplace): Fix doc typo. (gv-define-simple-setter): Update doc of `fix-return'. * doc/lispref/variables.texi (Adding Generalized Variables): Update description of FIX-RETURN expansion. * doc/misc/cl.texi (Obsolete Setf Customization): Revert defsetf example to the more correct let rather than prog1.
| * * lisp/emacs-lisp/gv.el (gv-define-simple-setter): Don't evaluate `val'Stefan Monnier2012-11-061-2/+4
| | | | | | | | | | | | twice when `fix-return' is set. Fixes: debbugs:12813
| * * lisp/emacs-lisp/cl.el (defsetf): Pass the third arg toStefan Monnier2012-11-061-1/+1
| | | | | | | | | | | | gv-define-simple-setter. Fixes: debbugs:12812
| * * lisp/emacs-lisp/gv.el (gv-define-setter): Fix doc typo.Glenn Morris2012-11-051-1/+1
| |
| * Auto-commit of loaddefs files.Glenn Morris2012-11-051-9/+14
| |
| * Misc small cl doc fixesGlenn Morris2012-11-053-3/+18
| | | | | | | | | | | | | | | | | | * emacs-lisp/cl-extra.el (cl-maplist, cl-mapcan): Doc fix. * emacs-lisp/cl-extra.el (cl-prettyexpand): * emacs-lisp/cl-lib.el (cl-proclaim, cl-declaim): * emacs-lisp/cl-macs.el (cl-destructuring-bind, cl-locally) (cl-the, cl-compiler-macroexpand): Add basic doc strings.
| * Auto-commit of loaddefs files.Glenn Morris2012-11-041-3/+3
| |
* | Provide new `defalias-fset-function' symbol property.Stefan Monnier2012-11-091-83/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (AUTOLOADP): New macro. * src/eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead. * src/data.c (Ffset): Remove special ad-advice-info handling. (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function. (Fsubr_arity): CSE. (Finteractive_form): Simplify. (Fquo): Don't insist on having at least 2 arguments. (Qdefalias_fset_function): New var. * lisp/emacs-lisp/advice.el (ad-set-advice-info): Set defalias-fset-function. (ad--defalias-fset): New function. (ad-safe-fset): Remove. (ad-make-freeze-definition): Use cl-letf*.
* | * lisp/emacs-lisp/advice.el: Miscellaneous cleanup. Use lexical-binding.Stefan Monnier2012-11-091-90/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (fset, documentation): Don't save real def since we don't advise. (ad-do-advised-functions): Remove problematic `result-form'. (ad-safe-fset): `ad-real-fset' => `fset'. (ad-read-advised-function): Don't assume that ad-do-advised-functions uses CL's dolist internally. (ad-arglist): Remove unused arg `name'. (ad-docstring, ad-make-advised-docstring): `ad-real-documentation' => `documentation'. (warning-suppress-types): Declare. (ad-set-arguments): Simple CSE. (ad-recover-normality): Sanity check.
* | * lisp/emacs-lisp/bytecomp.el (byte-compile-out-toplevel): Don't turnStefan Monnier2012-11-091-1/+2
| | | | | | | | (funcall '(lambda ..) ..) into ((lambda ..) ..).
* | New property dynamic-docstring-function for docstrings.Stefan Monnier2012-11-081-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/doc.c (Fdocumentation): Handle new property dynamic-docstring-function to replace the old ad-advice-info. * lisp/emacs-lisp/advice.el: Use new dynamic docstrings. (ad-make-advised-definition-docstring, ad-advised-definition-p): Use dynamic-docstring-function instead of ad-advice-info. (ad--make-advised-docstring): New function extracted from ad-make-advised-docstring. (ad-make-advised-docstring): Use it. * lisp/progmodes/sql.el (sql--make-help-docstring): New function, extracted from sql-help. (sql-help): Use it with dynamic-docstring-function.
* | * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):Stefan Monnier2012-11-081-12/+27
| | | | | | | | | | | | | | Byte-compile *before* eval in eval-and-compile. (byte-compile-log-warning): Remove redundant inhibit-read-only. (byte-compile-file-form-autoload): Don't hide actual definition. (byte-compile-maybe-guarded): Accept `functionp' as well.
* | * lisp/emacs-lisp/gv.el (gv-deref): Move setter declaration, to fix bootstrap.Stefan Monnier2012-11-081-1/+4
| |
* | * lisp/emacs-lisp/gv.el (gv-ref, gv-deref): New function and macro.Stefan Monnier2012-11-081-1/+0
| |
* | * lisp/emacs-lisp/gv.el (gv-ref, gv-deref): New function and macro.Stefan Monnier2012-11-081-0/+18
| |
* | * emacs-lisp/byte-opt.el (toplevel): Add compare-window-configurations,Dmitry Antipov2012-11-061-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frame-first-window, frame-root-window, frame-selected-window, minibuffer-selected-window, minibuffer-window, window-absolute-pixel-edges, window-at, window-body-height, window-body-width, window-display-table, window-combination-limit, window-frame, window-fringes, window-inside-absolute-pixel-edges, window-inside-edges, window-inside-pixel-edges, window-left-child, window-left-column, window-margins, window-next-buffers, window-next-sibling, window-new-normal, window-new-total, window-normal-size, window-parameter, window-parameters, window-parent, window-pixel-edges, window-point, window-prev-buffers, window-prev-sibling, window-redisplay-end-trigger, window-scroll-bars, window-start, window-text-height, window-top-child, window-top-line, window-total-height, window-total-width and window-use-time to the list of functions without side-effects. (toplevel): Add window-valid-p to the list of error-free functions without side-effects.
* | Auto-commit of loaddefs files.Glenn Morris2012-11-041-4/+4
| |
* | Merge from emacs-24; up to 2012-11-03T05:11:34Z!dmantipov@yandex.ruGlenn Morris2012-11-031-2/+7
|\|
| * Rename cl-loop-handler, cl-loop-for-handler back to their original namesGlenn Morris2012-11-031-2/+4
| | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-parse-loop-clause): Rename handler properties back from cl-- to cl-. Fixes: debbugs:12788
| * * lisp/emacs-lisp/cl-macs.el (cl-do-all-symbols): Add doc string.Glenn Morris2012-11-031-0/+3
| |
* | Rename cl-random-time to cl--random-timeGlenn Morris2012-11-032-4/+4
| | | | | | | | | | | | | | | | * emacs-lisp/cl-lib.el (cl--random-time): Rename from cl-random-time. (cl--gensym-counter, cl--random-state): Update callers. * emacs-lisp/cl-extra.el (cl-make-random-state): Update callers. Fixes: debbugs:12773
* | Decouple "noruntime" and "cl-functions" bytecomp warningsGlenn Morris2012-11-021-10/+1
|/ | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Decouple "noruntime" and "cl-functions" warnings.
* Auto-commit of loaddefs files.Glenn Morris2012-10-301-2/+7
|
* cl-mapc small fixesGlenn Morris2012-10-301-1/+2
| | | | | | * lisp/emacs-lisp/cl-extra.el (cl-mapc): Add autoload cookie. Doc fix. * doc/misc/cl.texi (Mapping over Sequences): Mention cl-mapc naming oddity.
* Doc and manual updates for cl-letf and letfGlenn Morris2012-10-301-1/+3
| | | | | | | | | | | Fixes: debbugs:12760 * doc/misc/cl.texi (Modify Macros): Update for cl-letf changes. (Obsolete Lexical Macros): Say a little more about letf/cl-letf. * lisp/emacs-lisp/cl.el (letf): Doc fix. * etc/NEWS: Related edit.
* * lisp/emacs-lisp/cl.el (letf): Add missing indent rules.Stefan Monnier2012-10-291-0/+1
| | | | Fixes: debbugs:12759
* * lisp/emacs-lisp/cl.el (defsetf): Doc fix.Glenn Morris2012-10-281-3/+3
|
* * lisp/emacs-lisp/package.el (package-generate-autoloads): Kill bufferDaniel Hackney2012-10-281-1/+3
| | | | "PKGNAME-autoloads.el" in case we created it.
* * lisp/emacs-lisp/advice.el (ad-assemble-advised-definition):Stefan Monnier2012-10-261-3/+5
| | | | Silence bogus compiler warnings for ad-do-it.
* * lisp/emacs-lisp/macroexp.el (macroexp--expand-all):Stefan Monnier2012-10-261-2/+7
| | | | | | Obey byte-compile-warning-enabled-p. Fixes: debbugs:12486
* Merge CEDET upstream.David Engster2012-10-252-29/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emacs-lisp/eieio.el (eieio-update-lisp-imenu-expression): Removed. This feature is already integrated in imenu. * emacs-lisp/eieio-opt.el: Remove require for `button' since it is always loaded. Require `speedbar' unconditionally. * semantic/analyze.el (semantic-analyze-dereference-alias): New function to dereference aliases. (semantic-analyze-current-context-default): Use it. * semantic/grammar.el (semantic-grammar-create-package): * srecode/compile.el (srecode-compile-templates): Throw a proper error if semantic-mode is not enabled (bug#9968). Compiler warning fixes: * semantic.el (semantic-elapsed-time): Make it a defsubst. * srecode/dictionary.el (srecode-adebug-dictionary): Remove require for `semantic'. * srecode/map.el: * srecode/insert.el: Declare functions from `data-debug'. * semantic/grammar.el: Require `help-fns'. Declare functions from `eldoc', which is required in function body. * srecode/java.el: * semantic/texi.el: * semantic/grammar-wy.el: * semantic/db-file.el: * semantic/db-el.el: * semantic/chart.el: Fix requires. * ede/locate.el: Remove useless requires. Declare functions instead and require in functions when needed.
* * lisp/emacs-lisp/package.el (package-installed-p): Warn if not ready.Stefan Monnier2012-10-251-0/+1
| | | | Fixes: debbugs:12721