summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Expand overlay multibyte testsAndreas Politz2017-10-071-3/+58
| | | | | | * test/src/buffer-tests.el (test-overlay-multibyte-transition-1): Expand test. (test-overlay-multibyte-transition-2): New test.
* Add test exposing overlay bugAndreas Politz2017-10-051-0/+101
| | | | * test/src/buffer-tests.el (overlay-autogenerated-test-64): New test.
* Add test regarding overlay and buffer encodingAndreas Politz2017-10-051-0/+8
| | | | | | * test/src/buffer-tests.el (test-overlay-multibyte-transition-1): New test exposing a bug regarding overlays when changing the multibyteness of a buffer.
* Provide a new tree data-structure for overlays.Andreas Politz2017-10-048-0/+12240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/itree.c (interval_generator_narrow, interval_generator_next) (interval_node_init, interval_node_begin) (interval_node_end, interval_node_set_region) (interval_tree_create, interval_tree_clear) (interval_tree_init, interval_tree_destroy) (interval_tree_size, interval_tree_insert) (interval_tree_contains, interval_tree_remove) (interval_tree_validate, interval_tree_iter_start) (interval_tree_iter_finish, interval_tree_iter_next) (interval_tree_iter_ensure_space, interval_tree_max_height) (interval_tree_insert_gap, interval_tree_delete_gap) (interval_generator_create, interval_generator_reset) (interval_generator_ensure_space, interval_node_intersects) (interval_generator_next, interval_generator_narrow) (interval_generator_destroy, interval_stack_create) (interval_stack_destroy, interval_stack_clear) (interval_stack_ensure_space, interval_stack_push) (interval_stack_push_flagged, interval_stack_pop) (interval_tree_update_limit, interval_tree_inherit_offset) (interval_tree_propagate_limit, interval_tree_rotate_left) (interval_tree_rotate_right, interval_tree_insert_fix) (interval_tree_remove_fix, interval_tree_transplant) (interval_tree_subtree_min): New file and new functions. * src/itree.h: New file. * configure.ac: Create Makefile for manual overlay tests. * src/Makefile.in: Add itree.o target. * src/alloc.c (build_overlay, mark_overlay, mark_buffer) (sweep_misc, sweep_buffers): Adapt to new tree data-structure. * src/buffer.c (overlays_in, overlays_at): Remove unused arguments prev_ptr and change_req, adapt to new data-structure and reuse code. (copy_overlays, drop_overlays, delete_all_overlays) (reset_buffer, kill-buffer, buffer-swap-text, next_overlay_change) (previous_overlay_change, mouse_face_overlay_overlaps) (disable_line_numbers_overlay_at_eob, overlay_touches_p) (overlay_strings, adjust_overlays_for_insert) (adjust_overlays_for_delete, overlayp, make-overlay, move-overlay) (delete-overlay, overlay-start, overlay-end, overlay-buffer) (overlay-properties, overlays-at, overlays-in) (next-overlay-change, previous-overlay-change, overlay-put) (overlay-get, report_overlay_modification, evaporate_overlays) (init_buffer_once): Adapt to changes and tree data-structure. (overlay-lists, overlay-recenter): Funtions are now obsolete, but kept anyway. (set_buffer_overlays_before, set_buffer_overlays_after) (recenter_overlay_lists,fix_start_end_in_overlays,fix_overlays_before) (unchain_overlay,): Removed functions of the old list data-structure. (swap_buffer_overlays, make_sortvec_item): New functions. (sort_overlays): Adapt to changes and tree data-structure. (sortvec): Moved to buffer.h . (make_lispy_interval_node, overlay_tree, overlay-tree) [ITREE_DEBUG]: New debugging functions. * src/buffer.h (overlays_before, overlays_after): Removed struct member of the list data-structure. (overlays): Added tree struct member. (sortvec): Moved here from buffer.c . (GET_OVERLAYS_AT): Adapt to changes. (set_buffer_intervals, OVERLAY_START, OVERLAY_END, OVERLAY_PLIST): Adapt to tree data-structure. (OVERLAY_POSITION): Removed macro of the list data-structure. (OVERLAY_REAR_ADVANCE_P, OVERLAY_FRONT_ADVANCE_P): New macros. (overlay_start, overlay_end) (set_overlay_region, maybe_alloc_buffer_overlays) (free_buffer_overlays, add_buffer_overlay) (remove_buffer_overlay, buffer_overlay_iter_start) (buffer_overlay_iter_next, buffer_overlay_iter_finish) (buffer_overlay_iter_narrow): New functions. (compare_overlays, make_sortvec_item): Export functions. * src/editfns.c (overlays_around): Reuse overlays_in. (get-pos-property): Adapt to tree data-structure. (transpose-regions): Remove call to deleted function. * src/fileio.c: (insert-file-contents): Remove references to deleted struct member. * src/fns.c (internal_equal): Adapt to tree data-structure. * src/indent.c (check_display_width): Adapt to tree data-structure. (skip_invisible): Remove call to deleted function. * src/insdel.c (adjust_markers_for_insert): Remove calls to deleted functions. * src/intervals.c (adjust_for_invis_intang): Adapt to tree data-structure. * src/keyboard.c (adjust_point_for_property): Adapt to tree data-structure. * src/lisp.h (Lisp_Overlay): Modified struct layout. * src/print.c (temp_output_buffer_setup, print_object): Adapt to tree data-structure. * src/textprop.c (get_char_property_and_overlay): Adapt to tree data-structure. Take advantage of the new data-structure. * src/window.h (overlay_matches_window): New function. * src/xdisp.h (next_overlay_change): Removed function. Use next-overlay-change, which does not use xmalloc anymore. (handle_single_display_spec, load_overlay_strings) (back_to_previous_visible_line_start, note_mouse_highlight): Adapt to tree data-structure. (move_it_to, display_line): Remove calls to deleted functions. * src/xfaces.c (face_at_buffer_position): Adapt to changes and tree data-structure. * test/src/buffer-tests.el: Many tests regarding overlays added. * test/manual/noverlay/itree-tests.c: New file with tests of the tree data-structure on the C level. * test/manual/noverlay/Makefile.in: New file. * test/manual/noverlay/check-sanitize.sh: New file. * test/manual/noverlay/emacs-compat.h: New file. * test/manual/noverlay/.gitignore: New file. * test/manual/noverlay/overlay-perf.el: New file providing performance tests. * test/manual/noverlay/many-errors.h: New file.
* Merge from origin/emacs-26Paul Eggert2017-10-016-5/+71
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5172fa02cc Prefer HTTPS to HTTP for gnu.org 8cdd8b920a Merge from Gnulib 60b7668b89 Keep eww buffer current when looking up CSS on MDN bd49b6f1b3 Workaround for faulty localtime() under macOS 10.6 913808e224 Doc amendment for syntax-ppss. 98dc91fda8 Remove incorrect NEWS entry about 'find-library' 539d8626cd Remove inadvertent changes to syntax.texi in last commit. 8c18dcbc78 Amend documentation for text-quoting-style becoming a user... 5f76ac150a Make the value nil in text-quoting-style mean what it does... d5e4e004fa Make text-quoting-style customizable. Introduce t and new... 1ba3471b9b eshell.texi improvements 7abb5c3960 Fix ns-win.el on GNUstep 07ea5ef99a Fix reference style in org.texi b03b4f6d79 Improve handling of iconification of child frames (Bug#28611) ba9139c501 Revert "Don't lose arguments to eshell aliases (Bug#27954)" 43fac3beae Make "unsafe directory" error message more informative (Bu... c59ddb2120 Fix slot typecheck in eieio-persistent 8b2ab5014b Fix semantic-ia-fast-jump 5b45e7e1c3 Bind vc-region-history f172894595 Exit macro definition on undefined keys 289fe6c0d1 Reset bidi-paragraph-direction on article rendering a4f7518817 Fix url-http use of url-current-object 4a755ed421 Avoid assertions in vc-hg.el on MS-Windows cb93a6ce72 Improve documentation of 'copy-sequence' 200ef6f721 Minor update of ack.texi cb407d3e87 * doc/emacs/emacs.texi (Acknowledgments): Add more contrib... 82b6c765ff Improve indexing of multi-file/buffer Isearch commands 645ff6c702 Add CAM02 JCh and CAM02-UCS J'a'b' conversions 157007b58e Fix uses of @kindex in the Emacs manual 63a45e8837 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... 3ab2f9bbb9 Merge from gnulib cbc8324488 Prefer HTTPS to HTTP for gnu.org bbda601d1d ; Spelling fixes 695cf5300b Wait for frame visibility with timeout in w32term too e1f6e3127a Bring back the busy wait after x_make_frame_visible (Bug#2... bccf635217 ; * src/gtkutil.c (xg_check_special_colors): Add another G... f428757cdb Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... 26d58f0c58 ; Standardize license notices 73dba0f466 Fix last doc string change in simple.el
| * Prefer HTTPS to HTTP for gnu.orgPaul Eggert2017-10-014-5/+5
| | | | | | | | | | | | | | | | | | This fixes some URLs I omitted from my previous pass, notably those in lists.gnu.org. Although lists.gnu.org does not yet support TLS 1.1, TLS 1.0 is better than nothing. * lisp/erc/erc.el (erc-official-location): * lisp/mail/emacsbug.el (report-emacs-bug): Use https:, not http:.
| * Fix slot typecheck in eieio-persistentEric Abrahamsen2017-09-301-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p): An `or' form can specify multiple potential classes (or null) as valid types for a slot, but previously only the final element of the `or' was actually checked. Now returns all valid classes in the `or' form. (eieio-persistent-validate/fix-slot-value): Check if proposed value matches any of the valid classes. * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-multiple-class-slot): Test this behavior.
| * Add CAM02 JCh and CAM02-UCS J'a'b' conversionsMark Oteiza2017-09-301-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | * src/lcms.c (rad2deg, parse_jch_list, parse_jab_list, xyz_to_jch): (jch_to_xyz, jch_to_jab, jab_to_jch): New functions. (lcms-jch->xyz, lcms-jch->xyz, lcms-jch->jab, lcms-jab->jch): New Lisp functions. (lcms-cam02-ucs): Refactor. (syms_of_lcms2): Declare new functions. * test/src/lcms-tests.el (lcms-roundtrip, lcms-ciecam02-gold): (lcms-jmh->cam02-ucs-silver): New tests. * etc/NEWS: Mention new functions.
* | Make logcount act like CL on negative argPaul Eggert2017-09-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | Behaving like Common Lisp is less likely to lead to surprises, as it yields the same answers on 32- vs 64-bit machines. * doc/lispref/numbers.texi (Bitwise Operations): Document behavior on negative integers. * src/data.c (Flogcount): Behave like Common Lisp for negative arguments. * test/src/data-tests.el (data-tests-popcnt) (data-tests-logcount): Test negative args too.
* | Electric quote mode: Conditionally replace " (Bug#24710)Philipp Stephani2017-10-011-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/electric.el (electric-quote-replace-double): New user option. (electric-quote-post-self-insert-function): Use it. * test/lisp/electric-tests.el (electric-quote-replace-double-disabled) (electric-quote-replace-double-bob) (electric-quote-replace-double-bol) (electric-quote-replace-double-after-space) (electric-quote-replace-double-after-letter) (electric-quote-replace-double-after-paren): New unit tests. * doc/emacs/text.texi (Quotation Marks): Document 'electric-quote-replace-double'.
* | Add logcount (Bug#22689)Mark Oteiza2017-09-301-0/+13
| | | | | | | | | | | | | | | | | | | | * doc/lispref/numbers.texi (Bitwise Operations): Add documentation. * etc/NEWS: Mention. * src/data.c (logcount32, logcount64): New functions. (logcount): New Lisp function. (syms_of_data): Declare it. * test/src/data-tests.el (data-tests-popcnt, data-tests-logcount): New test.
* | Merge from origin/emacs-26Paul Eggert2017-09-293-2/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3ab2f9bbb9 Merge from gnulib cbc8324488 Prefer HTTPS to HTTP for gnu.org bbda601d1d ; Spelling fixes 695cf5300b Wait for frame visibility with timeout in w32term too e1f6e3127a Bring back the busy wait after x_make_frame_visible (Bug#2... bccf635217 ; * src/gtkutil.c (xg_check_special_colors): Add another G... 26d58f0c58 ; Standardize license notices 61225964ed Revert "bug#28609: simple.el" a75ab3b3fb bug#28609: simple.el c7a21430c1 ; * etc/NEWS: Fix last change. 33401b26b1 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... d4b2bbdc73 Merge branch 'emacs-26' into scratch/org-mode-merge c1ac8c170f Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... af130f900f Fix ert backtrace saving for non-`signal'ed errors (Bug#28... 7476eeaa23 Revert "Fix build on macOS (bug#28571)" fec63089d5 Fix build on macOS (bug#28571) 0f9a78e770 Add tests for `css-current-defun-name' 88a0dd71f1 In w32fullscreen_hook don't add decorations to undecorated... 18073beb14 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... 1eef11b7be Fix doc string of 'dired-listing-switches' eaefbc26d5 ; Add files missing in ab351d442d7 ab351d442d Update Org to v9.1.1
| * Prefer HTTPS to HTTP for gnu.orgPaul Eggert2017-09-291-1/+1
| | | | | | | | | | This catches some URLs I missed in my previous scan, or perhaps were added after the scan.
| * ; Spelling fixesPaul Eggert2017-09-291-1/+1
| |
| * Add tests for `css-current-defun-name'Simen Heggestøyl2017-09-281-0/+21
| | | | | | | | | | | | | | * test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name) (css-test-current-defun-name-nested) (css-test-current-defun-name-complex): New tests for `css-current-defun-name'.
* | Merge from origin/emacs-26Paul Eggert2017-09-291-2/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1e5949642a ; * src/gtkutil.c (xg_create_frame_widgets): Add FIXME re.... e7c8da4d05 bug#28609: simple.el 827db6b559 Use a separate syntax-ppss cache for narrowed buffers a2244f417a Improve python3-compatibility of fallback completion (Bug#... 79162cb0db Fix subr-x-tests when running from elc 66d35ae49d * lisp/eshell/esh-util.el (eshell-condition-case): Add deb... f5e72b04d9 Make sh-indentation into an alias for sh-basic-offset (Bug... a58d0c590a Fix loading of smie-config rules (Bug#24848) 3a68dec327 ; Update NEWS for the change in eldoc-message 5a41dd0a1f Reset default-directory inside *xref-grep* buffer 49cd561dc6 * test/lisp/tramp-tests.el (tramp-test21-file-links): Spec... b719f6b20b Loosen strict parsing requirement for desktop files c7a0c13777 * lisp/xdg.el (xdg-thumb-uri): Fix doc string. dc6b3560e5 Fix documentation of `make-frame' and related variables an... 3d3778d82a Accept new `always' value for option `buffer-offer-save' 638f64c40a Improve new NS scrolling variable names d93301242f Document 'replace-buffer-contents' in the manual. 00e4e3e9d2 Fix undecorated frame resizing issues on NS (bug#28512) 820739bbb5 ; * doc/emacs/display.texi (Display Custom): Fix wording. f2b2201594 ; Spelling and URL fixes 0e143b1fc5 Documentation improvements for 'display-line-numbers' f656ccdb43 ; Fix typo d64da52d57 Fix last change in bat-mode.el 908af46abd Fix restoring in GUI sessions desktop saved in TTY sessions 51cbd85454 Improve syntax highlighting in bat-mode 0273916618 Document the 'list-FOO' convention d24ec58540 Expose viewing conditions in CAM02-UCS metric a81d5a3d3f Revert "Set frame size to actual requested size (bug#18215)" 0bf066d4b2 Add tests for Edebug 68baca3ee1 Catch more messages in ert-with-message-capture 28e0c410c9 ; * lisp/mouse.el (secondary-selection-exist-p): Doc fix. 31e1d9ef2f Support setting region from secondary selection and vice v... 047f02f00f Fix new copy-directory bug with empty dirs fbd15836af * doc/lispref/strings.texi (Formatting Strings): Improve i... f16a8d5dbd Fix 2 testsuite tests for MS-Windows 965cffd89c Rename timer-list to list-timers a5fec62b51 Provide native touchpad scrolling on macOS 7b3d1c6beb Fix MinGW64 build broken by recent MinGW64 import libraries c83d0c5fdf Fix crashes in 'move-point-visually' in minibuffer windows 7f3d5f929d * src/emacs.c (usage_message): Don't mention 'find-file'. 6845282200 Fix a minor inaccuracy in the Emacs manual 74d7bb9498 Fix errors in flyspell-post-command-hook 40fdbb01d0 Work on Tramp's file-truename 1a01423b3c Fix bug with make-directory on MS-Windows root 066efb8666 Fix log-view-diff-common when point is after last entry 3f006b56cd Adapt fileio-tests--symlink-failure to Cygwin ee512e9a82 Ignore buffers whose name begins with a space in save-some... 9e1b5bd92c Improve tramp-interrupt-process robustness 8d4223e61b Minor Tramp doc update 331d0e520f Fix gensym 466df76f7d Cleanup in files-tests.el 6359fe630a Remove old cl-assert calls in 'newline' 059184e645 Avoid crash with C-g C-g in GC 541006c536 Fix format-time-string %Z bug with negative tz 679e05eeb9 message-citation-line-format %Z is now tz name 4e8888d438 Use doc-view or pdf-tools on any window-system 5f28f0db73 Fix bug with min and max and NaNs 37b5e661d2 Fix recently-introduced copy-directory bug 6bbbc38b34 Merge from Gnulib 57249fb297 Fix compatibility problem in Tramp 411bec82c4 Avoid GCC 7 compilation warning in eval.c 34a6774daa ; Partially revert c3445aed5194 3003ac0469 Adapt Tramp version. Do not merge 48d39c39e8 Search for Syntax section when viewing MDN 9d101376b4 Allow smerge-keep-current to work for empty hunks 13aba24add Call vc-setup-buffer in vc-git-log-{in,out}going 1d599df5e0 Fix last change to textmodes/page-ext.el a726e09a9a * test/src/lcms-tests.el (lcms-cri-cam02-ucs): Skip if lcm... 546413e1ac * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 ... 96aaeaaffa ; * src/lcms.c: Minor stylistic changes in comments. c3df816585 Fix compilation warning in etags.c
| * Fix subr-x-tests when running from elcNoam Postavsky2017-09-251-2/+7
| | | | | | | | | | * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-and-let*-test-group-1): Use `eval' around the `should-error' cases.
* | Add MIME apps spec utilitiesMark Oteiza2017-09-263-0/+25
|/ | | | | | | | | | | | Facilitates finding associations between MIME types and desktop files that report an association with that type. Combined with mailcap.el's MIME facilities, it should be easy to use desktop files. * lisp/xdg.el (xdg-mime-table): New variable. (xdg-mime-apps-files, xdg-mime-collect-associations, xdg-mime-apps): New functions. * test/data/xdg/mimeapps.list: New file. * test/data/xdg/mimeinfo.cache: New file. * test/lisp/xdg-tests.el (xdg-mime-associations): New test.
* * test/lisp/tramp-tests.el (tramp-test21-file-links): Special code for smb.Michael Albinus2017-09-251-6/+9
|
* Loosen strict parsing requirement for desktop filesMark Oteiza2017-09-251-3/+0
| | | | | | | | There are other desktop-looking files, for instance those having to do with MIME typess, that would benefit from being able to be read by this function. It helps to have some flexibility. * lisp/xdg.el (xdg-desktop-read-file): Remove an error condition. * test/lisp/xdg-tests.el: Remove a test.
* ; Spelling and URL fixesPaul Eggert2017-09-233-5/+5
|
* Expose viewing conditions in CAM02-UCS metricMark Oteiza2017-09-211-5/+32
| | | | | | | | | | | | | | | | Also add tests from the colorspacious library. Finally, catch an errant calculation, where degrees were not being converted to radians. * src/lcms.c (deg2rad, default_viewing_conditions): (parse_viewing_conditions): New functions. (lcms-cam02-ucs): Add comments pointing to references used. Expand the docstring and explain viewing conditions. JCh hue is given in degrees and needs to be converted to radians. (lcms-d65-xyz): Remove. No need to duplicate this in Lisp or make the API needlessly impure. * test/src/lcms-tests.el: Reword commentary. (lcms-rgb255->xyz): New function. (lcms-cri-cam02-ucs): Fix let-binding. (lcms-dE-cam02-ucs-silver): New test, assimilated from colorspacious.
* Add tests for EdebugGemini Lasswell2017-09-212-0/+1033
| | | | | * tests/lisp/emacs-lisp/edeug-tests.el: New file. * tests/lisp/emacs-lisp/edebug-resources/edebug-test-code.el: New file.
* Fix new copy-directory bug with empty dirsPaul Eggert2017-09-201-1/+6
| | | | | | | | | Problem reported by Afdam Plaice (Bug#28520) and by Eli Zaretskii (Bug#28483#34). This is another bug that I introduced in my recent copy-directory changes. * lisp/files.el (copy-directory): Work with empty subdirectories, too. * test/lisp/files-tests.el (files-tests--copy-directory): Test for this bug.
* Fix 2 testsuite tests for MS-WindowsEli Zaretskii2017-09-202-22/+35
| | | | | | | | * test/lisp/ibuffer-tests.el (test-buffer-list): Don't try to create files with "*" in their names. * test/src/editfns-tests.el (format-time-string-with-zone): Adapt results to MS-Windows build. Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
* Adapt fileio-tests--symlink-failure to CygwinKen Brown2017-09-181-0/+2
| | | | | | * test/src/fileio-tests.el (fileio-tests--symlink-failure) [CYGWIN]: Skip the case of a symlink target starting with '\'; this is treated specially on Cygwin.
* Fix gensymMark Oteiza2017-09-181-0/+6
| | | | | * lisp/subr.el (gensym): Actually implement the default prefix. * test/lisp/subr-tests.el (subr-tests--gensym): New test.
* Cleanup in files-tests.elMichael Albinus2017-09-181-2/+4
| | | | | * test/lisp/files-tests.el (files-tests--make-directory) (files-tests--copy-directory): Cleanup temporary directories.
* Fix format-time-string %Z bug with negative tzPaul Eggert2017-09-171-0/+4
| | | | | | | * src/editfns.c (tzlookup): Fix sign error in %Z when a purely numeric zone is negative (Bug#28746). * test/src/editfns-tests.el (format-time-string-with-zone): Add test for this bug.
* Fix bug with min and max and NaNsPaul Eggert2017-09-171-1/+5
| | | | | | * src/data.c (minmax_driver): Fix bug with (min 0 NaN), which mistakenly yielded 0. Also, pacify GCC in a better way. * test/src/data-tests.el (data-tests-min): Test for the bug.
* Fix recently-introduced copy-directory bugPaul Eggert2017-09-171-0/+11
| | | | | | | | | | | Problem reported by Andrew Christianson (Bug#28451): * lisp/files.el (copy-directory): If COPY-CONTENTS, make the destination directory if it does not exist, even if it is a directory name. Simplify, and omit unnecessary test for an already-existing non-directory target, since make-directory diagnoses that for us now. * test/lisp/files-tests.el (files-tests--copy-directory): Test for this bug.
* Fix compatibility problem in TrampMichael Albinus2017-09-171-5/+2
| | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-interrupt-process): Better error handling. * lisp/net/tramp-compat.el (default-toplevel-value): Move up. (top): Do not call `tramp-change-syntax' anymore. (tramp-compat-directory-name-p): New defalias. * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file): * lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file): Use it. * test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process): Modify test.
* Allow smerge-keep-current to work for empty hunksTom Tromey2017-09-161-0/+34
| | | | | | | Bug#25555 * lisp/vc/smerge-mode.el (smerge-get-current): Allow point to be at match-end. * test/lisp/vc/smerge-mode-tests.el: New file.
* * test/src/lcms-tests.el (lcms-cri-cam02-ucs): Skip if lcms2 not present.Glenn Morris2017-09-161-0/+1
|
* * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.Glenn Morris2017-09-161-1/+2
| | | | (cherry picked from commit 8081df26911c63aadfce4ee8f6a7223d814baeaf)
* Add lisp variable lcms-d65-xyzMark Oteiza2017-09-161-0/+19
| | | | | | | | | | This serves as the default optional argument for functions in this library. * src/lcms.c (lcms-d65-xyz): New variable. (lcms-cam02-ucs): Use it. Use better word in docstring. Fix bug color1 -> color2. * test/src/lcms-tests.el: Add some tests for lcms-cri-cam02-ucs. (lcms-colorspacious-d65): New variable.
* Add lcms-temp->white-point and initial testsMark Oteiza2017-09-151-0/+69
| | | | | * src/lcms.c (lcms-temp->white-point): New function. * test/src/lcms-tests.el: New file.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13212-310/+301
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Prefer HTTPS to HTTP for gnu.orgPaul Eggert2017-09-132-20/+20
| | | | | | | | | | | | | | | This patch just changes code files; a followup companion patch (much larger) will affect the commentary. This part is separated out to make it easier to review. * .dir-locals.el (change-log-mode): * lisp/org/org-info.el (org-info-other-documents) (org-info-map-html-url): * lisp/org/ox-html.el (org-html-creator-string): * lisp/startup.el (fancy-startup-text, fancy-about-text) (fancy-splash-head): * test/lisp/ffap-tests.el (ffap-other-window--bug-25352): * test/lisp/thingatpt-tests.el (thing-at-point-test-data): Use HTTPS instead of HTTP.
* Add tests for color.elSimen Heggestøyl2017-09-131-0/+251
| | | | | | | | | * lisp/color.el (color-name-to-rgb, color-complement): Clarify in docstrings that RGB triplets should use four digits per component. (color-rgb-to-hsl): Break line to avoid "Hidden behind deeper element" warning. * test/lisp/color-tests.el: New file.
* Improve backward compatibility of tramp-testsMichael Albinus2017-09-131-51/+84
| | | | | | | | | * test/lisp/net/tramp-tests.el (seq): Don't require. (tramp--test-emacs26-p): New defun. (tramp-test10-write-region, tramp-test11-copy-file) (tramp-test12-rename-file, tramp-test15-copy-directory) (tramp-test21-file-links): Use it. (tramp-test16-file-expand-wildcards): Use `copy-sequence'.
* Allow write-contents-functions to short-circuit buffer saveEric Abrahamsen2017-09-121-0/+27
| | | | | | | | | | | | | | | | Bug#28412 * lisp/files.el (basic-save-buffer): Re-arrange function so that write-contents-functions are run earlier. If they return non-nil, consider the buffer saved without requiring the buffer to be visiting a file. (save-some-buffers): This function should consider any buffer with a buffer-local value for write-contents-functions eligible for saving. * test/lisp/files-tests.el (files-test-no-file-write-contents): New test. * doc/lispref/files.texi (Saving Buffers): Mention in docs. * etc/NEWS: And in NEWS.
* Implement and-let*Mark Oteiza2017-09-121-148/+160
| | | | | | | | | | | | | | | | | | | | This also includes changes to if-let and when-let. The single tuple special case is ambiguous, and binding a symbol to nil is not as useful as binding it to its value outside the lexical scope of the binding. (Bug#28254) * etc/NEWS: Mention. * lisp/emacs-lisp/subr-x.el (internal--listify): (internal--build-binding-value-form): Extend to account for solitary symbols and (EXPR) items in binding varlist. (if-let*, when-let*): Nix single tuple case and incumbent bind-symbol-to-nil behavior. (and-let*): New macro. (if-let, when-let): Mark obsolete. Redefine in terms of if-let*, so they implicitly gain the new features without breaking existing code. * test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of single-tuple special case, lack of binding solitary symbols to nil, and the introduction of uninterned symbols for (EXPR) bindings. Add SRFI-2 test suite adapted to Elisp.
* Extend tramp-tests according to bug#27986Michael Albinus2017-09-121-17/+78
| | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test11-copy-file) (tramp-test12-rename-file, tramp-test15-copy-directory) (tramp-test21-file-links): Extend tests. (tramp-test13-make-directory, tramp-test14-delete-directory): Specifiy error symbol in `should-error'.
* Further optimization in Tramp's file name decompositionMichael Albinus2017-09-111-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-syntax): Recompute all file name components. Call `custom-set-variables' after loading. (tramp-build-prefix-format, tramp-build-prefix-regexp) (tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format) (tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp) (tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp): New defuns. (tramp-prefix-format, tramp-prefix-regexp) (tramp-method-regexp, tramp-postfix-method-format) (tramp-postfix-method-regexp, tramp-prefix-ipv6-format) (tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format) (tramp-postfix-ipv6-regexp, tramp-postfix-host-format) (tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-structure, tramp-file-name-regexp) (tramp-completion-file-name-regexp): Convert defuns into defvars. (tramp-prefix-regexp-alist) (tramp-postfix-method-regexp-alist) (tramp-prefix-ipv6-regexp-alist) (tramp-postfix-ipv6-regexp-alist) (tramp-postfix-host-regexp-alist) (tramp-remote-file-name-spec-regexp-alist): Remove. (tramp-build-remote-file-name-spec-regexp) (tramp-build-file-name-structure): Simplify. (tramp-completion-file-name-regexp-alist): New defconst. (tramp-tramp-file-p, tramp-dissect-file-name) (tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name) (tramp-rfn-eshadow-update-overlay-regexp) (tramp-register-file-name-handlers) (tramp-completion-handle-file-name-all-completions) (tramp-completion-dissect-file-name, tramp-clear-passwd): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered) (tramp-compute-multi-hops): Use variables but functions for file name components. * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion): Use variables but functions for file name components.
* Port tramp-tests to new copy-directory behaviorPaul Eggert2017-09-101-2/+3
| | | | | | * test/lisp/net/tramp-tests.el (tramp-test15-copy-directory): Use directory name as arg for copy-directory when we want the special behavior.
* Fix some make-directory bugsPaul Eggert2017-09-101-0/+21
| | | | | | | | * lisp/files.el (files--ensure-directory): New function. (make-directory): Use it to avoid bugs when (make-directory FOO t) is invoked on a non-directory, or on a directory hierarchy that is being built by some other process while Emacs is running. * test/lisp/files-tests.el (files-tests--make-directory): New test.
* Fix race with rename-file etc. with dir NEWNAMEPaul Eggert2017-09-101-8/+8
| | | | | | | | | | | | | | | | | | | | This changes the behavior of rename-file etc. slightly. The old behavior mostly disagreed with the documentation, and had a race condition bug that could allow attackers to modify victims' write-protected directories (Bug#27986). * doc/lispref/files.texi (Changing Files): Document that in rename-file etc., NEWFILE is special if it is a directory name. * etc/NEWS: Document the change in behavior. * src/fileio.c (directory_like): Remove. All uses removed. (expand_cp_target): Test only whether NEWNAME is a directory name, not whether it is currently a directory. This avoids a race. (Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link): Document behavior if NEWNAME is a directory name. (Frename_file): Simplify now that the destdir behavior occurs only when NEWNAME is a directory name. * test/lisp/net/tramp-tests.el (tramp-test11-copy-file) (tramp-test12-rename-file, tramp--test-check-files): Adjust tests to match new behavior.
* Spelling fixesPaul Eggert2017-09-105-5/+5
| | | | | | * lisp/progmodes/cc-langs.el: (c-ambiguous-overloadable-or-identifier-prefixes): Rename from c-ambiguous-overloadable-or-identifier-prefices. Caller changed.
* Avoid looking at localized stringsMark Oteiza2017-09-092-1/+17
| | | | | | | * lisp/xdg.el (xdg-desktop-read-group): Add condition to catch localized strings. * test/lisp/xdg-tests.el (xdg-desktop-parsing): Add test to ensure parsing l10n strings doesn't error but is essentially a no-op.