1. 17 Jan, 2020 1 commit
    • Glenn Morris's avatar
      Make more load-hooks obsolete · 680021eb
      Glenn Morris authored
      * lisp/align.el (align-load-hook):
      * lisp/autorevert.el (auto-revert-load-hook):
      * lisp/bookmark.el (bookmark-load-hook):
      * lisp/cmuscheme.el (cmuscheme-load-hook):
      * lisp/dired.el (dired-load-hook):
      * lisp/expand.el (expand-load-hook):
      * lisp/ibuffer.el (ibuffer-load-hook):
      * lisp/msb.el (msb-after-load-hook):
      * lisp/recentf.el (recentf-load-hook):
      * lisp/speedbar.el (speedbar-load-hook):
      * lisp/strokes.el (strokes-load-hook):
      * lisp/calc/calc.el (calc-load-hook):
      * lisp/calendar/timeclock.el (timeclock-load-hook):
      * lisp/emulation/viper-init.el (viper-load-hook):
      * lisp/progmodes/cwarn.el (cwarn-load-hook):
      * lisp/progmodes/idlwave.el (idlwave-load-hook):
      * lisp/progmodes/inf-lisp.el (inferior-lisp-load-hook):
      * lisp/progmodes/meta-mode.el (meta-mode-load-hook):
      * lisp/textmodes/reftex-vars.el (reftex-load-hook):
      * lisp/textmodes/table.el (table-load-hook):
      * lisp/url/url-vars.el (url-load-hook):
      * lisp/vc/ediff-init.el (ediff-load-hook):
      Obsolete for with-eval-after-load.
      680021eb
  2. 04 Jan, 2020 1 commit
  3. 01 Jan, 2020 1 commit
  4. 26 Nov, 2019 1 commit
    • Juri Linkov's avatar
      message uses minibuffer-message in the active minibuffer (bug#17272 bug#19064) · aa89c84e
      Juri Linkov authored
      * doc/lispref/display.texi (Displaying Messages): Explain the
      behavior of using minibuffer-message if the minibuffer is active.
      
      * src/editfns.c (Fmessage_in_echo_area): New function with body
      copied from Fmessage.
      (Fmessage): Call minibuffer-message in the active minibuffer,
      otherwise call Fmessage_in_echo_area.
      (message-in-echo-area): New variable.
      
      * lisp/isearch.el (isearch--momentary-message, isearch-message):
      * lisp/minibuffer.el (minibuffer-message, minibuffer-completion-help):
      Use 'message-in-echo-area' instead of 'message' where necessary.
      
      * lisp/autorevert.el (auto-revert-handler):
      * lisp/man.el (Man-bgproc-sentinel):
      * lisp/subr.el (do-after-load-evaluation):
      Revert recent changes that replaced 'message' with 'minibuffer-message'.
      This is not needed anymore since 'message' uses 'minibuffer-message'
      in the active minibuffer.
      aa89c84e
  5. 10 Nov, 2019 1 commit
    • Juri Linkov's avatar
      * lisp/autorevert.el: Use 'minibuffer-message' to not obscure the prompt. · 7e151f5b
      Juri Linkov authored
      * lisp/autorevert.el (auto-revert-handler): Use 'minibuffer-message'
      instead of 'message'.  Call it from the original window's buffer
      that in case of the minibuffer should be current, so
      minibuffer-message could add a message to it.  (Bug#34614)
      
      * lisp/emacs-lisp/ert-x.el (ert--make-message-advice): Add nil to
      the list of values to not use for format-message, because
      minibuffer-message calls 'message' with nil argument, and tests fail.
      7e151f5b
  6. 20 Sep, 2019 1 commit
    • Juanma Barranquero's avatar
      lisp/*.el: Fix typos and other trivial doc fixes · 11432322
      Juanma Barranquero authored
      * lisp/allout-widgets.el (allout-widgets-auto-activation)
      (allout-current-decorated-p):
      * lisp/auth-source.el (auth-source-protocols):
      * lisp/autorevert.el (auto-revert-set-timer):
      * lisp/battery.el (battery-mode-line-limit):
      * lisp/calc/calcalg3.el (math-map-binop):
      * lisp/calendar/cal-dst.el (calendar-dst-find-startend):
      * lisp/calendar/cal-mayan.el (calendar-mayan-long-count-to-absolute):
      * lisp/calendar/calendar.el (calendar-date-echo-text)
      (calendar-generate-month, calendar-string-spread)
      (calendar-cursor-to-date, calendar-read, calendar-read-date)
      (calendar-mark-visible-date, calendar-dayname-on-or-before):
      * lisp/calendar/diary-lib.el (diary-ordinal-suffix):
      * lisp/cedet/ede/autoconf-edit.el (autoconf-new-program)
      (autoconf-find-last-macro, autoconf-parameter-strip):
      * lisp/cedet/ede/config.el (ede-target-with-config-build):
      * lisp/cedet/ede/linux.el (ede-linux--detect-architecture)
      (ede-linux--get-architecture):
      * lisp/cedet/semantic/complete.el (semantic-collector-calculate-cache)
      (semantic-displayer-abstract, semantic-displayer-point-position):
      * lisp/cedet/semantic/format.el (semantic-format-face-alist)
      (semantic-format-tag-short-doc):
      * lisp/cedet/semantic/fw.el (semantic-find-file-noselect):
      * lisp/cedet/semantic/idle.el (semantic-idle-scheduler-work-idle-time)
      (semantic-idle-breadcrumbs-display-function)
      (semantic-idle-breadcrumbs-format-tag-list-function):
      * lisp/cedet/semantic/lex.el (semantic-lex-map-types)
      (define-lex, define-lex-block-type-analyzer):
      * lisp/cedet/semantic/senator.el (senator-search-default-tag-filter):
      * lisp/cedet/semantic/symref.el (semantic-symref-result)
      (semantic-symref-hit-to-tag-via-db):
      * lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass):
      * lisp/cedet/semantic/tag.el (semantic-tag-new-variable)
      (semantic-tag-new-include, semantic-tag-new-package)
      (semantic-tag-set-faux, semantic-create-tag-proxy)
      (semantic-tag-function-parent)
      (semantic-tag-components-with-overlays):
      * lisp/cedet/srecode/cpp.el (srecode-cpp-namespaces)
      (srecode-semantic-handle-:c, srecode-semantic-apply-tag-to-dict):
      * lisp/cedet/srecode/dictionary.el (srecode-create-dictionary)
      (srecode-dictionary-add-entries, srecode-dictionary-lookup-name)
      (srecode-create-dictionaries-from-tags):
      * lisp/cmuscheme.el (scheme-compile-region):
      * lisp/color.el (color-lab-to-lch):
      * lisp/doc-view.el (doc-view-image-width)
      (doc-view-set-up-single-converter):
      * lisp/dynamic-setting.el (font-setting-change-default-font)
      (dynamic-setting-handle-config-changed-event):
      * lisp/elec-pair.el (electric-pair-text-pairs)
      (electric-pair-skip-whitespace-function)
      (electric-pair-string-bound-function):
      * lisp/emacs-lisp/avl-tree.el (avl-tree--del-balance)
      (avl-tree-member, avl-tree-mapcar, avl-tree-iter):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-generate-call-tree):
      * lisp/emacs-lisp/checkdoc.el (checkdoc-autofix-flag)
      (checkdoc-spellcheck-documentation-flag, checkdoc-ispell)
      (checkdoc-ispell-current-buffer, checkdoc-ispell-interactive)
      (checkdoc-ispell-message-interactive)
      (checkdoc-ispell-message-text, checkdoc-ispell-start)
      (checkdoc-ispell-continue, checkdoc-ispell-comments)
      (checkdoc-ispell-defun):
      * lisp/emacs-lisp/cl-generic.el (cl--generic-search-method):
      * lisp/emacs-lisp/eieio-custom.el (eieio-read-customization-group):
      * lisp/emacs-lisp/lisp.el (forward-sexp, up-list):
      * lisp/emacs-lisp/package-x.el (package--archive-contents-from-file):
      * lisp/emacs-lisp/package.el (package-desc)
      (package--make-autoloads-and-stuff, package-hidden-regexps):
      * lisp/emacs-lisp/tcover-ses.el (ses-exercise-startup):
      * lisp/emacs-lisp/testcover.el (testcover-nohits)
      (testcover-1value):
      * lisp/epg.el (epg-receive-keys, epg-start-edit-key):
      * lisp/erc/erc-backend.el (erc-server-processing-p)
      (erc-split-line-length, erc-server-coding-system)
      (erc-server-send, erc-message):
      * lisp/erc/erc-button.el (erc-button-face, erc-button-alist)
      (erc-browse-emacswiki):
      * lisp/erc/erc-ezbounce.el (erc-ezbounce, erc-ezb-get-login):
      * lisp/erc/erc-fill.el (erc-fill-variable-maximum-indentation):
      * lisp/erc/erc-log.el (erc-current-logfile):
      * lisp/erc/erc-match.el (erc-log-match-format)
      (erc-text-matched-hook):
      * lisp/erc/erc-netsplit.el (erc-netsplit, erc-netsplit-debug):
      * lisp/erc/erc-networks.el (erc-server-alist)
      (erc-networks-alist, erc-current-network):
      * lisp/erc/erc-ring.el (erc-input-ring-index):
      * lisp/erc/erc-speedbar.el (erc-speedbar)
      (erc-speedbar-update-channel):
      * lisp/erc/erc-stamp.el (erc-timestamp-only-if-changed-flag):
      * lisp/erc/erc-track.el (erc-track-position-in-mode-line)
      (erc-track-remove-from-mode-line, erc-modified-channels-update)
      (erc-track-last-non-erc-buffer, erc-track-sort-by-importance)
      (erc-track-get-active-buffer):
      * lisp/erc/erc.el (erc-get-channel-user-list)
      (erc-echo-notice-hook, erc-echo-notice-always-hook)
      (erc-wash-quit-reason, erc-format-@nick):
      * lisp/ffap.el (ffap-latex-mode):
      * lisp/files.el (abort-if-file-too-large)
      (dir-locals--get-sort-score, buffer-stale--default-function):
      * lisp/filesets.el (filesets-tree-max-level, filesets-data)
      (filesets-update-pre010505):
      * lisp/gnus/gnus-agent.el (gnus-agent-flush-cache):
      * lisp/gnus/gnus-art.el (gnus-article-encrypt-protocol)
      (gnus-button-prefer-mid-or-mail):
      * lisp/gnus/gnus-cus.el (gnus-group-parameters):
      * lisp/gnus/gnus-demon.el (gnus-demon-handlers)
      (gnus-demon-run-callback):
      * lisp/gnus/gnus-dired.el (gnus-dired-print):
      * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-buffer):
      * lisp/gnus/gnus-range.el (gnus-range-normalize):
      * lisp/gnus/gnus-spec.el (gnus-pad-form):
      * lisp/gnus/gnus-srvr.el (gnus-server-agent, gnus-server-cloud)
      (gnus-server-opened, gnus-server-closed, gnus-server-denied)
      (gnus-server-offline):
      * lisp/gnus/gnus-sum.el (gnus-refer-thread-use-nnir)
      (gnus-refer-thread-limit-to-thread)
      (gnus-summary-limit-include-thread, gnus-summary-refer-thread)
      (gnus-summary-find-matching):
      * lisp/gnus/gnus-util.el (gnus-rescale-image):
      * lisp/gnus/gnus.el (gnus-summary-line-format, gnus-no-server):
      * lisp/gnus/mail-source.el (mail-source-incoming-file-prefix):
      * lisp/gnus/message.el (message-cite-reply-position)
      (message-cite-style-outlook, message-cite-style-thunderbird)
      (message-cite-style-gmail, message--send-mail-maybe-partially):
      * lisp/gnus/mm-extern.el (mm-inline-external-body):
      * lisp/gnus/mm-partial.el (mm-inline-partial):
      * lisp/gnus/mml-sec.el (mml-secure-message-sign)
      (mml-secure-message-sign-encrypt, mml-secure-message-encrypt):
      * lisp/gnus/mml2015.el (mml2015-epg-key-image)
      (mml2015-epg-key-image-to-string):
      * lisp/gnus/nndiary.el (nndiary-reminders, nndiary-get-new-mail):
      * lisp/gnus/nnheader.el (nnheader-directory-files-is-safe):
      * lisp/gnus/nnir.el (nnir-search-history)
      (nnir-imap-search-other, nnir-artlist-length)
      (nnir-artlist-article, nnir-artitem-group, nnir-artitem-number)
      (nnir-artitem-rsv, nnir-article-group, nnir-article-number)
      (nnir-article-rsv, nnir-article-ids, nnir-categorize)
      (nnir-retrieve-headers-override-function)
      (nnir-imap-default-search-key, nnir-hyrex-additional-switches)
      (gnus-group-make-nnir-group, nnir-run-namazu, nnir-read-parms)
      (nnir-read-parm, nnir-read-server-parm, nnir-search-thread):
      * lisp/gnus/nnmairix.el (nnmairix-default-group)
      (nnmairix-propagate-marks):
      * lisp/gnus/smime.el (smime-keys, smime-crl-check)
      (smime-verify-buffer, smime-noverify-buffer):
      * lisp/gnus/spam-report.el (spam-report-url-ping-mm-url):
      * lisp/gnus/spam.el (spam-spamassassin-positive-spam-flag-header)
      (spam-spamassassin-spam-status-header, spam-sa-learn-rebuild)
      (spam-classifications, spam-check-stat, spam-spamassassin-score):
      * lisp/help.el (describe-minor-mode-from-symbol):
      * lisp/hippie-exp.el (hippie-expand-ignore-buffers):
      * lisp/htmlfontify.el (hfy-optimizations, hfy-face-resolve-face)
      (hfy-begin-span):
      * lisp/ibuf-ext.el (ibuffer-update-saved-filters-format)
      (ibuffer-saved-filters, ibuffer-old-saved-filters-warning)
      (ibuffer-filtering-qualifiers, ibuffer-repair-saved-filters)
      (eval, ibuffer-unary-operand, file-extension, directory):
      * lisp/image-dired.el (image-dired-cmd-pngcrush-options):
      * lisp/image-mode.el (image-toggle-display):
      * lisp/international/ccl.el (ccl-compile-read-multibyte-character)
      (ccl-compile-write-multibyte-character):
      * lisp/international/kkc.el (kkc-save-init-file):
      * lisp/international/latin1-disp.el (latin1-display):
      * lisp/international/ogonek.el (ogonek-name-encoding-alist)
      (ogonek-information, ogonek-lookup-encoding)
      (ogonek-deprefixify-region):
      * lisp/isearch.el (isearch-filter-predicate)
      (isearch--momentary-message):
      * lisp/jsonrpc.el (jsonrpc-connection-send)
      (jsonrpc-process-connection, jsonrpc-shutdown)
      (jsonrpc--async-request-1):
      * lisp/language/tibet-util.el (tibetan-char-p):
      * lisp/mail/feedmail.el (feedmail-queue-use-send-time-for-date)
      (feedmail-last-chance-hook, feedmail-before-fcc-hook)
      (feedmail-send-it-immediately-wrapper, feedmail-find-eoh):
      * lisp/mail/hashcash.el (hashcash-generate-payment)
      (hashcash-generate-payment-async, hashcash-insert-payment)
      (hashcash-verify-payment):
      * lisp/mail/rmail.el (rmail-movemail-variant-in-use)
      (rmail-get-attr-value):
      * lisp/mail/rmailmm.el (rmail-mime-prefer-html, rmail-mime):
      * lisp/mail/rmailsum.el (rmail-summary-show-message):
      * lisp/mail/supercite.el (sc-raw-mode-toggle):
      * lisp/man.el (Man-start-calling):
      * lisp/mh-e/mh-acros.el (mh-do-at-event-location)
      (mh-iterate-on-messages-in-region, mh-iterate-on-range):
      * lisp/mh-e/mh-alias.el (mh-alias-system-aliases)
      (mh-alias-reload, mh-alias-ali)
      (mh-alias-canonicalize-suggestion, mh-alias-add-alias-to-file)
      (mh-alias-add-alias):
      * lisp/mouse.el (mouse-save-then-kill):
      * lisp/net/browse-url.el (browse-url-default-macosx-browser):
      * lisp/net/eudc.el (eudc-set, eudc-variable-protocol-value)
      (eudc-variable-server-value, eudc-update-variable)
      (eudc-expand-inline):
      * lisp/net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result):
      * lisp/net/eudcb-ldap.el (eudc-ldap-get-field-list):
      * lisp/net/pop3.el (pop3-list):
      * lisp/net/soap-client.el (soap-namespace-put)
      (soap-xs-parse-sequence, soap-parse-envelope):
      * lisp/net/soap-inspect.el (soap-inspect-xs-complex-type):
      * lisp/nxml/rng-xsd.el (rng-xsd-date-to-days):
      * lisp/org/ob-C.el (org-babel-prep-session:C)
      (org-babel-load-session:C):
      * lisp/org/ob-J.el (org-babel-execute:J):
      * lisp/org/ob-asymptote.el (org-babel-prep-session:asymptote):
      * lisp/org/ob-awk.el (org-babel-execute:awk):
      * lisp/org/ob-core.el (org-babel-process-file-name):
      * lisp/org/ob-ebnf.el (org-babel-execute:ebnf):
      * lisp/org/ob-forth.el (org-babel-execute:forth):
      * lisp/org/ob-fortran.el (org-babel-execute:fortran)
      (org-babel-prep-session:fortran, org-babel-load-session:fortran):
      * lisp/org/ob-groovy.el (org-babel-execute:groovy):
      * lisp/org/ob-io.el (org-babel-execute:io):
      * lisp/org/ob-js.el (org-babel-execute:js):
      * lisp/org/ob-lilypond.el (org-babel-default-header-args:lilypond)
      (org-babel-lilypond-compile-post-tangle)
      (org-babel-lilypond-display-pdf-post-tangle)
      (org-babel-lilypond-tangle)
      (org-babel-lilypond-execute-tangled-ly)
      (org-babel-lilypond-compile-lilyfile)
      (org-babel-lilypond-check-for-compile-error)
      (org-babel-lilypond-process-compile-error)
      (org-babel-lilypond-mark-error-line)
      (org-babel-lilypond-parse-error-line)
      (org-babel-lilypond-attempt-to-open-pdf)
      (org-babel-lilypond-attempt-to-play-midi)
      (org-babel-lilypond-switch-extension)
      (org-babel-lilypond-set-header-args):
      * lisp/org/ob-lua.el (org-babel-prep-session:lua):
      * lisp/org/ob-picolisp.el (org-babel-execute:picolisp):
      * lisp/org/ob-processing.el (org-babel-prep-session:processing):
      * lisp/org/ob-python.el (org-babel-prep-session:python):
      * lisp/org/ob-scheme.el (org-babel-scheme-capture-current-message)
      (org-babel-scheme-execute-with-geiser, org-babel-execute:scheme):
      * lisp/org/ob-shen.el (org-babel-execute:shen):
      * lisp/org/org-agenda.el (org-agenda-entry-types)
      (org-agenda-move-date-from-past-immediately-to-today)
      (org-agenda-time-grid, org-agenda-sorting-strategy)
      (org-agenda-filter-by-category, org-agenda-forward-block):
      * lisp/org/org-colview.el (org-columns--overlay-text):
      * lisp/org/org-faces.el (org-verbatim, org-cycle-level-faces):
      * lisp/org/org-indent.el (org-indent-set-line-properties):
      * lisp/org/org-macs.el (org-get-limited-outline-regexp):
      * lisp/org/org-mobile.el (org-mobile-files):
      * lisp/org/org.el (org-use-fast-todo-selection)
      (org-extend-today-until, org-use-property-inheritance)
      (org-refresh-effort-properties, org-open-at-point-global)
      (org-track-ordered-property-with-tag, org-shiftright):
      * lisp/org/ox-html.el (org-html-checkbox-type):
      * lisp/org/ox-man.el (org-man-source-highlight)
      (org-man-verse-block):
      * lisp/org/ox-publish.el (org-publish-sitemap-default):
      * lisp/outline.el (outline-head-from-level):
      * lisp/progmodes/dcl-mode.el (dcl-back-to-indentation-1)
      (dcl-calc-command-indent, dcl-indent-to):
      * lisp/progmodes/flymake.el (flymake-make-diagnostic)
      (flymake--overlays, flymake-diagnostic-functions)
      (flymake-diagnostic-types-alist, flymake--backend-state)
      (flymake-is-running, flymake--collect, flymake-mode):
      * lisp/progmodes/gdb-mi.el (gdb-threads-list, gdb, gdb-non-stop)
      (gdb-buffers, gdb-gud-context-call, gdb-jsonify-buffer):
      * lisp/progmodes/grep.el (grep-error-screen-columns):
      * lisp/progmodes/gud.el (gud-prev-expr):
      * lisp/progmodes/ps-mode.el (ps-mode, ps-mode-target-column)
      (ps-run-goto-error):
      * lisp/progmodes/python.el (python-eldoc-get-doc)
      (python-eldoc-function-timeout-permanent, python-eldoc-function):
      * lisp/shadowfile.el (shadow-make-group):
      * lisp/speedbar.el (speedbar-obj-do-check):
      * lisp/textmodes/flyspell.el (flyspell-auto-correct-previous-hook):
      * lisp/textmodes/reftex-cite.el (reftex-bib-or-thebib):
      * lisp/textmodes/reftex-index.el (reftex-index-goto-entry)
      (reftex-index-kill, reftex-index-undo):
      * lisp/textmodes/reftex-parse.el (reftex-context-substring):
      * lisp/textmodes/reftex.el (reftex-TeX-master-file):
      * lisp/textmodes/rst.el (rst-next-hdr, rst-toc)
      (rst-uncomment-region, rst-font-lock-extend-region-internal):
      * lisp/thumbs.el (thumbs-mode):
      * lisp/vc/ediff-util.el (ediff-restore-diff):
      * lisp/vc/pcvs-defs.el (cvs-cvsroot, cvs-force-dir-tag):
      * lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p):
      * lisp/wid-edit.el (widget-field-value-set, string):
      * lisp/x-dnd.el (x-dnd-version-from-flags)
      (x-dnd-more-than-3-from-flags): Assorted docfixes.
      11432322
  7. 27 Jul, 2019 1 commit
  8. 11 Jun, 2019 1 commit
    • Mattias Engdegård's avatar
      Keep auto-revert-mode working when changing buffer file name (bug#36159) · e92dac34
      Mattias Engdegård authored
      * lisp/autorevert.el (after-set-visited-file-name-hook):
      Add unconditionally.
      (global-auto-revert-mode): Don't use
      `after-set-visited-file-name-hook' here.
      (auto-revert-set-visited-file-name): Rename from
      `auto-revert--global-set-visited-file-name' and generalise.
      * test/lisp/autorevert-tests.el (auto-revert-test06-write-file): New.
      e92dac34
  9. 20 May, 2019 1 commit
    • Mattias Engdegård's avatar
      Avoid polling in global-auto-revert-mode (bug#35418) · e9f9827e
      Mattias Engdegård authored
      Make `auto-revert-avoid-polling' have effect in global-auto-revert-mode.
      Buffers actually handled by that mode are marked with a non-nil value
      of `auto-revert--global-mode'.  When global-auto-revert-mode is
      entered, eligible buffers are marked in that way, and hooks are set up
      to mark new buffers and take care of buffers whose file names change.
      This way the existing poll-avoidance logic can be used, since the
      entire set of buffers in auto-revert is known.
      
      A new hook, `after-set-visited-file-name-hook', was added to handle
      the case when the file name of a tracked buffer changes.
      
      * lisp/autorevert.el (auto-revert-avoid-polling): Amend doc string.
      (auto-revert--global-mode): New buffer-local variable.
      (global-auto-revert-mode): Mark existing buffers and set up hooks when
      mode is entered; do the opposite when exited.
      (auto-revert--global-add-current-buffer)
      (auto-revert--global-adopt-current-buffer)
      (auto-revert--set-visited-file-name-advice): New functions.
      (auto-revert--polled-buffers, auto-revert--need-polling-p)
      (auto-revert-notify-handler)
      (auto-revert-active-p): Modify logic to cover global-auto-revert-mode.
      * lisp/files.el (after-set-visited-file-name-hook): New hook.
      (set-visited-file-name-hook): Call new hook.
      * test/lisp/autorevert-tests.el (top):  Use lexical-binding.
      (auto-revert-test--write-file, auto-revert-test--buffer-string)
      (auto-revert-test--wait-for, auto-revert-test--wait-for-buffer-text)
      (auto-revert-test05-global-notify): New test.
      * doc/lispref/hooks.texi (Standard Hooks):
      Mention new hook (in a comment, since it's unclear whether it should
      actually be documented here)
      * etc/NEWS (Changes in Specialized Modes and Packages): Update entry.
      e9f9827e
  10. 18 May, 2019 1 commit
    • Mattias Engdegård's avatar
      Don't use file notification on non-file buffers · 1943220d
      Mattias Engdegård authored
      Allow non-file buffers to declare that notification on their
      default-directory is sufficient to know when auto-revert updates are
      required by setting the new variable `buffer-auto-revert-by-notification'
      to non-nil.  If nil, the default, then auto-revert will poll
      those buffers instead. (bug#35418).
      Currently, only Dired sets that variable.
      
      * lisp/autorevert.el (auto-revert-buffers):
      Modify condition for using notification.
      * lisp/files.el (buffer-auto-revert-by-notification): New variable.
      * lisp/dired.el (dired-mode): Set buffer-auto-revert-by-notification.
      * doc/emacs/arevert-xtra.texi (Non-File Buffers): Document new variable.
      * etc/NEWS (Changes in Specialized Modes and Packages): Describe new variable.
      1943220d
  11. 03 May, 2019 1 commit
    • Michael Albinus's avatar
      Add tests for remote files in auto-revert-tests · d0fe28cb
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-debug): New defvar.
      (auto-revert-notify-handler): Write traces.
      
      * lisp/filenotify.el (file-notify-debug): New defvar.
      (file-notify-handle-event, file-notify-callback): Write traces.
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered):
      Handle nil `vc-handled-backends'.
      
      * test/lisp/autorevert-tests.el
      (auto-revert-test-remote-temporary-file-directory): New defconst.
      Handle also $REMOTE_FILE_NOTIFY_LIBRARY.
      (auto-revert--test-enabled-remote-checked): New defvar.
      (auto-revert--test-enabled-remote): New defun.
      (auto-revert--wait-for-revert): Rewrite without timeout.
      (auto-revert--deftest-remote): New defmacro.
      (auto-revert-test01-auto-revert-several-files):
      (auto-revert-test02-auto-revert-deleted-file): Adapt for remote files.
      (auto-revert-test02-auto-revert-deleted-file):
      Use `auto-revert-debug' for debug messages.
      (auto-revert-test00-auto-revert-mode-remote)
      (auto-revert-test01-auto-revert-several-files-mode-remote)
      (auto-revert-test02-auto-revert-deleted-file-mode-remote)
      (auto-revert-test03-auto-revert-tail-mode-mode-remote)
      (auto-revert-test04-auto-revert-mode-dired-mode-remote): New tests.
      
      * test/lisp/filenotify-tests.el (file-notify--test-event-handler):
      Use `file-notify-debug' for debug messages.
      d0fe28cb
  12. 30 Apr, 2019 2 commits
    • Mattias Engdegård's avatar
    • Mattias Engdegård's avatar
      Don't poll auto-revert files that use notification (bug#35418) · c61bbb4c
      Mattias Engdegård authored
      It is a waste to periodically poll files that use change notification
      in auto-revert mode; stop doing that.  If no files need polling,
      turn off the periodic execution entirely to further avoid wasting power.
      Use a timer to inhibit immediate reversion for some time after a
      notification, for throttling.
      
      This change does not apply to files in global-auto-revert-mode, where
      polling is still necessary.  It is disabled by default, and enabled by
      setting `auto-revert-avoid-polling' to non-nil.
      
      * lisp/autorevert.el
      (toplevel): Require cl-lib.
      (auto-revert-avoid-polling, auto-revert--polled-buffers)
      (auto-revert--need-polling-p, auto-revert--lockout-interval)
      (auto-revert--lockout-timer, auto-revert--end-lockout): New.
      (global-auto-revert-mode): Keep notifiers for buffers in auto-revert mode.
      (auto-revert-set-timer): Use auto-revert--need-polling-p.
      (auto-revert-notify-handler): Restart polling if notification stopped.
      Use new lockout timer.
      (auto-revert-buffers):
      Use auto-revert--polled-buffers and auto-revert--need-polling-p.
      (auto-revert-buffers-counter, auto-revert-buffers-counter-lockedout):
      Remove.
      
      * etc/NEWS (Changes in Specialized Modes and Packages):
      Describe the new auto-revert-avoid-polling variable.
      
      * doc/emacs/files.texi (Reverting):
      Add paragraph describing auto-revert-avoid-polling.
      c61bbb4c
  13. 23 Apr, 2019 1 commit
    • Mattias Engdegård's avatar
      Rename auto-revert-notify-watch-descriptor-hash-list · ecab8835
      Mattias Engdegård authored
      * lisp/autorevert.el
      (auto-revert-notify-watch-descriptor-hash-list):
      Rename to auto-revert--buffers-by-watch-descriptor.  Improved doc string.
      (auto-revert-notify-rm-watch, auto-revert-notify-add-watch,
      auto-revert-notify-handler): Use new name.
      ecab8835
  14. 22 Apr, 2019 3 commits
  15. 15 Apr, 2019 1 commit
    • Mattias Engdegård's avatar
      Don't remove notify descriptor that is already gone · e9e807e9
      Mattias Engdegård authored
      * lisp/autorevert.el (auto-revert-use-notify, auto-revert-mode,
      global-auto-revert-mode, auto-revert-notify-rm-watch,
      auto-revert-notify-add-watch, auto-revert-notify-handler,
      auto-revert-notify-rm-watch-callback):
      Don't remove a notify descriptor after receiving a `stopped' notification
      event, because the descriptor is then already gone and any attempt to
      remove it causes a recursive call to `auto-revert-notify-handler'.
      e9e807e9
  16. 06 Apr, 2019 2 commits
    • Michael Albinus's avatar
      Fix Bug#34847 · bcc6468b
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-remove-current-buffer):
      Add optional argument BUFFER.
      (auto-revert-notify-rm-watch): Remove local hook.
      (auto-revert-buffers): Check `buffer-live-p' in time.  (Bug#34847)
      bcc6468b
    • Mauro Aranda's avatar
      Fix typo in a doc string · a8cffcf2
      Mauro Aranda authored
      * lisp/autorevert.el (global-auto-revert-mode): Fix a typo.
      (Bug#35165)
      a8cffcf2
  17. 09 Mar, 2019 1 commit
    • Eli Zaretskii's avatar
      Avoid errors in Auto Revert mode · 82d4b987
      Eli Zaretskii authored
      * lisp/autorevert.el (auto-revert-buffers): Cancel
      auto-revert-timer only if it is non-nil.  This avoids errors
      on first invocation of Auto-Revert mode.
      82d4b987
  18. 06 Feb, 2019 1 commit
    • Michael Albinus's avatar
      Fix Bug#34196 · 19fbef54
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-buffers): Handle buffers with a
      remote default-directory only, when they are connected.  (Bug#34196)
      
      * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
      Set "connected" property.
      
      * lisp/net/tramp.el (tramp-process-actions): Revert change from
      2019-02-04.  Bug#34196 will be solved in autorevert.el.
      19fbef54
  19. 01 Jan, 2019 1 commit
  20. 30 Nov, 2018 1 commit
    • Michael Albinus's avatar
      Fix Bug#33556 · c53e7f2c
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-notify-add-watch):
      Assert that a key in `auto-revert-notify-watch-descriptor-hash-list'
      is a valid file notification descriptor.  (Bug#33556)
      c53e7f2c
  21. 04 Nov, 2018 1 commit
    • Michael Albinus's avatar
      Fix Bug#33194 · d10036d7
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-notify-add-watch):
      Handle buffers with same descriptor properly.
      (auto-revert-notify-handler): Handle all buffers with same
      descriptor.  (Bug#33194)
      
      * lisp/filenotify.el (file-notify-callback): Simplify.
      d10036d7
  22. 24 Sep, 2018 1 commit
    • Paul Eggert's avatar
      file-attributes cleanup · 662bee7d
      Paul Eggert authored
      Mostly, this replaces magic-number calls like (nth 4 A) with
      more-informative calls like (file-attribute-access-time A).
      It also fixes some documentation and minor timestamp coding
      issues that I noticed while looking into this.
      * doc/lispref/files.texi (File Attributes):
      * lisp/files.el (file-attribute-size)
      (file-attribute-inode-number, file-attribute-device-number):
      * src/dired.c (Fdirectory_files_and_attributes)
      (Ffile_attributes):
      Mention which attributes must be integers, or nonnegative integers,
      as opposed to merely being numbers.  Remove no-longer-correct
      talk about representing large integers as conses of integers.
      * doc/lispref/files.texi (Magic File Names):
      * doc/misc/gnus.texi (Low-level interface to the spam-stat dictionary):
      * lisp/autorevert.el (auto-revert-find-file-function)
      (auto-revert-tail-mode, auto-revert-handler):
      * lisp/auth-source.el (auth-source-netrc-parse):
      * lisp/cedet/ede/files.el (ede--inode-for-dir):
      * lisp/cedet/semantic/db-file.el (object-write):
      * lisp/cedet/semantic/db-mode.el (semanticdb-kill-hook):
      * lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p)
      (semanticdb-synchronize):
      * lisp/cedet/srecode/table.el (srecode-mode-table-new):
      * lisp/desktop.el (desktop-save, desktop-read):
      * lisp/dired-aux.el (dired-file-set-difference)
      (dired-do-chxxx, dired-do-chmod, dired-copy-file-recursive)
      (dired-create-files):
      * lisp/dired.el (dired-directory-changed-p, dired-readin):
      * lisp/dos-w32.el (w32-direct-print-region-helper):
      * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads)
      (autoload-find-destination, update-directory-autoloads):
      * lisp/emacs-lisp/shadow.el (load-path-shadows-same-file-or-nonexistent):
      * lisp/epg.el (epg--start, epg-wait-for-completion):
      * lisp/eshell/em-ls.el (eshell-ls-filetype-p)
      (eshell-ls-applicable, eshell-ls-size-string)
      (eshell-ls-file, eshell-ls-dir, eshell-ls-files)
      (eshell-ls-entries):
      * lisp/eshell/em-pred.el (eshell-predicate-alist)
      (eshell-pred-file-type, eshell-pred-file-links)
      (eshell-pred-file-size):
      * lisp/eshell/em-unix.el (eshell-shuffle-files, eshell/cat)
      (eshell-du-sum-directory, eshell/du):
      * lisp/eshell/esh-util.el (eshell-read-passwd)
      (eshell-read-hosts):
      * lisp/files.el (remote-file-name-inhibit-cache)
      (find-file-noselect, insert-file-1, dir-locals-find-file)
      (dir-locals-read-from-dir, backup-buffer)
      (file-ownership-preserved-p, copy-directory)
      (read-file-modes):
      * lisp/find-lisp.el (find-lisp-format):
      * lisp/gnus/gnus-agent.el (gnus-agent-unfetch-articles)
      (gnus-agent-read-agentview, gnus-agent-expire-group-1)
      (gnus-agent-request-article, gnus-agent-regenerate-group)
      (gnus-agent-update-files-total-fetched-for)
      (gnus-agent-update-view-total-fetched-for):
      * lisp/gnus/gnus-cache.el (gnus-cache-read-active)
      (gnus-cache-update-file-total-fetched-for)
      (gnus-cache-update-overview-total-fetched-for):
      * lisp/gnus/gnus-cloud.el (gnus-cloud-file-new-p):
      * lisp/gnus/gnus-score.el (gnus-score-score-files):
      * lisp/gnus/gnus-start.el (gnus-save-newsrc-file)
      (gnus-master-read-slave-newsrc):
      * lisp/gnus/gnus-sum.el (gnus-summary-import-article):
      * lisp/gnus/gnus-util.el (gnus-file-newer-than)
      (gnus-cache-file-contents):
      * lisp/gnus/mail-source.el (mail-source-delete-old-incoming)
      (mail-source-callback, mail-source-movemail):
      * lisp/gnus/nneething.el (nneething-create-mapping)
      (nneething-make-head):
      * lisp/gnus/nnfolder.el (nnfolder-read-folder):
      * lisp/gnus/nnheader.el (nnheader-file-size)
      (nnheader-insert-nov-file):
      * lisp/gnus/nnmail.el (nnmail-activate):
      * lisp/gnus/nnmaildir.el (nnmaildir--group-maxnum)
      (nnmaildir--new-number, nnmaildir--update-nov)
      (nnmaildir--scan, nnmaildir-request-scan)
      (nnmaildir-request-update-info)
      (nnmaildir-request-expire-articles):
      * lisp/gnus/nnmh.el (nnmh-request-list-1)
      (nnmh-request-expire-articles, nnmh-update-gnus-unreads):
      * lisp/gnus/nnml.el (nnml-request-expire-articles):
      * lisp/gnus/spam-stat.el (spam-stat-save, spam-stat-load)
      (spam-stat-process-directory, spam-stat-test-directory):
      * lisp/ido.el (ido-directory-too-big-p)
      (ido-file-name-all-completions):
      * lisp/image-dired.el (image-dired-get-thumbnail-image)
      (image-dired-create-thumb-1):
      * lisp/info.el (info-insert-file-contents):
      * lisp/ls-lisp.el (ls-lisp-insert-directory)
      (ls-lisp-handle-switches, ls-lisp-classify-file)
      (ls-lisp-format):
      * lisp/mail/blessmail.el:
      * lisp/mail/feedmail.el (feedmail-default-date-generator)
      (feedmail-default-message-id-generator):
      * lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases)
      (mail-abbrevs-setup):
      * lisp/mail/mspools.el (mspools-size-folder):
      * lisp/mail/rmail.el (rmail-insert-inbox-text):
      * lisp/mail/sendmail.el (sendmail-sync-aliases):
      * lisp/mh-e/mh-alias.el (mh-alias-tstamp):
      * lisp/net/ange-ftp.el (ange-ftp-parse-netrc)
      (ange-ftp-write-region, ange-ftp-file-newer-than-file-p)
      (ange-ftp-cf1):
      * lisp/net/eudcb-mab.el (eudc-mab-query-internal):
      * lisp/net/eww.el (eww-read-bookmarks):
      * lisp/net/netrc.el (netrc-parse):
      * lisp/net/newst-backend.el (newsticker--image-get):
      * lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file):
      * lisp/obsolete/fast-lock.el (fast-lock-save-cache):
      * lisp/obsolete/vc-arch.el (vc-arch-state)
      (vc-arch-diff3-rej-p):
      * lisp/org/ob-eval.el (org-babel--shell-command-on-region):
      * lisp/org/org-attach.el (org-attach-commit):
      * lisp/org/org-macro.el (org-macro-initialize-templates):
      * lisp/org/org.el (org-babel-load-file)
      (org-file-newer-than-p):
      * lisp/org/ox-html.el (org-html-format-spec):
      * lisp/org/ox-publish.el (org-publish-find-date)
      (org-publish-cache-ctime-of-src):
      * lisp/pcmpl-gnu.el (pcomplete/tar):
      * lisp/pcmpl-rpm.el (pcmpl-rpm-packages):
      * lisp/play/cookie1.el (cookie-snarf):
      * lisp/progmodes/cmacexp.el (c-macro-expansion):
      * lisp/ps-bdf.el (bdf-file-mod-time):
      * lisp/server.el (server-ensure-safe-dir):
      * lisp/simple.el (shell-command-on-region):
      * lisp/speedbar.el (speedbar-item-info-file-helper)
      (speedbar-check-obj-this-line):
      * lisp/thumbs.el (thumbs-cleanup-thumbsdir):
      * lisp/time.el (display-time-mail-check-directory)
      (display-time-file-nonempty-p):
      * lisp/url/url-cache.el (url-is-cached):
      * lisp/url/url-file.el (url-file-asynch-callback):
      * lisp/vc/diff-mode.el (diff-delete-if-empty):
      * lisp/vc/pcvs-info.el (cvs-fileinfo-from-entries):
      * lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
      * lisp/vc/vc-cvs.el (vc-cvs-checkout-model)
      (vc-cvs-state-heuristic, vc-cvs-merge-news)
      (vc-cvs-retrieve-tag, vc-cvs-parse-status, vc-cvs-parse-entry):
      * lisp/vc/vc-hg.el (vc-hg--slurp-hgignore-1)
      (vc-hg--ignore-patterns-valid-p)
      (vc-hg--cached-dirstate-search, vc-hg-state-fast):
      * lisp/vc/vc-hooks.el (vc-after-save):
      * lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
      * lisp/vc/vc-svn.el (vc-svn-merge-news, vc-svn-parse-status):
      * lisp/vc/vc.el (vc-checkout, vc-checkin, vc-revert-file):
      * lisp/xdg.el (xdg-mime-apps):
      Prefer (file-attribute-size A) to (nth 7 A), and similarly
      for other file attributes accessors.
      * doc/lispref/files.texi (File Attributes):
      * doc/lispref/intro.texi (Version Info):
      * doc/lispref/os.texi (Idle Timers):
      * lisp/erc/erc.el (erc-string-to-emacs-time):
      * lisp/files.el (file-attribute-access-time)
      (file-attribute-modification-time)
      (file-attribute-status-change-time):
      * lisp/net/tramp-compat.el:
      (tramp-compat-file-attribute-modification-time)
      (tramp-compat-file-attribute-size):
      * src/buffer.c (syms_of_buffer):
      * src/editfns.c (Fget_internal_run_time):
      * src/fileio.c (Fvisited_file_modtime)
      (Fset_visited_file_modtime):
      * src/keyboard.c (Fcurrent_idle_time):
      * src/process.c (Fprocess_attributes):
      Defer implementation details about timestamp format to the
      section that talks about timestamp format, to make it easier
      to change the documentation later if timestamp formats are
      extended.
      * lisp/gnus/gnus-util.el (gnus-file-newer-than):
      * lisp/speedbar.el (speedbar-check-obj-this-line):
      * lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
      Prefer time-less-p to doing it by hand.
      * lisp/ls-lisp.el (ls-lisp-format): Inode numbers are no longer conses.
      * lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
      Use eql, not eq, to compare integers that might be bignums.
      * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
      Prefer float-time to doing time arithmetic by hand.
      662bee7d
  23. 02 Jul, 2018 1 commit
    • John Shahid's avatar
      Optionally add argument description in minor mode DOC (bug#10754) · ee3e4323
      John Shahid authored
      Add a paragraph to minor mode's docstring documenting the mode's ARG
      usage if the supplied docstring doesn't already contain the word "ARG".
      
      * easy-mmode.el (easy-mmode--arg-docstring): New const.
      (easy-mmode--arg-docstring): New function.
      (define-minor-mode): Use them.
      
      Remove argument documentation from all minor modes.
      ee3e4323
  24. 22 Feb, 2018 1 commit
  25. 22 Jan, 2018 1 commit
    • Michael Albinus's avatar
      Finish changes in autorevert from commit 530bb2dc · d0fd9809
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-buffers):
      Check `auto-revert-timer' being a timerp.
      
      * test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
      Adapt test in order to cover changed behavior of autorevert.
      d0fd9809
  26. 20 Jan, 2018 1 commit
    • Michael Albinus's avatar
      Use file notification in autorevert also for recreated files · 530bb2dc
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-mode)
      (global-auto-revert-mode, auto-revert-notify-add-watch)
      (auto-revert-notify-handler, auto-revert-handler): Do not use
      buffer local `auto-revert-use-notify' anymore.
      
      * test/lisp/autorevert-tests.el
      (auto-revert-test02-auto-revert-deleted-file): Adapt test in
      order to check, that file notification is reenabled when possible.
      530bb2dc
  27. 01 Jan, 2018 1 commit
  28. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      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.
      bc511a64
  29. 02 Jul, 2017 1 commit
    • Michael Albinus's avatar
      Fix Bug#27502 · c7e7eb32
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-find-file-function): New defun.
      (find-file-hook): Use it.  (Bug#27502)
      (auto-revert-remove-current-buffer): New defun.
      (auto-revert-mode, auto-revert-buffers): Use it.
      c7e7eb32
  30. 01 Jan, 2017 1 commit
  31. 11 Dec, 2016 1 commit
    • Michael Albinus's avatar
      Fix Bug#25162 · 467768f6
      Michael Albinus authored
      * doc/emacs/files.texi (Reverting): Document
      auto-revert-remote-files and auto-revert-verbose.
      
      * lisp/autorevert.el (auto-revert-verbose, auto-revert-mode)
      (auto-revert-tail-mode, global-auto-revert-mode): Fix docstring.
      467768f6
  32. 19 Apr, 2016 1 commit
    • Michael Albinus's avatar
      autorevert: Resume with polling if file is deleted · ed54b3ff
      Michael Albinus authored
      * lisp/autorevert.el: Use consistent wording in comments and
      docstrings.
      (auto-revert-mode): Add local function to `kill-buffer-hook'.
      (auto-revert-notify-handler): Improve handling of `stopped' event.
      
      * test/lisp/autorevert-tests.el
      (auto-revert-test02-auto-revert-deleted-file): New test.
      (auto-revert-test03-auto-revert-tail-mode)
      (auto-revert-test04-auto-revert-mode-dired): Rename them.
      ed54b3ff
  33. 18 Apr, 2016 1 commit
    • Michael Albinus's avatar
      Fix Bug#23276 · 5a0cbe51
      Michael Albinus authored
      * lisp/autorevert.el (auto-revert-handler): Ignore errors
      coming from `revert-buffer'.  (Bug#23276)
      5a0cbe51
  34. 08 Mar, 2016 1 commit
  35. 04 Mar, 2016 1 commit
    • Michael Albinus's avatar
      Fix Bug#22814 · 48496779
      Michael Albinus authored
      * lisp/autorevert.el (global-auto-revert-mode): Do not set
      `auto-revert-use-notify' to nil.
      
      * etc/NEWS: Mention this.
      
      * etc/PROBLEMS: Remove problem Bug#22814.
      
      * src/kqueue.c: Include <sys/resource.h>.
      (Fkqueue_add_watch): Limit the number of used file descriptors.
      (Bug#22814)
      
      * test/lisp/filenotify-tests.el (file-notify--test-remote-enabled)
      (file-notify-test00-availability, file-notify-test01-add-watch)
      (file-notify-test02-events, file-notify-test06-many-events):
      Use #' read syntax for functions.
      (file-notify-test05-dir-validity)
      (file-notify-test06-many-events): Simplify directory creation.
      (file-notify-test09-sufficient-ressources): New test.
      48496779
  36. 28 Feb, 2016 1 commit