1. 02 May, 2019 1 commit
    • 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
      `file-name-quoted-p'.
      cd3a7f35
  2. 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.
      4299e5ef
    • 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.
      c9b820dd
    • Lars Ingebrigtsen's avatar
      d4fa998c
    • 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.
      9e8e3975
    • Stefan Monnier's avatar
    • Glenn Morris's avatar
      ; Auto-commit of loaddefs files. · 7124fec0
      Glenn Morris authored
      7124fec0
  3. 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
      region-bounds.
      7dafbe3a
    • 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`.
      910d1707
    • 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.
      35ef33dd
    • 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.
      28853721
    • 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
  4. 29 Apr, 2019 2 commits
  5. 28 Apr, 2019 2 commits
  6. 27 Apr, 2019 1 commit
  7. 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.
      cc70501a
    • 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
      c-parse-quotes-before-change.
      a0bb2588
  8. 25 Apr, 2019 7 commits
    • Stephen Leake's avatar
      Fix Bug#33618; define search path variables for grep, byte-compile · 1486eadf
      Stephen Leake authored
      * etc/NEWS: Mention new variables.
      
      * lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-search-path): New.
      
      * lisp/progmodes/grep.el (grep-search-path): New.
      1486eadf
    • Stefan Monnier's avatar
      ca99c00f
    • Stefan Monnier's avatar
      Use lexical-binding by default for M-:, --eval, and *scratch* · e08e0880
      Stefan Monnier authored
      * lisp/startup.el (command-line): Default to lexical-binding in *scratch*.
      (normal-no-mouse-startup-screen, command-line-1):
      Use startup--get-buffer-create-scratch.
      (command-line-1):
      * lisp/simple.el (eval-expression):
      * lisp/server.el (server-eval-and-print): Use lexical-binding to
      evaluate the expression.
      (server-execute): Use startup--get-buffer-create-scratch.
      * lisp/ielm.el (inferior-emacs-lisp-mode): Default to lexical-binding.
      e08e0880
    • Alan Mackenzie's avatar
      Restore fontification of delimiters of multiline CC Mode strings. · 0c2d921a
      Alan Mackenzie authored
      E.g., on typing the closing delimiter of a string continued onto a second
      line, the opening delimiter retained its font-lock-warning-face.
      
      * lisp/progmodes/cc-defs.el (c-c++-raw-string-opener-re)
      (c-c++-raw-string-opener-1-re): New constants.
      (c-sub-at-c++-raw-string-opener, c-at-c++-raw-string-opener): New macros.
      
      * lisp/progmodes/cc-engine.el (c-raw-string-pos)
      (c-depropertize-raw-strings-in-region, c-after-change-unmark-raw-strings):
      Replace uses of open-coded raw string regexps by the new constants and macros
      in cc-defs.el.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Ditto
      
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Set
      c-new-BEG to the beginning of the string when we encounter its closing ".
      When not in a raw string, but in a string, clear syntax-table properties from
      its delimiters and set c-new-BEG/END to its limits.
      (c-after-change-mark-abnormal-strings): When applying syntax-table properties
      to string delimiters, also set c-new-BEG/END to ensure subsequent
      fontification.
      0c2d921a
    • Stephen Berman's avatar
      Make wdired-mode ignore ls file indicators · 6d8e0fc5
      Stephen Berman authored
      * lisp/wdired.el (wdired--restore-dired-filename-prop): When
      dired-listing-switches includes "F" or "classify", don't treat
      appended indicator characters as part of the file name (bug#34915).
      
      * test/lisp/wdired-tests.el (wdired-test-bug34915): New test.
      6d8e0fc5
    • Alan Mackenzie's avatar
      Fix some corner cases in the recognition of C++ raw strings. · efb8921a
      Alan Mackenzie authored
      These are where changing the identifier in a raw string delimiter causes
      different delimiters to match eachother.
      
      * lisp/progmodes/cc-engine.el (c-raw-string-end-delim-disrupted): New
      variable.
      (c-before-change-check-raw-strings): Use new variable.
      (c-after-change-unmark-raw-strings): When typing into an opening delimiter or
      altering its close delimiter causes the opening delimiter to match a later
      closing delimiter, clear all syntax-table char properties from the opening
      delimiter onwards, and set c-new-END to point max.  Also, when changing a
      closing delimiter, check whether its new value matches a previously open
      opening delimiter earlier in the buffer, and amend the syntax-table text
      properties appropriately.
      efb8921a
    • Michael R. Mauger's avatar
      * lisp/progmodes/sql.el · a1386fa6
      Michael R. Mauger authored
      (sql-is-sqli-buffer-p): New function.
      (sql-generate-unique-sqli-buffer-name): Refactor and use it.
      (sql-product-interactive): Simplify name logic.
      * test/lisp/progmodes/sql-tests.el
      (sql-tests-placeholder-filter-harness): New macro.
      (sql-tests-placeholder-filter-simple)
      (sql-tests-placeholder-filter-ampersand)
      (sql-tests-placeholder-filter-period): Refactored tests and use macro.
      (sql-tests-buffer-naming-harness): New macro.
      (sql-tests-buffer-naming-default)
      (sql-tests-buffer-naming-multiple)
      (sql-tests-buffer-naming-explicit)
      (sql-tests-buffer-naming-universal-argument)
      (sql-tests-buffer-naming-existing): New tests.
      a1386fa6
  9. 24 Apr, 2019 5 commits
  10. 23 Apr, 2019 3 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/timer-list.el: Fix header-line alignment · 1828e9a9
      Stefan Monnier authored
      Enable lexical-binding.
      (cl-print-compiled, cl-print-compiled-button): Declare.
      (timer-list-mode): Add spacing to align the header.
      1828e9a9
    • 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
    • Alan Mackenzie's avatar
      Optimize for typing characters into long C++ raw strings. · 0d5caa9a
      Alan Mackenzie authored
      * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
      (c-font-lock-objc-methods) (c-font-lock-declarations, c-font-lock-enum-tail)
      (c-font-lock-cut-off-declarators, c-font-lock-enclosing-decls): If the chunk
      been fontified consists entirely of comments and strings, don't attempt to
      perform the function's action.
      
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Don't
      expand (c-new-BEG c-new-END) unnecessarily to the entire raw string being
      fontified.
      (c-fl-decl-start, c-fl-decl-end): When in a (raw or otherwise) string, don't
      return a position outside of the string (which used to cause unneeded
      fontification).
      0d5caa9a
  11. 22 Apr, 2019 5 commits