1. 25 May, 2019 1 commit
  2. 24 May, 2019 2 commits
  3. 21 May, 2019 1 commit
    • Noam Postavsky's avatar
      Add option to disable help completion autoloading (Bug#28607) · 400907b3
      Noam Postavsky authored
      * lisp/help-fns.el (help-enable-completion-auto-load): New option.
      (help--symbol-completion-table): Consult it.
      * doc/emacs/building.texi (Lisp Libraries): Document it.
      * etc/NEWS: Announce it.
      * doc/lispref/loading.texi (Autoload by Prefix): New section.
      (Autoload): Reference it.
      400907b3
  4. 20 May, 2019 4 commits
    • Mattias Engdegård's avatar
      Allow zero-argument rx `or' and `seq' forms · afdc20d7
      Mattias Engdegård authored
      Make the rx `or' and `seq' forms accept zero arguments to produce a
      never-matching regexp and an empty string, respectively.
      
      * lisp/emacs-lisp/rx.el: Require cl-extra.
      (rx-constituents, rx-or): Permit zero args.
      (rx): Amend doc string for `or' and `seq'.
      * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change.
      * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
      afdc20d7
    • Mattias Engdegård's avatar
      Revert "Allow zero-argument rx `or' and `seq' forms" · c2cda3ff
      Mattias Engdegård authored
      This reverts commit b552fc05.
      It caused a bootstrapping failure which I have yet to resolve - sorry.
      c2cda3ff
    • Mattias Engdegård's avatar
      Allow zero-argument rx `or' and `seq' forms · b552fc05
      Mattias Engdegård authored
      Make the rx `or' and `seq' forms accept zero arguments to produce a
      never-matching regexp and an empty string, respectively.
      
      * lisp/emacs-lisp/rx.el (rx-constituents, rx-or): Permit zero args.
      (rx): Amend doc string for `or' and `seq'.
      * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change.
      * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
      b552fc05
    • 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
  5. 19 May, 2019 1 commit
    • Martin Rudalics's avatar
      New buffer display action function 'display-buffer-in-direction' · 8783becb
      Martin Rudalics authored
      * lisp/window.el (windows-sharing-edge)
      (window--try-to-split-window-in-direction)
      (display-buffer-in-direction): New functions.
      * doc/lispref/windows.texi (Buffer Display Action Functions):
      Describe new action function 'display-buffer-in-direction'.
      (Buffer Display Action Alists): Describe new entry 'direction'.
      Amend description of 'window' entry.
      * etc/NEWS: Mention 'display-buffer-in-direction' and 'direction'
      and 'window' action alist entries.
      8783becb
  6. 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
  7. 16 May, 2019 2 commits
  8. 15 May, 2019 1 commit
    • Mattias Engdegård's avatar
      Add standard unmatchable regexp · 26f735ff
      Mattias Engdegård authored
      Add `regexp-unmatchable' as a standard unmatchable regexp, defined as
      "\\`a\\`".  Use it where such a regexp is needed, replacing slower
      expressions in several places.
      From a suggestion by Philippe Schnoebelen.
      
      * lisp/subr.el (regexp-unmatchable): New defconst.
      * etc/NEWS (Lisp Changes): Mention `regexp-unmatchable'.
      * doc/lispref/searching.texi (Regexp Functions): Document it.
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt)
      * lisp/progmodes/cc-defs.el (cc-conditional-require-after-load)
      (c-make-keywords-re)
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
      (c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
      (c-looking-at-decl-block)
      * lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
      (c-doc-bright-comment-start-re)
      * lisp/progmodes/cc-langs.el (c-populate-syntax-table)
      (c-assignment-op-regexp)
      (c-block-comment-ender-regexp, c-font-lock-comment-end-skip)
      (c-block-comment-start-regexp, c-line-comment-start-regexp)
      (c-doc-comment-start-regexp, c-decl-start-colon-kwd-re)
      (c-type-decl-prefix-key, c-type-decl-operator-prefix-key)
      (c-pre-id-bracelist-key, c-enum-clause-introduction-re)
      (c-nonlabel-token-2-key)
      * lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end)
      * lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
      (c-noise-macro-name-re, c-make-noise-macro-regexps)
      * lisp/progmodes/octave.el (octave-help-mode)
      * lisp/vc/vc-bzr.el (vc-bzr-log-view-mode, vc-bzr-revision-completion-table)
      * lisp/vc/vc-git.el (vc-git-log-view-mode)
      * lisp/vc/vc-hg.el (vc-hg-log-view-mode)
      * lisp/vc/vc-mtn.el (vc-mtn-log-view-mode):
      Use `regexp-unmatchable'.
      * lisp/textmodes/ispell.el (ispell-non-empty-string):
      Use `regexp-unmatchable', fixing a broken never-match regexp.
      26f735ff
  9. 14 May, 2019 3 commits
  10. 12 May, 2019 1 commit
  11. 07 May, 2019 2 commits
    • Juri Linkov's avatar
      * lisp/progmodes/flymake.el: Obsolete variable flymake-start-on-newline · 4cb64ac3
      Juri Linkov authored
      (flymake-start-syntax-check-on-newline): Mark it obsolete.
      (flymake-after-change-function): Remove obsolete variable
      flymake-start-syntax-check-on-newline (temporarily renamed to
      flymake-start-on-newline).  (Bug#34294)
      
      * doc/misc/flymake.texi: Remove obsolete variable.
      4cb64ac3
    • Basil L. Contovounesios's avatar
      Clarify what constitutes an event (bug#35238) · c972da90
      Basil L. Contovounesios authored
      * doc/lispref/commands.texi (Input Events): Specify that events are
      non-nil and remove vestiges of bug#10190.
      * doc/lispref/os.texi (Recording Input): Document optional argument
      of recent-keys.
      * lisp/subr.el (eventp): Check that the car of conses is non-nil.
      * etc/NEWS: Announce it as an incompatible change.
      * src/keyboard.c (Frecent_keys): Clarify that returned "events" are
      not real events.
      c972da90
  12. 06 May, 2019 1 commit
  13. 05 May, 2019 6 commits
  14. 01 May, 2019 1 commit
  15. 30 Apr, 2019 1 commit
    • 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
  16. 28 Apr, 2019 1 commit
    • Philipp Stephani's avatar
      Export major version of latest Emacs supported by emacs-module.h. · 4d97e1a9
      Philipp Stephani authored
      This is useful if module authors want to support multiple versions of
      emacs-module.h.
      
      * configure.ac (emacs_major_version): Define substitution.
      
      * src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro.
      
      * doc/lispref/internals.texi (Module Initialization): Document
      EMACS_MAJOR_VERSION preprocessor macro.
      
      * test/data/emacs-module/mod-test.c (emacs_module_init): Verify
      behavior of EMACS_MAJOR_VERSION.
      4d97e1a9
  17. 27 Apr, 2019 1 commit
  18. 25 Apr, 2019 2 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
      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
  19. 24 Apr, 2019 2 commits
    • Philipp Stephani's avatar
      Add module functions to convert from and to big integers. · e290a7d1
      Philipp Stephani authored
      * src/module-env-27.h: Add new module functions to convert big
      integers.
      
      * src/emacs-module.h.in (emacs_mpz): Define if GMP is available.
      
      * src/emacs-module.c (module_extract_big_integer)
      (module_make_big_integer): New functions.
      (initialize_environment): Use them.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_double): New test
      function.
      (emacs_module_init): Define it.
      
      * test/src/emacs-module-tests.el (mod-test-double): New unit test.
      
      * doc/lispref/internals.texi (Module Values): Document new functions.
      e290a7d1
    • Philipp Stephani's avatar
      Add conversions to and from struct timespec to module interface. · bffceab6
      Philipp Stephani authored
      Time values are a fundamental data type, and such conversions are hard
      to implement within modules because of the various forms of time
      values in Emacs Lisp.  Adding dedicated conversion functions can
      significantly simplify module code dealing with times.
      
      This approach uses nanosecond precision.  While Emacs in theory has
      support for higher-precision time values, in practice most languages
      and standards, such as POSIX, C, Java, and Go, have settled on
      nanosecond-precision integers to represent time.
      
      * src/emacs-module.h.in: Add header for struct timespec.
      
      * src/module-env-27.h: Add module functions for time conversion.
      
      * src/emacs-module.c (module_extract_time, module_make_time): New
      functions.
      (initialize_environment): Use them.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New
      test function.
      (emacs_module_init): Define it.
      
      * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid)
      (mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New
      unit tests.
      
      * doc/lispref/internals.texi (Module Values): Document time
      conversion functions.
      bffceab6
  20. 22 Apr, 2019 4 commits
    • Eli Zaretskii's avatar
      4ec02445
    • Paul Eggert's avatar
      Mention AddressSanitizer etc. in etc/DEBUG · b20d8a93
      Paul Eggert authored
      * etc/DEBUG: Modernize for AddressSanitizer etc.
      * etc/NEWS: Defer to etc/DEBUG for this.
      b20d8a93
    • Paul Eggert's avatar
      Remove --enable-checking=xmallocoverrun · 1ea048f6
      Paul Eggert authored
      It doesn’t work anymore, and these days ‘gcc -fsanitize=address’
      does a better job anyway.
      * configure.ac: Remove the option.
      * configure.ac (ac_xmalloc_overrun, XMALLOC_OVERRUN_CHECK):
      * src/alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD)
      (XMALLOC_OVERRUN_CHECK_SIZE, XMALLOC_OVERRUN_SIZE_SIZE)
      (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer)
      (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
      (overrun_check_realloc, overrun_check_free):
      Remove.  All uses removed.
      * etc/NEWS: Mention this.
      1ea048f6
    • Paul Eggert's avatar
      Remove --enablechecking=conslist configure option · 72067661
      Paul Eggert authored
      * configure.ac: Remove the option.
      * configure.ac (ac_gc_check_cons_list, GC_CHECK_CONS_LIST):
      * src/alloc.c (check_cons_list) [GC_CHECK_CONS_LIST]:
      * src/lisp.h (lisp_h_check_cons_list, check_cons_list):
      Remove.  All uses removed.
      * etc/NEWS: Mention this.
      72067661
  21. 20 Apr, 2019 2 commits