1. 11 Jun, 2019 1 commit
  2. 09 Jun, 2019 2 commits
    • Stefan Kangas's avatar
      Make bookmark-old-default-file variable obsolete · abe18f59
      Stefan Kangas authored
      * lisp/bookmark.el (bookmark-old-default-file):
      Redefine as obsolete variable alias for 'bookmark-default-file'.
      (bookmark-maybe-load-default-file): Don't try to rename file
      'bookmark-old-default-file' (~/.emacs-bkmrks) to new name (Bug#35940).
    • Stefan Kangas's avatar
      Make `bookmark-file' variable obsolete · 9816aba5
      Stefan Kangas authored
      * lisp/bookmark.el (bookmark-file): Redefine as obsolete variable
      alias for `bookmark-default-file'.  (Bug#35917)
  3. 08 Jun, 2019 1 commit
  4. 07 Jun, 2019 1 commit
    • Eli Zaretskii's avatar
      Support text shaping with HarfBuzz · dec52501
      Eli Zaretskii authored
      The code to support HarfBuzz was written by these individuals:
        Khaled Hosny <dr.khaled.hosny@gmail.com>
        YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
        Eli Zaretskii <eliz@gnu.org>
      * src/xftfont.c (xftfont_list): Call ftfont_list2.
      (xftfont_match): Call ftfont_match2.
      (xftfont_open) [HAVE_HARFBUZZ]: Set the font driver to
      xfthbfont_driver as required.  Reset xftfont_info->hb_font to
      (xftfont_close) [HAVE_HARFBUZZ]: Dispose of the hb_font object.
      (xftfont_shape): Accept an additional argument DIRECTION and
      pass it to ftfont_shape.
      (xfthbfont_list, xfthbfont_match, xfthbfont_begin_hb_font)
      (xfthbfont_end_hb_font) [HAVE_HARFBUZZ]: New functions.
      (syms_of_xftfont): New DEFSYM 'xfthb'.
      (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize
      * src/xfns.c (Fx_create_frame, x_create_tip_frame)
      [HAVE_HARFBUZZ]: Register the HarfBuzz font driver.
      * src/w32uniscribe.c (bswap_32) [HAVE_HARFBUZZ]: Define to use
      the builtin for GCC 4.3.9 and newer; else use byteswap.h from
      (struct uniscribe_font_info): New member 'scale'.  The member
      'cache' is now used both by Uniscribe and HarfBuzz backends.
      (uniscribe_open): Set the font backend as required by the font
      entity's font_type field.
      (uniscribe_close) [HAVE_HARFBUZZ]: Dispose of the hb_font
      (uniscribe_shape): Accept an additional argument DIRECTION.
      (w32hb_list, w32hb_match, free_cb, w32hb_get_font_table)
      (w32hb_get_font, w32hb_encode_char, w32hb_begin_font)
      (w32hb_get_variation_glyphs, load_harfbuzz_funcs)
      [HAVE_HARFBUZZ]: New functions.
      (syms_of_w32uniscribe_for_pdumper): Initialize
      harfbuzz_font_driver if loading the requisite functions from
      the HarfBuzz DLL succeeded.
      * src/w32font.c (syms_of_w32font): New DEFSYM 'harfbuzz'.
      * src/w32fns.c (Fx_create_frame, w32_create_tip_frame):
      Determine whether we should register the HarfBuzz backend, or
      Uniscribe backend, or both for the new frame.
      * src/w32common.h (hbfont_init_w32_funcs) [HAVE_HARFBUZZ]: Add
      * src/macfont.m (lgstring_direction): New enumeration.
      (mac_font_shape_1, mac_screen_font_shape, macfont_shape):
      Accept an additional argument DIRECTION; all callers changed.
      * src/lisp.h (get_unicode_property): Add prototype.
      * src/hbfont.c: New file.
      * src/ftxfont.c (ftxfont_list): Call ftfont_list2.
      (ftxfont_match): Call ftfont_match2.
      * src/ftfont.h [HAVE_HARFBUZZ]: Include hb.h and hb-ft.h.
      (struct font_info): New member hb_font.
      * src/ftfont.c (ftfont_list2, ftfont_list_family): New functions.
      (ftfont_open) [HAVE_HARFBUZZ]: Reset ftfont_info->hb_font to
      NULL.  Set the font backend to fthbfont_driver when required.
      (ftfont_close) [HAVE_HARFBUZZ]: Dispose of ftfont_info->hb_font.
      (ftfont_glyph_metrics): New function.
      (ftfont_text_extents): Call ftfont_glyph_metrics instead of
      (ftfont_shape): Accept an additional argument DIRECTION.
      (ftfont_variation_glyphs) [!HAVE_OTF_GET_VARIATION_GLYPHS]:
      Support for variation glyphs without FLT.
      (fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: New function.
      (syms_of_ftfont): New DEFSYM freetypehb.
      (syms_of_ftfont_for_pdumper): Initialize fthbfont_driver.
      * src/ftcrfont.c (ftcrfont_list): Call ftfont_list2.
      (ftcrfont_match): Call ftfont_match2.
      (ftcrfont_open) [HAVE_HARFBUZZ]: Set the font backend to
      ftcrhbfont_driver as required.  Reset ftcrfont_info->hb_font
      to NULL.
      (ftcrfont_close) [HAVE_HARFBUZZ]: Discard of
      (ftcrfont_shape): Pass DIRECTION to ftfont_shape.
      (ftcrhbfont_list, ftcrhbfont_match)
      (ftcrhbfont_begin_hb_font, ftcrhbfont_end_hb_font)
      [HAVE_HARFBUZZ]: New functions.
      (syms_of_ftcrfont): New DEFSYM ftcrhb.
      (syms_of_ftcrfont_for_pdumper): Initialize ftcrhbfont_driver.
      * src/font.h [HAVE_HARFBUZZ]: Include hb.h.
      (struct font_driver): Update comments and function signatures
      to reflect the new argument DIRECTION accepted by the 'shape'
      method.  New methods 'begin_hb_font' and 'end_hb_font'.
      (hbfont_shape, hbfont_combining_capability)
      (fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: Add prototypes.
      * src/font.c (Ffont_shape_gstring): Accept an additional
      argument DIRECTION, and pass it to the font driver's 'shape'
      (Ffont_variation_glyphs): Doc fix.
      (syms_of_font): New DEFSYMS L2R and R2L.
      * src/composite.h (composition_reseat_it): Adjust prototype.
      * src/composite.c (autocmp_chars): Accept additional argument
      DIRECTION, and pass it to auto-composition-function.  All
      callers changed.
      (composition_reseat_it): Accept additional argument
      BIDI_LEVEL, and use it to determine the DIRECTION argument to
      be passed to autocmp_chars.  All callers changed.
      (syms_of_composite) <auto-composition-function>: Improve the
      doc string; document the meaning of the new argument
      * src/chartab.c (get_unicode_property): New function,
      refactored from the body of get-unicode-property-internal.
      (Fget_unicode_property_internal): Call get_unicode_property
      after validating the input arguments.
      * src/Makefile.in (HARFBUZZ_CFLAGS, HARFBUZZ_LIBS): New macros.
      (SOME_MACHINE_OBJECTS): Add hbfont.o
      * lisp/language/tv-util.el (tai-viet-composition-function):
      * lisp/language/thai-util.el (thai-composition-function):
      * lisp/language/misc-lang.el (arabic-shape-gstring):
      * lisp/language/lao-util.el (lao-composition-function):
      * lisp/language/japanese.el (compose-gstring-for-variation-glyph):
      * lisp/language/hebrew.el (hebrew-shape-gstring):
      * lisp/language/ethio-util.el (ethio-composition-function):
      * lisp/composite.el (compose-chars-after)
      (compose-gstring-for-terminal, auto-compose-chars): All
      composition functions that call shapers now accept an
      additional argument DIRECTION, either L2R or R2L.
      * etc/NEWS: Document the HarfBuzz support.
      * etc/HELLO: Add diacritics to Hebrew greetings.
      * doc/lispref/frames.texi (Font and Color Parameters):
      * doc/emacs/msdos.texi (Windows Fonts): Describe the
      'harfbuzz' font backend on MS-Windows and how it is preferred
      to 'uniscribe'.
      * configure.ac (--wthout-harfbuzz): New option.
      (HAVE_HARFBUZZ): New tests.
      (FONT_OBJ) [HAVE_HARFBUZZ]: Add hbfont.o
      (emacs_config_features): Add HARFBUZZ.
      * admin/nt/dist-build/build-dep-zips.py: Add HarfBuzz dependency.
  5. 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.
      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
      * 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
      * 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.
  6. 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.
  7. 03 Jun, 2019 1 commit
  8. 02 Jun, 2019 1 commit
  9. 01 Jun, 2019 1 commit
  10. 31 May, 2019 1 commit
  11. 30 May, 2019 2 commits
  12. 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
      * 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.
  13. 25 May, 2019 1 commit
  14. 24 May, 2019 2 commits
  15. 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.
  16. 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.
    • 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.
    • 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.
    • 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--set-visited-file-name-advice): New functions.
      (auto-revert--polled-buffers, auto-revert--need-polling-p)
      (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.
  17. 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)
      (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.
  18. 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.
  19. 16 May, 2019 2 commits
  20. 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)
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
      (c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
      * lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
      * lisp/progmodes/cc-langs.el (c-populate-syntax-table)
      (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)
      * 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.
  21. 14 May, 2019 3 commits
  22. 12 May, 2019 1 commit
  23. 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.
    • 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.
  24. 06 May, 2019 1 commit
  25. 05 May, 2019 6 commits