summaryrefslogtreecommitdiff
path: root/lisp/loadhist.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* * lisp/loadhist.el (loadhist-unload-element): Remove auxiliary function infoStefan Monnier2022-09-031-0/+7
| | | | See bug#50869.
* Delete redisplay-end-trigger-functions and related defunsStefan Kangas2022-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This variable and related functions have been obsolete since 23.1. The last things to depend on this (fast-lock.el and lazy-lock.el) were recently removed. * src/dispextern.h (struct it): Delete field 'redisplay_end_trigger_charpos'. * src/window.c (Fwindow_redisplay_end_trigger) (Fset_window_redisplay_end_trigger): Delete defuns and corresponding defsubrs for functions obsolete since 23.1. * src/window.h (wset_redisplay_end_trigger): Delete function. (GCALIGNED_STRUCT): Delete 'redisplay_end_trigger'. * src/xdisp.c (run_redisplay_end_trigger_hook): Delete function. (syms_of_xdisp) <redisplay_end_trigger_functions>: Delete variable obsolete since 23.1. (init_iterator, next_element_from_buffer): Don't run or set above deleted hook variable. * lisp/subr.el: Delete obsoletion definitions for above deleted defuns and variable. * doc/lispref/hooks.texi (Standard Hooks): * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): * lisp/loadhist.el (unload-feature-special-hooks): Don't mention above deleted variable. * admin/coccinelle/window.cocci: Adjust for above changes.
* (function-history): New symbol property (bug#53632)Stefan Monnier2022-01-311-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the code we have in Fdefalias that tries to keep track of definitions so as to be able to undo them later. We used to store in `load-history` when an autoload is redefined as a non-autoload and in the `autoload` symbol property we used to store the autoload data that used to be used before it got overriden. Instead, store the history of the function definition of a symbol in its `function-history` symbol property. To make this list cheap in the default case, the latest value is not stored in the list (since it's in the `symbol-function`) and neither is the first file. So if there's only been a single definition (the most common case), the list is empty and the property is just not present at all. The patch also gets rid of the `autoload` vs `defun` distinction in `load-history` which seems unnecessary (a significant part of the motivation for this patch was to get rid of the special handling of autoloads in this part of the code). * src/data.c (add_to_function_history): New function. (defalias): Use it. Don't add the `t` entries for autoloads and always use `defun` regardless of the kind of definition. Change `Vautoload_queue` to only hold the function symbols since the rest is now available from `function-history`. * src/eval.c (un_autoload): Adjust accordingly. * src/lread.c (load-history): Udate docstring. * lisp/loadhist.el (loadhist-unload-filename): New var. (unload-feature): Bind it. (loadhist-unload-element): Document its availability. (loadhist--restore-autoload): Delete var. (loadhist--unload-function): Delete function. (loadhist-unload-element): Delete the `t` and `autoload` methods. Rewrite the `defun` method using `function-history`. * lisp/help-fns.el: Require `seq`. (help-fns--autoloaded-p): Rewrite. (help-fns-function-description-header): Adjust call accordingly. * doc/lispref/loading.texi (Where Defined): Remove `autoload` and `t` entries from `load-history` since we don't generate them any more. Document the `function-history` which replaces the `autoload` property. (Unloading): Adjust symbol property name accordingly. * test/lisp/loadhist-resources/loadhist--bar.el: * test/lisp/loadhist-resources/loadhist--foo.el: New files. * test/lisp/loadhist-tests.el (loadhist-tests-unload-feature-nested) (loadhist-tests-unload-feature-notnested): New tests.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-221-2/+1
|
* Use lexical-binding in loadhist.el and add testsStefan Kangas2021-04-091-1/+1
| | | | | * lisp/loadhist.el: Use lexical-binding. * test/lisp/loadhist-tests.el: New file.
* Replace local intersection functions with seq-intersectionStefan Kangas2021-04-051-7/+8
| | | | | | | | | | | | | | | * lisp/doc-view.el (doc-view-intersection): * lisp/gnus/gnus-range.el (gnus-intersection): * lisp/htmlfontify.el (hfy-interq): * lisp/loadhist.el (file-set-intersect): * lisp/mail/smtpmail.el (smtpmail-intersection): Make obsolete in favor of seq-intersection. Update all callers. * lisp/url/url-dav.el (url-intersection): Redefine as obsolete function alias for seq-intersection. Update callers. * lisp/mpc.el (mpc-intersection, mpc-cmd-list, mpc-reorder): Use seq-intersection.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* unload-feature: Correct doc string to match info manual and realityŠtěpán Němec2020-10-211-5/+4
| | | | | | | | | 'unload-feature' doesn't try to "undo any additions the library has made" to hooks, it tries to remove functions defined by the library from hooks, no matter how they got there. * lisp/loadhist.el (unload-feature): Correct the doc string. * doc/lispref/loading.texi (Unloading): Clarify, fix typo.
* unload-feature: Handle local hooks (bug#5293)Štěpán Němec2020-10-211-0/+9
| | | | | | | | | | | Buffer-local hooks were introduced in 1994-09-30T20:47:13+00:00!rms@gnu.org 0e4d378b32 (add-hook): Initialize default value and local value. but 'unload-feature' has not been updated to handle them. * lisp/loadhist.el (unload-feature): Handle local hooks (bug#5293).
* unload-feature: Improve logic (don't repeat computation)Štěpán Němec2020-10-211-16/+17
| | | | * lisp/loadhist.el (unload-feature): Don't do the same computation twice.
* Don't misinterpret doc string as initial valueMattias Engdegård2020-03-041-1/+1
| | | | | | * lisp/loadhist.el (loadhist--restore-autoload): * lisp/progmodes/vhdl-mode.el (vhdl-font-lock-keywords-0): Prevent the doc string from being used as initial value.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-251-0/+1
| | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+0
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* Be more defensive regarding elements of 'load-history'Eli Zaretskii2019-03-011-1/+2
| | | | | | | | | * lisp/loadhist.el (file-dependents): * lisp/apropos.el (apropos-library): * lisp/help-fns.el (help-fns--autoloaded-p, help--loaded-p): * lisp/emacs-lisp/package.el (package--list-loaded-files): Don't assume 'load-history' elements must have a string as their 'car'. (Bug#34462)
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Explicitly require cl-lib where neededGlenn Morris2018-03-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than relying on the byte-compiler happening to use it. * lisp/completion.el, lisp/ffap.el, lisp/loadhist.el: * lisp/userlock.el, lisp/emacs-lisp/debug.el, lisp/emacs-lisp/rx.el: * lisp/emacs-lisp/testcover.el, lisp/mail/rfc2231.el: * lisp/net/newst-treeview.el, lisp/net/puny.el: * lisp/net/tramp-archive.el, lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el, lisp/net/tramp-smb.el, lisp/org/org-ctags.el: * lisp/org/org-macs.el, lisp/progmodes/grep.el: * lisp/progmodes/perl-mode.el, lisp/progmodes/ruby-mode.el: * lisp/textmodes/dns-mode.el, lisp/textmodes/mhtml-mode.el: * lisp/vc/pcvs-parse.el: Explicitly require cl-lib as needed.
* | * lisp/loadhist.el (unload-hook-features-list): Remove obsolete alias.Glenn Morris2018-03-121-2/+0
|/
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* * lisp/subr.el (define-symbol-prop): New functionStefan Monnier2017-07-281-0/+5
| | | | | | | | (symbol-file): Make it find symbol property definitions. * lisp/emacs-lisp/pcase.el (pcase-defmacro): * lisp/emacs-lisp/ert.el (ert-set-test): Use it instead of `put'. (ert-describe-test): Adjust call to symbol-file accordingly.
* * lisp/loadhist.el (unload-feature): Remove ad-hoc ELP codeStefan Monnier2017-07-271-5/+0
| | | | * lisp/emacs-lisp/elp.el (loadhist-unload-element): Un-instrument functions.
* (loadhist-unload-element): Move ERT and cl-generic methodsStefan Monnier2017-07-241-7/+3
| | | | | | | | | | | | | | | * lisp/loadhist.el (loadhist-unload-element): Don't define cl-generic and ert methods here. (loadhist-unload-element) <(head define-type)>: Remove unused var `slots'. * lisp/emacs-lisp/cl-generic.el (loadhist-unload-element): Define unload method for cl-defmethod. (cl-generic-ensure-function): Remove redundant `defalias'. * lisp/emacs-lisp/ert.el (ert-set-test): Move the current-load-list setting here... (ert-deftest): ...from here. (loadhist-unload-element): Define unload method for ert-deftest.
* Fix Bug#27371Michael Albinus2017-07-241-35/+64
| | | | | | | | | | | | * lisp/loadhist.el (loadhist-unload-element): Declare for different entry types of `load-history'. (loadhist--restore-autoload): New variable. (loadhist--unload-function): New defun. (unload-feature): Use `loadhist-unload-element'. Recommended by Stefan Monnier. (Bug#27371) * test/lisp/net/tramp-tests.el (tramp-test39-unload): Check, that the `tramp-file-name' structure has been unloaded.
* Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | Run admin/update-copyright.
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* * lisp/font-lock.el (font-lock-beginning-of-syntax-function): RemoveStefan Monnier2015-09-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* loadhist.el (read-feature): Conform to completing-readOleh Krehel2015-08-121-4/+9
| | | | | | * lisp/loadhist.el (read-feature): According to `completing-read' documentation, if collection is a list, then it must be a list of strings. And not a list of symbols like before.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Replace "Maintainer: FSF" with the emacs-devel mailing addressGlenn Morris2014-02-091-1/+1
|
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* * lisp/loadhist.el (read-feature): Get rid of fake feature nil. Leo Liu2013-11-151-8/+4
| | | | | * src/minibuf.c (Ftry_completion, Fall_completions) (Ftest_completion): Use FUNCTIONP. (Bug#15889)
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* Reduce use of (require 'cl).Stefan Monnier2012-07-101-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | * admin/bzrmerge.el: Use cl-lib. * leim/quail/hangul.el: Don't require CL. * leim/quail/ipa.el: Use cl-lib. * vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el: * vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el: * register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el: * msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el: * international/quail.el, info-xref.el, imenu.el, image-mode.el: * font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el: * battery.el, avoid.el, abbrev.el: Use cl-lib. * vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el: * vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el: * jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el: * emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el: * calculator.el, autorevert.el, apropos.el: Don't require CL. * emacs-bytecomp.el (byte-recompile-directory, display-call-tree) (byte-compile-unfold-bcf, byte-compile-check-variable): * emacs-byte-opt.el (byte-compile-trueconstp) (byte-compile-nilconstp): * emacs-autoload.el (make-autoload): Use pcase. * face-remap.el (text-scale-adjust): Simplify pcase patterns.
* Move define-obsolete-variable-alias before the var's definition.Stefan Monnier2012-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/log-edit.el (vc-comment-ring, vc-comment-ring-index): * lisp/tooltip.el (tooltip-hook): * lisp/textmodes/reftex-toc.el (reftex-toc-map): * lisp/textmodes/reftex-sel.el (reftex-select-label-map) (reftex-select-bib-map): * lisp/textmodes/reftex-index.el (reftex-index-map) (reftex-index-phrases-map): * lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map): * lisp/progmodes/meta-mode.el (meta-mode-map): * lisp/novice.el (disabled-command-hook): * lisp/loadhist.el (unload-hook-features-list): * lisp/frame.el (blink-cursor): * lisp/files.el (find-file-not-found-hooks, write-file-hooks) (write-contents-hooks): * lisp/emulation/tpu-edt.el (GOLD-map): * lisp/emacs-lock.el (emacs-lock-from-exiting): * lisp/emacs-lisp/generic.el (generic-font-lock-defaults): * lisp/emacs-lisp/chart.el (chart-map): * lisp/dos-fns.el (register-name-alist): * lisp/dired-x.el (dired-omit-files-p): * lisp/desktop.el (desktop-enable): * lisp/cus-edit.el (custom-mode-hook): * lisp/buff-menu.el (buffer-menu-mode-hook): * lisp/bookmark.el (bookmark-read-annotation-text-func) (bookmark-exit-hooks): * lisp/allout.el (allout-mode-deactivate-hook) (allout-exposure-change-hook, allout-structure-added-hook) (allout-structure-deleted-hook, allout-structure-shifted-hook): * lisp/dirtrack.el (dirtrack-toggle, dirtrackp, dirtrack-debug-toggle) (dirtrack-debug): Move call to define-obsolete-variable-alias so it comes before the corresponding variable's definition.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Spelling fixes.Paul Eggert2011-12-151-1/+1
|
* Spelling fixes.Paul Eggert2011-11-191-1/+1
|
* Spelling fixes.Paul Eggert2011-11-171-1/+1
|
* lisp/loadhist.el (unload-feature-special-hooks): Add some hooks (bug#5327).Juanma Barranquero2011-07-111-12/+20
|
* * loadhist.el (unload--set-major-mode): New function.Juanma Barranquero2011-06-251-0/+17
| | | | | | | | | (unload-feature): Use it. * progmodes/python.el (python-after-info-look): Add autoload cookie. (python-unload-function): New function. Fixes: debbugs:8781 debbugs:8730
* Merge from emacs-23; up to 2010-06-13T18:15:45Z!eliz@gnu.org.Glenn Morris2011-06-081-10/+10
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
|
* Nuke arch-tags.Glenn Morris2011-01-151-1/+0
|
* Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
|
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|