1. 12 Jul, 2019 3 commits
    • Lars Ingebrigtsen's avatar
      Fix breaking of rfc2047 headers with long words · 4c4ff9d9
      Lars Ingebrigtsen authored
      * lisp/mail/rfc2047.el (rfc2047-fold-region): Don't break lines
      right after the Header: field, but wait until the next
      whitespace.  (This only makes a difference for words that are very
      long (i.e., longer than, say, 60 characters, depending on the
      header name length.)
      4c4ff9d9
    • Lars Ingebrigtsen's avatar
      Refactor rfc2047-fold-region slightly and add a couple of tests · 4438459e
      Lars Ingebrigtsen authored
      * lisp/mail/rfc2047.el (rfc2047--break-line): Refactor out to
      avoid code repetition...
      (rfc2047-fold-region): ... from this function.
      4438459e
    • Michael Albinus's avatar
      Check directory in Tramp's {copy,rename}-file · 955db220
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
      (tramp-adb-handle-rename-file):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
      * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
      * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
      (tramp-smb-handle-rename-file):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
      Check, that NEWNAME is not a directory given as file name.
      
      * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
      (tramp-test12-rename-file): Extend tests.
      955db220
  2. 11 Jul, 2019 4 commits
  3. 10 Jul, 2019 3 commits
  4. 09 Jul, 2019 3 commits
    • Stefan Monnier's avatar
      * src/fileio.c: Fix bug#36431 · fec111c9
      Stefan Monnier authored
      (decide_coding_unwind): Re-introduce.  Move text back to the gap.
      Return the new `inserted` via the unwind_data.
      (Finsert_file_contents): Use it.
      Make sure `inserted` is always 0 when we jump straight to `notfound`.
      Don't insert the text in the buffer until we know it's properly decoded
      for the byteness of the buffer.
      
      * test/src/fileio-tests.el (fileio-tests--insert-file-interrupt):
      Allow insert-file-contents to return an empty buffer in case of
      non-local exit in set-auto-coding-function.
      fec111c9
    • Paul Eggert's avatar
      Port image-type-from-file-header-test to non-SVG Emacs · ce59b41a
      Paul Eggert authored
      Problem reported privately by Michael Albinus.
      * test/lisp/image-tests.el (image-type-from-file-header-test):
      Don’t assume svg is a supported image type.
      ce59b41a
    • Glenn Morris's avatar
      Conditionalize result of a bytecomp test · 95dce77c
      Glenn Morris authored
      * test/lisp/emacs-lisp/bytecomp-tests.el
      (bytecomp-test--switch-duplicates):
      Apparently the result depends on byte-compile-cond-use-jump-table.
      95dce77c
  5. 08 Jul, 2019 1 commit
    • Ken Brown's avatar
      Ensure that expand-file-name returns an absolute file name · 0528a7c8
      Ken Brown authored
      * src/fileio.c (Fexpand_file_name): Don't directly use the current
      buffer's default-directory if it is relative.  Instead replace it
      by its expansion relative to invocation-directory.  (Bug#36502)
      * test/src/fileio-tests.el
      (fileio-tests--relative-default-directory): New test.
      0528a7c8
  6. 06 Jul, 2019 3 commits
    • Stefan Kangas's avatar
      Add tests for text-property-search to check prop-match-value · cfcaf06f
      Stefan Kangas authored
      * test/lisp/emacs-lisp/text-property-search-tests.el
      (with-match-test): New macro.
      (text-property-search-forward-prop-match-match-face-nil-nil)
      (text-property-search-forward-prop-match-match-face-bold-t)
      (text-property-search-forward-prop-match-match-face-bold-nil)
      (text-property-search-backward-prop-match-match-face-nil-nil)
      (text-property-search-backward-prop-match-match-face-italic-t)
      (text-property-search-backward-prop-match-match-face-italic-nil):
      Add test cases to also verify the value of prop-match-value
      (bug#36486).
      cfcaf06f
    • Konstantin Kharlamov's avatar
      Replace manually crafted hex regexes with [:xdigit:] · dfc322d7
      Konstantin Kharlamov authored
      * admin/charsets/mapconv:
      * build-aux/gitlog-to-changelog (parse_amend_file, git_dir_option):
      * lisp/progmodes/verilog-mode.el (verilog-delay-re):
      (verilog-type-font-keywords, verilog-read-always-signals-recurse):
      (verilog-is-number):
      * lisp/progmodes/vera-mode.el (vera-font-lock-keywords):
      * test/src/emacs-module-tests.el (mod-test-sum-test):
      * lisp/xml.el: (xml--entity-replacement-text):
      * lisp/version.el (emacs-repository-version-git):
      * lisp/textmodes/sgml-mode.el (sgml-quote):
      * lisp/textmodes/css-mode.el (css-escapes-re)
      (css--colors-regexp):
      * lisp/progmodes/prolog.el (prolog-syntax-propertize-function):
      * lisp/progmodes/hideif.el (hif-token-regexp, hif-tokenize):
      * lisp/progmodes/ebnf-dtd.el: (ebnf-dtd-attlistdecl)
      (ebnf-dtd-entitydecl, ebnf-dtd-lex):
      * lisp/progmodes/ebnf-ebx.el (ebnf-ebx-hex-character):
      * lisp/progmodes/ebnf-abn.el (ebnf-abn-character):
      * lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
      (cperl-find-pods-heres):
      * lisp/progmodes/cc-mode.el (c-maybe-quoted-number-head)
      (c-maybe-quoted-number, c-parse-quotes-before-change)
      (c-parse-quotes-after-change, c-quoted-number-head-before-point)
      (c-quoted-number-straddling-point):
      * lisp/progmodes/ada-mode.el (featurep, ada-in-numeric-literal-p)
      (ada-font-lock-keywords):
      * lisp/org/org-mobile.el (org-mobile-copy-agenda-files)
      * lisp/org/org-table.el (org-table-number-regexp):
      (org-mobile-update-checksum-for-capture-file):
      * lisp/nxml/xsd-regexp.el (xsdre-gen-categories):
      * lisp/nxml/xmltok.el (let*):
      * lisp/nxml/rng-xsd.el (rng-xsd-convert-hex-binary)
      (rng-xsd-convert-any-uri):
      * lisp/nxml/rng-uri.el (rng-uri-file-name-1)
      (rng-uri-unescape-multibyte, rng-uri-unescape-unibyte)
      (rng-uri-unescape-unibyte-match)
      (rng-uri-unescape-unibyte-replace):
      * lisp/nxml/rng-cmpct.el (rng-c-process-escapes):
      * lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
      * lisp/net/shr-color.el (shr-color->hexadecimal):
      * lisp/mail/rfc2231.el (rfc2231-decode-encoded-string):
      * lisp/international/mule-cmds.el (read-char-by-name):
      * lisp/htmlfontify.el (hfy-hex-regex):
      * lisp/gnus/nneething.el (nneething-decode-file-name):
      * lisp/gnus/mml-sec.el (mml-secure-find-usable-keys):
      * lisp/gnus/gnus-art.el (gnus-button-mid-or-mail-heuristic-alist):
      * lisp/faces.el (read-color):
      * lisp/epg.el (epg--status-ERRSIG, epg--status-VALIDSIG)
      (epg--status-SIG_CREATED, epg--decode-percent-escape)
      (epg--decode-hexstring, epg--decode-quotedstring)
      (epg-dn-from-string):
      * lisp/emulation/cua-rect.el (cua-incr-rectangle):
      * lisp/dnd.el (dnd-unescape-uri):
      * lisp/cedet/semantic/lex.el (semantic-lex-number-expression):
      * lisp/cedet/semantic/java.el (semantic-java-number-regexp):
      * lisp/calc/calc-lang.el (pascal):
      * lisp/calc/calc-ext.el (math-read-number-fancy):
      * lisp/calc/calc-aent.el (math-read-token):
      Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
      (Bug#36167)
      dfc322d7
    • Noam Postavsky's avatar
      ; Add thing-at-point-looking-at test (Bug#35708) · e6608010
      Noam Postavsky authored
      * test/lisp/thingatpt-tests.el (thing-at-point-looking-at): New test.
      e6608010
  7. 04 Jul, 2019 2 commits
    • Juri Linkov's avatar
      * lisp/char-fold.el (char-fold-to-regexp): Implement arg LAX (bug#36398). · 19b1cefa
      Juri Linkov authored
      * test/lisp/char-fold-tests.el (char-fold--test-multi-lax): New test.
      19b1cefa
    • Mattias Engdegård's avatar
      Optimise more inputs to `regexp-opt' (bug#36444) · 3fd74915
      Mattias Engdegård authored
      Use a more precise test to determine whether the input to `regexp-opt'
      is safe to optimise when KEEP-ORDER is non-nil, permitting more inputs
      to be optimised than before.  For example, ("good" "goal" "go") is now
      accepted.
      
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt):
      More precise test for whether the list is safe w.r.t. KEEP-ORDER.
      (regexp-opt--contains-prefix): Remove.
      
      * test/lisp/emacs-lisp/regexp-opt-tests.el: Use lexical-binding.
      (regexp-opt-test--permutation, regexp-opt-test--factorial)
      (regexp-opt-test--permutations, regexp-opt-test--match-all)
      (regexp-opt-test--check-perm, regexp-opt-test--explain-perm)
      (regexp-opt-keep-order): Test KEEP-ORDER.
      3fd74915
  8. 03 Jul, 2019 2 commits
    • Stefan Kangas's avatar
      Add tests for bookmark.el (Bug#36452) · 22760ab3
      Stefan Kangas authored
      * test/lisp/bookmark-resources/example.txt:
      * test/lisp/bookmark-resources/test.bmk:
      * test/lisp/bookmark-tests.el: New files.
      * lisp/bookmark.el: Minor cleanups.
      (bookmark-insert-annotation): Signal error on invalid bookmark.
      (bookmark-write-file): Add newline at end of file.
      22760ab3
    • Michael Albinus's avatar
      Change expected result of a flymake test on emba · 14563dc1
      Michael Albinus authored
      * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
      Test is now passing on emba.gnu.org, too.
      14563dc1
  9. 02 Jul, 2019 4 commits
  10. 30 Jun, 2019 1 commit
    • Michael Albinus's avatar
      Release Tramp 2.4.2 · 10af8c58
      Michael Albinus authored
      * lisp/net/tramp.el: Bump version.
      
      * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
      Add `add-name-to-file' error message.
      (tramp--test-ignore-add-name-to-file-error): Make error handler
      more explicit about the error.
      10af8c58
  11. 29 Jun, 2019 4 commits
    • Eli Zaretskii's avatar
      Support native image transforms on MS-Windows · 74a5a332
      Eli Zaretskii authored
      This changeset also rearranges native image transform code
      for other platforms to make it cleaner, and also removes
      the support for native cropping.  For the discussions, see
      https://lists.gnu.org/archive/html/emacs-devel/2019-06/msg00242.html
      
      * src/w32term.c (w32_image_rotations_p, transform): New functions.
      (w32_draw_image_foreground): If image rotation is requested
      and supported, call PlgBlt to transform the image.
      (w32_initialize): Populate the PlgBlt function pointer if it
      is supported.
      * src/w32term.h (w32_image_rotations_p): Add prototype.
      * src/dispextern.h (struct image) [HAVE_NTGUI]: New member xform.
      * src/image.c (compute_image_rotation): Renamed from
      image_set_rotation.  Only compute and returns the rotation
      angle; leave the matrix calculation for later.  Log an error
      message if the :rotation parameter is not a number.
      (image_set_crop): Function deleted.  We no longer support
      native cropping, as one can display an image slice instead.
      (image_set_transform): Compute the transform matrix in its
      entirety here, in two variants: one for XRender and Cairo, the
      other for NS and MS-Windows.  call compute_image_size and
      compute_image_rotation internally.
      (lookup_image) [HAVE_NATIVE_TRANSFORMS]: Call only
      image_set_transform.  No need to pass the transform matrix to
      image_set_transform.
      (Fimage_transforms_p): Return a list of transform capabilities
      rather than a simple boolean.  Support TTY frames as well.
      * src/nsimage.m (setTransform:): Don't invert the matrix, as
      it is already inverted in image.c.
      
      * test/manual/image-transforms-tests.el (test-cropping): State
      in the text that only ImageMagick supports cropping.
      
      * doc/lispref/display.texi (Image Descriptors): Update the
      documentation of native image transforms.
      (ImageMagick Images): Move the description of ':crop' here.
      
      * etc/NEWS: Minor copyedits of the feature announcement.
      74a5a332
    • Mattias Engdegård's avatar
      Allow empty argument to `regexp-opt-charset' · f1d414b9
      Mattias Engdegård authored
      * test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-charset):
      Handle nil argument, and use regexp-quote for singletons.
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Expand tests.
      f1d414b9
    • Andreas Schwab's avatar
    • Pip Cet's avatar
      Fix json-serialize/object test failure · bc87ee92
      Pip Cet authored
      * test/src/json-tests.el (json-serialize/object):
      Accept failure with different code.
      bc87ee92
  12. 28 Jun, 2019 3 commits
    • Mattias Engdegård's avatar
      Correct regexp matching of raw bytes · a1f76adf
      Mattias Engdegård authored
      Make regexp matching of raw bytes work in all combination of unibyte
      and multibyte patterns and targets, as exact strings and in character
      alternatives (bug#3687).
      
      * src/regex-emacs.c (analyze_first):
      Include raw byte in fastmap when pattern is a multibyte exact string.
      Include leading byte in fastmap for raw bytes in character alternatives.
      (re_match_2_internal):
      Decrement the byte count by the number of bytes in the pattern character,
      not 1.
      * test/src/regex-emacs-tests.el (regexp-unibyte-unibyte)
      (regexp-multibyte-unibyte, regexp-unibyte-mutibyte)
      (regexp-multibyte-multibyte): New tests.
      a1f76adf
    • Michael Albinus's avatar
      Tramp requires Emacs 24.4 · aae5bf44
      Michael Albinus authored
      * doc/misc/tramp.texi (Frequently Asked Questions):
      Use `with-eval-after-load'. in example.
      
      * doc/misc/trampver.texi: Set variable emacsver.
      
      * lisp/net/tramp.el (tramp-send-string, tramp-call-process)
      (tramp-call-process-region, tramp-process-lines):
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename)
      (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes)
      (tramp-gvfs-handle-file-notify-add-watch)
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
      (tramp-do-copy-or-rename-file-out-of-band)
      (tramp-sh-handle-file-notify-add-watch, tramp-find-executable)
      (tramp-set-remote-path)
      (tramp-open-connection-setup-interactive-shell)
      (tramp-maybe-open-connection, tramp-send-command):
      * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
      (tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
      (tramp-smb-handle-set-file-acl)
      (tramp-smb-handle-start-file-process)
      (tramp-smb-maybe-open-connection):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl):
      (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'.
      
      * lisp/net/tramp-adb.el:
      * lisp/net/tramp-archive.el:
      * lisp/net/tramp-integration.el:
      * lisp/net/tramp-ftp.el: Use `with-eval-after-load'.
      
      * lisp/net/tramp-cmds.el (tramp-cleanup-connection)
      (tramp-cleanup-all-connections): Cancel timer.
      
      * lisp/net/tramp-compat.el (subr-x): Require.
      (default-toplevel-value): Don't make it a defalias.
      
      * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'.  Do
      not special handle `split-string'.
      
      * lisp/net/tramp.el: Require Emacs 24.4.
      (tramp-password-prompt-regexp): Use `password-word-equivalents'.
      (tramp-user-error): Use `user-error'.
      (tramp-replace-environment-variables): Use `substitute-env-vars'.
      (tramp-wait-for-regexp): Rearrange `with-current-buffer' call.
      (tramp-get-local-gid): Use `group-gid'.
      
      * lisp/net/trampver.el: Check for Emacs 24.4.
      
      * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
      (tramp-test02-file-name-dissect-simplified)
      (tramp-test02-file-name-dissect-separate)
      (tramp-test03-file-name-host-rules)
      (tramp-test03-file-name-method-rules): Don't check for `user-error'.
      aae5bf44
    • Juanma Barranquero's avatar
  13. 26 Jun, 2019 6 commits
  14. 25 Jun, 2019 1 commit
    • Noam Postavsky's avatar
      Fix sgml-mode handling of quotes within parens (Bug#36347) · e62ad049
      Noam Postavsky authored
      * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Use
      syntax-ppss-table if set.  This is only needed on the release branch,
      on master the caller (syntax-propertize) already does this.
      (sgml-mode): Set syntax-ppss-table to sgml-tag-syntax-table.  This
      correctly classifies parens as punctuation, so they won't confuse the
      parser.
      * test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
      New test copied from master, with two cases added for this bug.
      e62ad049