1. 03 May, 2019 5 commits
    • 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.
      (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-test02-auto-revert-deleted-file): Adapt for remote files.
      Use `auto-revert-debug' for debug messages.
      (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.
    • Basil L. Contovounesios's avatar
      Fix Gnus inline attachment decoding (bug#35507) · 24a1d5a0
      Basil L. Contovounesios authored
      Proposed by Andy Moreton <andrewjmoreton@gmail.com>
      and Noam Postavsky <npostavs@gmail.com>.
      * lisp/gnus/mm-view.el (mm-display-inline-fontify): Always decode
      handle text, falling back on 'undecided' coding system.
    • Stefan Monnier's avatar
      * lisp/server.el: Cosmetic changes · b663c837
      Stefan Monnier authored
      Remove redundant :group args.
      (server-temp-file-regexp): Fix ^$ to  \`\'.
    • Eli Zaretskii's avatar
      Improve documentation of 'isearch-regexp-function' · d5497ec3
      Eli Zaretskii authored
      * lisp/isearch.el (isearch-regexp-function): Doc fix.
    • Michael Albinus's avatar
      ; Fix declaration in tramp-compat.el · 8b0cb7b2
      Michael Albinus authored
  2. 02 May, 2019 13 commits
    • Dmitry Gutov's avatar
    • Dmitry Gutov's avatar
      Allow project-find-regexp'ing inside an ignored dir · 1cd4a5e5
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-find-regexp): Don't pass
      project's ignores to project--files-in-directory.  The FILES glob
      should be enough, and we don't want to prohibit searching inside
      ignored directories this way (it can be counter-intuitive).
    • Dmitry Gutov's avatar
      (xref--mouse-2): Fix not to jump to the next line · f2b395c4
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref--mouse-2): Fix not to jump to the
      next line.
    • Dmitry Gutov's avatar
      Fix an "empty identifier" problem · 5ff4bfae
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref--read-identifier): Abort on empty
      input if there is no default
    • Alan Mackenzie's avatar
      Fix fontification of first item in CC Mode macro without parentheses · d9f62fce
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): Handle the new
      matching possibility (of a #define construct) in the new
      (c-find-decl-spots): Allow the initial search for an in-macro starting point
      settle on the # of #define, to facilitate the regexp matching in
      * lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): New lang
      (c-literal-start-regexp): Correct what was always supposed to be a "generic
      string" regexp element.
      (c-decl-prefix-or-start-re): Enhance also to match "#define <identifier>".
      (c-dposr-cpp-macro-depth): New lang variable and lang constant.
    • Stefan Monnier's avatar
      * lisp/mail/footnote.el: Add TEXT and POINTERS together · 17a72298
      Stefan Monnier authored
      Rather than adding POINTERS and TEXT separately to footnote--markers-alist,
      add them together, so we don't need footnote--first-text-marker because
      the TEXT part is never nil.
      (footnote--insert-numbered-footnote): Return marker.
      (footnote--insert-text-marker, footnote--insert-pointer-marker):
      Delete functions.
      (footnote--insert-markers): New function to replace them.
      (footnote--insert-footnote): Adjust accordingly.
      Simplify pointless `unless`.
      (footnote--first-text-marker): Remove.  Replace all calls by
      (cadr (car footnote--markers-alist)) or just footnote--markers-alist.
    • Alan Mackenzie's avatar
      CC Mode: Fix multiline block comments in macros. · 39acaff5
      Alan Mackenzie authored
      In particulr, handle multiline block comments whose newlines are not escaped.
      There is an example of this in #define EXTRA_CONTEXT_FIELDS in editfns.c.
      * lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Enclose
      the loops scanning escaped newlines with outer loops which check
      heuristically for, respectively, a block comment ender and a block comment
      starter on the lines we end up on.  (A rigorous syntactic check would be too
      slow, here.)
      * lisp/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re)
      (c-last-open-c-comment-start-on-line-re): New language constants/variables.
    • Stefan Monnier's avatar
      * lisp/mail/footnote.el: Tweak markers convention · 3fa9c9f7
      Stefan Monnier authored
      Instead of using markers that are sometimes before and sometimes after
      the [...] and using `insert-before-markers` to make sure those that are
      are before stay before, always place them before, and make them
      "move after"so they stay with their [...] without the need for
      (footnote--current-regexp): Add arg to match previous style.
      Include the start/end "tags" in the regexp.  Adjust all callers.
      (footnote--markers-alist): Change position of POINTERS.
      (footnote--refresh-footnotes, footnote--renumber)
      (footnote--make-hole, footnote-delete-footnote)
      (footnote-back-to-message): Adjust accordingly, mostly by using
      `looking-at` instead of `looking-back`.
      (footnote--make-hole): Always return footnote nb to use.
      (footnote-add-footnote): Simplify call accordingly.
      * test/lisp/mail/footnote-tests.el: New file.
    • Sam Steingold's avatar
    • Sam Steingold's avatar
      tetris-null-map: bind "q" to `quit-window` · c555d10d
      Sam Steingold authored
    • Mattias Engdegård's avatar
      Small code clean-up of file-notify-add-watch · e13b8c0e
      Mattias Engdegård authored
      * lisp/filenotify.el (file-notify-add-watch):
      Clearly separate backend-specific code from the rest, and simplify.
      (file-notify--add-watch-inotify, file-notify--add-watch-kqueue)
      (file-notify--add-watch-w32notify, file-notify--add-watch-gfilenotify):
      New functions.
    • Stefan Monnier's avatar
      * lisp/mail/footnote.el: Use dolist and hoist regexps out of loops · 0efaae78
      Stefan Monnier authored
      (footnote--refresh-footnotes): Use pcase-dolist; compute regexp once
      outside of the loops.  Use less confusing `literal` arg to `replace-match`
      and specify `fixedcase` since footnote--index-to-string already chose
      the proper case for us.
      (footnote--renumber): Use dolist; compute regexp once
      outside of the loops; shortcircuit when number is unchanged.
      (footnote--text-under-cursor): Rewrite.
      (footnote--make-hole): Use dolist.
      (footnote-add-footnote): CSE.
      (footnote-delete-footnote): Use dolist; compute regexp once
      outside of the loop.
      (footnote-delete-footnote): Don't renumber if there's no footnote left.
      (footnote-renumber-footnotes): Use dolist.
    • Michael Albinus's avatar
      Fix tramp-compat-file-name-quoted-p · cd3a7f35
      Michael Albinus authored
      * lisp/net/tramp-compat.el (tramp-compat-file-local-name)
      (tramp-compat-file-name-quoted-p): Declare them.
      (top): Do not use `eval-and-compile'.
      (tramp-compat-file-name-quoted-p): Check also func-arity of
  3. 01 May, 2019 6 commits
    • Stefan Monnier's avatar
      * lisp/mail/footnote.el: Consolidate the two marker-alists · 4299e5ef
      Stefan Monnier authored
      Consolidate footnote-text-marker-alist and footnote-pointer-marker-alist
      into a single footnote--markers-alist.
      (footnote--markers-alist): New var.
      (footnote-text-marker-alist, footnote-pointer-marker-alist): Delete vars.
      (footnote--refresh-footnotes, footnote--text-under-cursor)
      (footnote--calc-fn-alignment-column, footnote-add-footnote)
      (footnote-goto-footnote, footnote-back-to-message): Adjust accordingly.
      (footnote--make-hole, footnote-delete-footnote)
      (footnote-renumber-footnotes): Simplify accordingly.
      (footnote-cycle-style): Indicate style name in echo area.
      (footnote--renumber): Take a single `alist-elem` arg instead of
      `pointer-alist` and `text-alist`.
      (footnote--insert-text-marker, footnote--insert-pointer-marker):
      Add to footnote--markers-alist instead.
      (footnote--first-text-marker): New function.
      (footnote--get-area-point-min): Use it.
      footnote--goto-first): New function.
      (footnote--insert-footnote): Use it.
      (footnote-style-number): Use defvar-local.
    • Stefan Monnier's avatar
      * lisp/mail/footnote.el: Minor simplifications · c9b820dd
      Stefan Monnier authored
      Remove redundant :group args.
      (footnote-mode-hook): Let define-minor-mode define it.
      (footnote--style-p): Delete function.
      (footnote--index-to-string): Inline it instead, and simplify.
      (footnote-cycle-style): Use a pointer into the alist as the "index"
      instead of a number.
      (footnote-set-style): Use footnote-style-alist as the completion table.
      Prefer `assq` over `footnote--assoc-index`.
      (footnote--assoc-index): Delete function.
      (footnote--renumber): Remove first (unused) argument; Adjust all callers.
      (footnote--sort): Use car-less-than-car.
    • Lars Ingebrigtsen's avatar
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/edebug.el: Better handle instrumentation of `end-of-defun` · 9e8e3975
      Stefan Monnier authored
      Remove redundant :group args.
      (edebug-read-top-level-form): Let-bind edebug-active.
      (edebug-active): Move before this new first use.
    • Stefan Monnier's avatar
    • Glenn Morris's avatar
      ; Auto-commit of loaddefs files. · 7124fec0
      Glenn Morris authored
  4. 30 Apr, 2019 6 commits
    • Basil L. Contovounesios's avatar
      Minor region-noncontiguous-p simplification · 7dafbe3a
      Basil L. Contovounesios authored
      * lisp/simple.el (region-noncontiguous-p): Don't needlessly traverse
    • Stefan Monnier's avatar
      * lisp/progmodes/cc-engine.el: Silence minor compiler warnings · 910d1707
      Stefan Monnier authored
      (c-restricted-<>-arglists, c-parse-and-markup-<>-arglists):
      Move declaration before first use.
      (c-after-change-unmark-raw-strings): Remove unused var `found-end`.
    • Stefan Monnier's avatar
      * lisp/progmodes/cc-fonts.el: Silence some compiler warnings · 35ef33dd
      Stefan Monnier authored
      (c-font-lock-declarators): Mark `id_end` and `not-top` as unused.
    • Mattias Engdegård's avatar
    • Alan Mackenzie's avatar
      CC Mode: in certain font lock loops, check point is not beyond limit. · 28853721
      Alan Mackenzie authored
      * /lisp/progmodes/cc-fonts.el (c-font-lock-enum-body)
      (autodoc-font-lock-line-markup): As part of the `while' condition, check that
      the previous iteration of the loop hasn't moved point past `limit', thus
      obviating "wrong side of point" errors in re-search-forward, etc.
    • 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.
      Use auto-revert--polled-buffers and auto-revert--need-polling-p.
      (auto-revert-buffers-counter, auto-revert-buffers-counter-lockedout):
      * 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.
  5. 29 Apr, 2019 2 commits
  6. 28 Apr, 2019 2 commits
  7. 27 Apr, 2019 1 commit
  8. 26 Apr, 2019 2 commits
    • Michael Albinus's avatar
      Handle quoted file names in tramp-archive.el · cc70501a
      Michael Albinus authored
      * lisp/net/tramp-archive.el (tramp-archive-file-name-p):
      Suppress quoted file names.
      (tramp-archive-file-name-handler): Handle quoted file names.
      * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p):
      Add optional TOP argument.
    • Alan Mackenzie's avatar
      Fix the formatting of '\' (including apostrophes) in CC Mode. · a0bb2588
      Alan Mackenzie authored
      In particular, the second apostrophe must also get font-lock-warning-face.
      * lisp/progmodes/cc-mode.el (c-parse-quotes-before-change)
      (c-parse-quotes-after-change): Add cond arms to recognize and handle the
      anomalous construct '\'.  Correct the handling of c-new-BEG in
  9. 25 Apr, 2019 3 commits