1. 05 Jun, 2019 1 commit
    • Alan Third's avatar
      Add native image rotation and cropping · 610fb73a
      Alan Third authored
      * lisp/image.el (image--get-imagemagick-and-warn): Only fallback to
      ImageMagick if native transforms aren't available.
      * src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): New
      macros for matrix manipulation.
      (HAVE_NATIVE_SCALING, HAVE_NATIVE_TRANSFORMS): Rename and change all
      relevant locations.
      * src/image.c (x_set_image_rotation):
      (x_set_transform): New functions.
      (x_set_image_size): Use transform matrix for resizing under X and NS.
      (x_set_image_crop): New function.
      (lookup_image): Use the new transform functions.
      (Fimage_scaling_p, Fimage_transforms_p): Rename and update all
      callers.
      * src/nsimage.m (ns_load_image): Remove rotation code.
      (ns_image_set_transform): New function.
      ([EmacsImage dealloc]): Release the saved transform.
      ([EmacsImage rotate:]): Remove unneeded method.
      ([EmacsImage setTransform:]): New method.
      * src/nsterm.h (EmacsImage): Add transform property and update method
      definitions.
      * src/nsterm.m (ns_dumpglyphs_image): Use the transform to draw the
      image correctly.
      * src/xterm.c (x_composite_image): Use PictOpSrc as we don't care
      about alpha values here.
      * doc/lispref/display.texi (Image Descriptors): Add :rotation.
      (ImageMagick Images): Remove :rotation.
      610fb73a
  2. 04 Jun, 2019 1 commit
    • Noam Postavsky's avatar
      Let untarring (and hence package installation) go faster (Bug#35909) · f81b812d
      Noam Postavsky authored
      * lisp/subr.el (progress-reporter-update)
      (progress-reporter-force-update, progress-reporter-do-update): Accept
      new optional argument, SUFFIX.
      * doc/lispref/display.texi (Progress): Document it.
      * etc/NEWS: Announce it.
      * lisp/tar-mode.el (tar-untar-buffer): Use a progress reporter instead
      of calling message.  Suppress message from write-region.  Let-bind
      write-region-inhibit-fsync to t.
      f81b812d
  3. 03 Jun, 2019 1 commit
  4. 02 Jun, 2019 1 commit
  5. 30 May, 2019 2 commits
  6. 29 May, 2019 1 commit
    • Stefan Monnier's avatar
      * lisp/subr.el (add-hook): Turn `append` into `depth` (bug#35508) · fe0cb43f
      Stefan Monnier authored
      Make it possible to control the relative ordering of functions on hooks by
      specifying `depth` in the same was as was possible with `add-function`.
      
      * lisp/electric.el (electric--sort-post-self-insertion-hook):
      Delete function.
      (electric-indent-mode, electric-layout-mode, electric-quote-mode):
      * lisp/elec-pair.el (electric-pair-mode): Use new `depth` arg instead of
      electric--sort-post-self-insertion-hook.
      
      * lisp/emacs-lisp/syntax.el (syntax-propertize, syntax-ppss):
      Use new `depth` arg to make sure noone accidentally gets added
      after syntax-ppss-flush-cache.
      
      * doc/lispref/modes.texi (Setting Hooks): Document new `depth` arg.
      
      * test/lisp/subr-tests.el (subr-tests-add-hook-depth): New test.
      fe0cb43f
  7. 25 May, 2019 1 commit
  8. 24 May, 2019 2 commits
  9. 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
  10. 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
  11. 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
  12. 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
  13. 16 May, 2019 2 commits
  14. 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
  15. 14 May, 2019 3 commits
  16. 12 May, 2019 1 commit
  17. 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
  18. 06 May, 2019 1 commit
  19. 05 May, 2019 6 commits
  20. 01 May, 2019 1 commit
  21. 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
  22. 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
  23. 27 Apr, 2019 1 commit
  24. 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
  25. 24 Apr, 2019 1 commit
    • 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