]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoEnhance mode-line percentage offset facility, with "%o" and "%q"
Alan Mackenzie [Sun, 21 May 2017 10:16:09 +0000 (10:16 +0000)]
Enhance mode-line percentage offset facility, with "%o" and "%q"

"%o" will display the percentage "travel" of the window through the buffer.
"%q" will display a combination of the percentage offsets of the top and
bottom of the window.  The new user option mode-line-percent-position will
facilitate selecting a setting for this part of the mode line.

* lisp/bindings.el (mode-line-percent-position): New customizable user option.
(mode-line-position): Use mode-line-percent-position in place of "%p", etc.

* src/xdisp.c (decode_mode_spec): Add handlers for "%o" and "%q".

* doc/lispref/modes.texi (Mode Line Variables): Document
mode-line-percent-position.
(%-Constructs): Document %o and %q.

* etc/NEWS: Add an entry for these new facilities.

7 years agoWork around macOS bug in create_process, too
Paul Eggert [Sun, 21 May 2017 09:00:02 +0000 (02:00 -0700)]
Work around macOS bug in create_process, too

* src/process.c (create_process) [DARWIN_OS]:
Reset SIGCHLD after vfork here, too.

7 years agoWork around macOS bug with vforked child
Paul Eggert [Sun, 21 May 2017 08:46:44 +0000 (01:46 -0700)]
Work around macOS bug with vforked child

* src/callproc.c (call_process) [DARWIN_OS]:
Include workaround for apparent macOS bug.

7 years agoPacify --enable-gcc-warnings without modules
Paul Eggert [Sun, 21 May 2017 08:45:34 +0000 (01:45 -0700)]
Pacify --enable-gcc-warnings without modules

* src/print.c (print_vectorlike): New function, taken from
part of print_object.  This one is indented properly, and
pacifies --enable-gcc-warnings by using a default case
instead of listing all the enum values, sometimes
incompletely.
(print_object): Use it.

7 years agoRemove DARWIN_OS_CASE_SENSITIVE_FIXME code
Paul Eggert [Sun, 21 May 2017 05:55:17 +0000 (22:55 -0700)]
Remove DARWIN_OS_CASE_SENSITIVE_FIXME code

It does not appear to be needed (Bug#24441).
* etc/PROBLEMS: Remove DARWIN_OS_CASE_SENSITIVE_FIXME stuff.
* src/fileio.c (file_name_case_insensitive_p):
Remove DARWIN_OS_CASE_SENSITIVE_FIXME code.

7 years agoNarrow DARWIN_OS_CASE_SENSITIVE_FIXME to 1 choice
Paul Eggert [Sun, 21 May 2017 05:51:32 +0000 (22:51 -0700)]
Narrow DARWIN_OS_CASE_SENSITIVE_FIXME to 1 choice

* etc/PROBLEMS: Document this (Bug#24441).
* src/fileio.c (file_name_case_insensitive_p): Prefer pathconf
with _PC_CASE_SENSITIVE, if it works, to
DARWIN_OS_CASE_SENSITIVE_FIXME code.
Support just one method for DARWIN_OS_CASE_SENSITIVE_FIXME,
which matches the Apple documentation more precisely.

7 years agoFix mhtml-mode fontification bug
Tom Tromey [Sun, 21 May 2017 04:01:15 +0000 (22:01 -0600)]
Fix mhtml-mode fontification bug

Bug#26922
* lisp/textmodes/mhtml-mode.el (mhtml-syntax-propertize): Call
sgml-syntax-propertize-inside if not in a submode.
* test/manual/indent/html-multi-4.html: New file.

7 years agoFix ido-enable-dot-prefix for empty choice (Bug#26997)
Ryan [Fri, 19 May 2017 15:07:57 +0000 (11:07 -0400)]
Fix ido-enable-dot-prefix for empty choice (Bug#26997)

* lisp/ido.el (ido-set-matches-1): Only check first character of
item if it's non-empty.

Copyright-paperwork-exempt: yes

7 years ago* lisp/svg.el (svg-line): Fix x/y typo. (Bug#26953)
Ari Roponen [Sun, 21 May 2017 00:14:36 +0000 (17:14 -0700)]
* lisp/svg.el (svg-line): Fix x/y typo.  (Bug#26953)

7 years agoPrevent loading vc-bzr writing to ~/.bzr.log
Glenn Morris [Sun, 21 May 2017 00:05:18 +0000 (17:05 -0700)]
Prevent loading vc-bzr writing to ~/.bzr.log

* lisp/vc/vc-bzr.el (vc-bzr-status-switches): Disable bzr logging.

7 years agoPrevent running vc-tests writing to ~/.bzr.log
Glenn Morris [Sun, 21 May 2017 00:00:02 +0000 (17:00 -0700)]
Prevent running vc-tests writing to ~/.bzr.log

* test/lisp/vc/vc-tests.el (vc-test--create-repo)
(vc-test--register, vc-test--working-revision)
(vc-test--checkout-model): Set temporary BZR_HOME, to disable logging.

7 years agoDon't end non-hook variable with "-hook" (Bug#26623)
Noam Postavsky [Sat, 20 May 2017 23:11:51 +0000 (19:11 -0400)]
Don't end non-hook variable with "-hook" (Bug#26623)

* lisp/follow.el (follow-inside-post-command-hook-call): Renamed from
follow-inside-post-command-hook, update uses.

7 years agoFix macOS mouse movement
Charles A. Roelli [Thu, 18 May 2017 19:31:46 +0000 (21:31 +0200)]
Fix macOS mouse movement

* lisp/frame.el (ns-set-mouse-absolute-pixel-position): New
function (Lisp).
(set-mouse-absolute-pixel-position): Change it to call
`ns-set-mouse-absolute-pixel-position' on macOS.
* src/nsfns.m (Fns_set_mouse_absolute_pixel_position): New
function.
* src/nsterm.h (NS_PARENT_WINDOW_TOP_POS): Use the primary
screen's height as a base for calculating global coordinates.
* src/nsterm.m (frame_set_mouse_pixel_position): Fix it in macOS.
* test/lisp/mouse-tests.el (bug26816-mouse-frame-movement): Test
movement of mouse relative to frame.

7 years agoShow tooltip on correct screen (bug#26905)
Alan Third [Tue, 16 May 2017 21:36:21 +0000 (22:36 +0100)]
Show tooltip on correct screen (bug#26905)

* src/nsfns.m (compute_tip_xy): Find the correct screen for the
tooltip and constrain it to that screen.

7 years ago; Set transient-mark-mode to let mark-defun tests pass
Noam Postavsky [Sat, 20 May 2017 22:09:24 +0000 (18:09 -0400)]
; Set transient-mark-mode to let mark-defun tests pass

The tests fail when transient-mark-mode is not set since 2017-05-12
"Fix Bug#21072 and rework `mark-defun'".
* test/lisp/progmodes/python-tests.el (python-mark-defun-1)
(python-mark-defun-2): Bind 'transient-mark-mode' to t.

7 years agoDon't save unrelated buffers before recompiling directory (Bug#25964)
Andreas Politz [Sat, 4 Mar 2017 04:58:34 +0000 (05:58 +0100)]
Don't save unrelated buffers before recompiling directory (Bug#25964)

* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Only save
buffers visiting lisp files under the directory being compiled.

7 years agoMinor fixes for arity ranges in emacs modules
Paul Eggert [Sat, 20 May 2017 20:43:19 +0000 (13:43 -0700)]
Minor fixes for arity ranges in emacs modules

* src/emacs-module.c (module_make_function):
Check that arities fit into fixnums, for func-arity’s benefit.
(funcall_module): Avoid unnecessary conversion to EMACS_INT.
(module_function_arity): Allow arities greater than SHRT_MAX.

7 years agoReimplement module functions
Philipp Stephani [Sat, 13 May 2017 14:29:40 +0000 (16:29 +0200)]
Reimplement module functions

Instead of a lambda, create a new type containing all data required to
call the function, and support it in the evaluator.  Because this type
now also needs to store the function documentation, it is too big for
Lisp_Misc; use a pseudovector instead.  That also has the nice benefit
that we don't have to add special support to the garbage collector.

Since the new type is user-visible, give it a predicate.

Now we can easily support 'help-function-args' and 'func-arity'; add
unit tests for these.

* src/lisp.h (allocate_module_function, MODULE_FUNCTIONP)
(XMODULE_FUNCTION): New pseudovector type 'module function'.

* src/eval.c (FUNCTIONP): Also treat module functions as functions.
(funcall_lambda, Ffuncall, eval_sub): Add support for calling module
functions.
(Ffunc_arity): Add support for detecting the arity of module
functions.

* src/emacs-module.c (module_make_function): Adapt to new structure.
Return module function object directly instead of wrapping it in a
lambda; remove FIXME.
(funcall_module): New function to call module functions.  Replaces
`internal--module-call' and is called directly from eval.c.
(syms_of_module): Remove internal helper function, which is no longer
needed.
(module_function_arity): New helper function.

* src/data.c (Ftype_of): Adapt to new implementation.
(Fmodule_function_p, syms_of_data): New user-visible function.  Now
that module functions are first-class objects, they deserve a
predicate.  Define it even if not compiled with --enable-modules so
that Lisp code doesn't have to check for the function's existence.

* src/doc.c (Fdocumentation): Support module functions.

* src/print.c (print_object): Adapt to new implementation.

* src/alloc.c (mark_object): Specialized garbage collector support is
no longer needed.

* lisp/help.el (help-function-arglist): Support module functions.
While there, simplify the arity calculation by using `func-arity',
which does the right thing for all kinds of functions.

* test/data/emacs-module/mod-test.c: Amend docstring so we can test
the argument list.

* test/src/emacs-module-tests.el (mod-test-sum-docstring): Adapt to
new docstring.
(mod-test-non-local-exit-signal-test): Because `internal--module-call'
is gone, the backtrace has changed and no longer leaks the
implementation.
(module--func-arity): New test for `func-arity'.
(module--help-function-arglist): New test for `help-function-arglist'.

7 years agoAvoid crashes in GC due to unescaped characters warning
Eli Zaretskii [Sat, 20 May 2017 11:53:06 +0000 (14:53 +0300)]
Avoid crashes in GC due to unescaped characters warning

* src/lread.c (load_warn_unescaped_character_literals): Don't cons
Lisp objects from stack-based variables.  (Bug#26961)

7 years agoNew commands: find-library-other-window, find-library-other-frame
Charles A. Roelli [Sat, 20 May 2017 11:41:53 +0000 (14:41 +0300)]
New commands: find-library-other-window, find-library-other-frame

* lisp/emacs-lisp/find-func.el (find-library-other-window)
(find-library-other-frame): New commands to complement the
existing 'find-library' command.  (Bug#26712)
(read-library-name): New function to read a library name.
* etc/NEWS: Mention 'find-library-other-window' and
'find-library-other-frame'.

7 years agoFix automatic hscrolling of only the current line
Eli Zaretskii [Sat, 20 May 2017 07:32:58 +0000 (10:32 +0300)]
Fix automatic hscrolling of only the current line

* src/xdisp.c (display_line): When hscrolling only the current
line, increment iterator's first_visible_x and last_visible_x
values to account for the hscroll.  This propagates the hscroll
effect on the iterator geometry all the way down to the
subroutines called by display_line, and avoids scrolling bugs
under large hscroll values.  (Bug#26994)

7 years agoAdd handlerlist assertion to module code
Paul Eggert [Fri, 19 May 2017 23:15:07 +0000 (16:15 -0700)]
Add handlerlist assertion to module code

* src/emacs-module.c (module_reset_handlerlist):
Check handlerlist.  Suggested by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html

7 years agoPort --enable-gcc-warnings to clang 3.9.1
Paul Eggert [Fri, 19 May 2017 23:05:31 +0000 (16:05 -0700)]
Port --enable-gcc-warnings to clang 3.9.1

* configure.ac (WERROR_CFLAGS): Omit -Wmissing-braces for Clang,
to shut off a false alarm.  Problem reportd by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html

7 years agoLimit integers printed as characters (Bug#16828)
Noam Postavsky [Mon, 24 Apr 2017 02:30:20 +0000 (22:30 -0400)]
Limit integers printed as characters (Bug#16828)

* lisp/simple.el (eval-expression-print-maximum-character): New
variable.
(eval-expression-print-format): Only display value as character if
it's less than or equal to `eval-expression-print-maximum-character'.
(eval-expression-get-print-arguments): Check
eval-expression-print-maximum-character, allow negative arg to
override it.
(eval-expression):
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp):
(elisp--eval-last-sexp-print-value): Handle new variable.
* doc/emacs/building.texi (Lisp Eval): Document new variable and
behavior.
* etc/NEWS: Announce it.
* test/lisp/progmodes/elisp-mode-tests.el
(eval-last-sexp-print-format-small-int)
(eval-last-sexp-print-format-small-int-echo)
(eval-last-sexp-print-format-large-int)
(eval-last-sexp-print-format-large-int-echo):
* test/lisp/simple-tests.el (eval-expression-print-format-small-int)
(eval-expression-print-format-small-int-echo)
(eval-expression-print-format-large-int)
(eval-expression-print-format-large-int-echo): New tests.

7 years agoRefactor lisp eval result printing
Noam Postavsky [Mon, 24 Apr 2017 02:21:42 +0000 (22:21 -0400)]
Refactor lisp eval result printing

* lisp/simple.el (eval-expression-print-format): Don't check
`standard-output' or `current-prefix-arg'.
(eval-expression-get-print-arguments): New function, centralizes
decision about how to print results of `eval-expression' and
`eval-last-sexp'.
(eval-expression):
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp-print-value):
Use it.

7 years agoCheck that signed right shift is arithmetic
Paul Eggert [Fri, 19 May 2017 20:43:03 +0000 (13:43 -0700)]
Check that signed right shift is arithmetic

* src/data.c (ash_lsh_impl): Verify that signed right shift is
arithmetic; if we run across a compiler that uses a logical shift
we’ll need to complicate the code before removing this
compile-time check.  Help the compiler do common subexpression
elimination better.

7 years agoMinor .gitignore fixes
Paul Eggert [Fri, 19 May 2017 17:38:22 +0000 (10:38 -0700)]
Minor .gitignore fixes

* .gitignore: modules/mod-test/Makefile was renamed to
test/data/emacs-module/Makefile.
Omit [0-9]*.core, subsumed by *.core.
test/indent/*.new was renamed to test/manual/indent/*.new.
Add *.swp, for Vim.

7 years ago; * doc/emacs/files.texi (Auto Save Files): Fix a cross-reference.
Eli Zaretskii [Fri, 19 May 2017 15:18:04 +0000 (18:18 +0300)]
; * doc/emacs/files.texi (Auto Save Files): Fix a cross-reference.

7 years ago* lisp/emacs-lisp/package.el: Quote `package-desc' in docstrings
Stefan Monnier [Fri, 19 May 2017 13:42:57 +0000 (09:42 -0400)]
* lisp/emacs-lisp/package.el: Quote `package-desc' in docstrings

7 years agoFix turning off whitespace-mode
Nick Helm [Fri, 19 May 2017 12:20:59 +0000 (15:20 +0300)]
Fix turning off whitespace-mode

* lisp/whitespace.el (whitespace-display-char-on): Correct the way
the original buffer-display-table is saved and restored when
global-whitespace-mode is active.  (Bug#26892)

* test/lisp/whitespace-tests.el
(whitespace-tests-whitespace-mode-on): New function.
(whitespace-tests-display-tables): New test.

Copyright-paperwork-exempt: yes

7 years agoMinor tweaks in tramp-tests.el
Michael Albinus [Fri, 19 May 2017 11:57:36 +0000 (13:57 +0200)]
Minor tweaks in tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp--test-afp-or-smb-p): New defun.
(tramp-test05-expand-file-name-relative): Use it.
(tramp-test38-unload): Run only in batch mode.

7 years agoFix a problem with OpenSSH 7 in Tramp
Michael Albinus [Fri, 19 May 2017 11:57:04 +0000 (13:57 +0200)]
Fix a problem with OpenSSH 7 in Tramp

* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Set also
"ConnectTimeout" during test.  Otherwise, OpenSSH 7 will hang.

7 years agoImprove documentation of 'split-string'
Jean-Christophe Helary [Fri, 19 May 2017 11:44:33 +0000 (14:44 +0300)]
Improve documentation of 'split-string'

* doc/lispref/strings.texi (Creating Strings): Rearrange text to
make it more readable.  (Bug#26925)

7 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Fri, 19 May 2017 11:36:43 +0000 (14:36 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

7 years agoFix typos in doc strings
Ruslan Bekenev [Fri, 19 May 2017 11:35:47 +0000 (14:35 +0300)]
Fix typos in doc strings

* lisp/mail/rfc2231.el (rfc2231-encode-string):
* lisp/mail/rfc2047.el (rfc2047-encode-parameter):
* lisp/mail/rfc2045.el (rfc2045-encode-string): Fix typos in doc
strings.  (Bug#26103)

7 years agoFix module tests on some systems
Philipp Stephani [Fri, 19 May 2017 11:26:29 +0000 (13:26 +0200)]
Fix module tests on some systems

If dladdr(3) isn't available or didn't work, the printed
representation of a module function will not include the file name,
but only the address.  Make the tests pass in that case.

* test/src/emacs-module-tests.el (module-function-object): Fix match for
module function printed representation

7 years agoAdd an optional arguments to string-trim
Jean-Christophe Helary [Fri, 19 May 2017 11:27:10 +0000 (14:27 +0300)]
Add an optional arguments to string-trim

* lisp/emacs-lisp/subr-x.el (string-trim-left, string-trim-right)
(string-trim): Add optional args that serve as defaults per the
original behavior.  (Bug#26908)

7 years agoFix typo in last change to auto-hscroll-mode
Stephen Berman [Fri, 19 May 2017 09:36:01 +0000 (11:36 +0200)]
Fix typo in last change to auto-hscroll-mode

* lisp/cus-start.el (standard): Fix typo in value of auto-hscroll-mode.

7 years agoSupport remote editing in emacsclient via Tramp
Eli Zaretskii [Fri, 19 May 2017 08:51:16 +0000 (11:51 +0300)]
Support remote editing in emacsclient via Tramp

* lib-src/emacsclient.c (main, decode_options)
(print_help_and_exit, longopts): New option '--tramp' / '-T' which
specifies how emacs should use tramp to find remote files.

* doc/emacs/misc.texi (TCP Emacs server): New subsection describing
the various knobs to tune server.el for TCP opereation.
(emacsclient Options): Reference "TCP Emacs server" from description of
--server-file.  Document the new '--tramp' / '-T' options.
* doc/emacs/emacs.texi (Top): Update the top-level menu.

* etc/NEWS: Mention the new option.

7 years ago* lisp/replace.el (query-replace-regexp-eval): Doc fix.
Eli Zaretskii [Fri, 19 May 2017 08:12:51 +0000 (11:12 +0300)]
* lisp/replace.el (query-replace-regexp-eval): Doc fix.

7 years agoAttempt to work around macOS vfork bug
Paul Eggert [Fri, 19 May 2017 07:11:48 +0000 (00:11 -0700)]
Attempt to work around macOS vfork bug

Problem reported by YAMAMOTO Mitsuharu in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00342.html
This is related to the fix for Bug#26397.
* src/callproc.c (call_process_cleanup, call_process) [!MSDOS]:
Report internal error if wait_for_termination fails.
* src/sysdep.c (get_child_status): Return -1 if waitpid is
buggy, instead of aborting.
(wait_for_termination): Return bool success value.
All callers changed.

7 years agoAdjust defcustom form for 'auto-hscroll-mode'
Eli Zaretskii [Fri, 19 May 2017 07:01:23 +0000 (10:01 +0300)]
Adjust defcustom form for 'auto-hscroll-mode'

* lisp/cus-start.el (standard) <auto-hscroll-mode>: Adjust the
defcustom form.  Suggested by Stephen Berman <stephen.berman@gmx.net>.

7 years agoFix DARWIN_OS_CASE_SENSITIVE_FIXME==2 false alarm
Paul Eggert [Fri, 19 May 2017 03:40:42 +0000 (20:40 -0700)]
Fix DARWIN_OS_CASE_SENSITIVE_FIXME==2 false alarm

* src/fileio.c (file_name_case_insensitive_p):
Don’t compile the (DARWIN_OS_CASE_SENSITIVE_FIXME == 2)
code unless DARWIN_OS_CASE_SENSITIVE_FIXME is 2.
Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html

7 years agoPort --enable-gcc-warnings to clang 3.9.1
Paul Eggert [Fri, 19 May 2017 03:27:11 +0000 (20:27 -0700)]
Port --enable-gcc-warnings to clang 3.9.1

* configure.ac (WERROR_CFLAGS): Omit -Wdouble-promotion if clang.
Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html

7 years agoClean up compiler warning in emacs-module.c
Paul Eggert [Fri, 19 May 2017 03:02:42 +0000 (20:02 -0700)]
Clean up compiler warning in emacs-module.c

* src/emacs-module.c (MODULE_SETJMP_1): Use the local var
instead of leaving it unused, to pacify picky compilers.
(module_reset_handlerlist): Now takes a dummy pointer to a struct
handler *, instead of a dummy pointer to an int.  All uses changed.

7 years agoClean up some compiler warnings
Philipp Stephani [Fri, 19 May 2017 02:15:26 +0000 (19:15 -0700)]
Clean up some compiler warnings

* src/sysdep.c (system_process_attributes) [DARWIN_OS]:
Remove unused locals.

7 years agoSupport hscrolling only the current line
Eli Zaretskii [Thu, 18 May 2017 20:18:29 +0000 (23:18 +0300)]
Support hscrolling only the current line

* src/xdisp.c (hscrolling_current_line_p): New function.
(init_iterator): If auto-hscrolling just the current line, don't
increment the iterator's first_visible_x and last_visible_x
variables.
(hscroll_window_tree): Recompute window's hscroll when moving
vertically to another screen line.
(redisplay_window): If we are hscrolling only the current line,
disable the optimizations that rely on the current matrix being
up-to-date.
(display_line): Accept an additional argument CURSOR_VPOS, the
vertical position of the current screen line which might need
hscrolling; all callers changed.  Compute first_visible_x and
last_visible_x specially when auto-hscrolling current line, by
repeating the calculation that is done in init_iterator in other
modes.
(syms_of_xdisp) <auto-hscroll-mode>: No longer boolean, it can now
accept a 3rd value 'current-line, to turn on the mode where
only the current line is hscrolled.

* etc/NEWS: Mention the new auto-hscroll-mode value.

7 years agoFix last change in line-move-finish
Eli Zaretskii [Thu, 18 May 2017 19:54:35 +0000 (22:54 +0300)]
Fix last change in line-move-finish

* lisp/simple.el (line-move-finish): Fix last change.  This corrects a
regression in C-n and C-p when lines are truncated, introduced by the
change in 2017-05-10.

7 years agoExpand docstring for CSS mode
Simen Heggestøyl [Thu, 18 May 2017 15:59:56 +0000 (17:59 +0200)]
Expand docstring for CSS mode

* lisp/textmodes/css-mode.el (css-completion-at-point, css-mode):
Expand docstrings.

7 years agoUse the expression angle units while simplifying it
Tino Calancha [Thu, 18 May 2017 05:47:06 +0000 (14:47 +0900)]
Use the expression angle units while simplifying it

Don't use the angle mode, use the angle units included
in the expression instead (Bug#23889).
* lisp/calc/calc-alg.el (calc-input-angle-units): New defun.
(math-simplify): Use it.
* lisp/calc/calc-forms.el (math-to-hms, math-from-hms):
Don't use calc-angle-mode if math-simplifying-units is non-nil.
* lisp/calc/calc-math.el (calcFunc-nroot, math-from-radians)
(math-to-radians-2, math-from-radians-2): Don't convert angle
to radians if math-simplifying-units is non-nil.
* test/lisp/calc/calc-tests.el (test-calc-23889): Add test.

7 years agoRevert "Ignore angle mode while simplifying units"
Tino Calancha [Thu, 18 May 2017 04:15:50 +0000 (13:15 +0900)]
Revert "Ignore angle mode while simplifying units"

This reverts commit 713e922243fb60d850f7b0ff83f3e2a3682f1832.
This commit causes Bug#25652.

7 years ago; Spelling fix
Paul Eggert [Wed, 17 May 2017 21:58:54 +0000 (14:58 -0700)]
; Spelling fix

7 years agoAvoid undefined behavior in struct sockaddr
Paul Eggert [Wed, 17 May 2017 20:35:52 +0000 (13:35 -0700)]
Avoid undefined behavior in struct sockaddr

Problem noted by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00391.html
* src/conf_post.h (ATTRIBUTE_MAY_ALIAS, DECLARE_POINTER_ALIAS):
New macros.
* src/process.c (conv_sockaddr_to_lisp, conv_lisp_to_sockaddr)
(connect_network_socket, network_interface_info)
(server_accept_connection): Use it when aliasing non-char objects.

7 years ago* lisp/vc/smerge-mode.el (smerge-refine-regions): Work in multi-bufs
Stefan Monnier [Wed, 17 May 2017 19:44:36 +0000 (15:44 -0400)]
* lisp/vc/smerge-mode.el (smerge-refine-regions): Work in multi-bufs

Rename from smerge-refine-subst.  Allow the `beg's to be markers.
Add autoload cookie.
(smerge--refine-forward): Rename from smerge-refine-forward.
(smerge--refine-chopup-region): Rename from smerge-refine-chopup-region.
Assume that its `beg` arg is a marker.
(smerge--refine-highlight-change): Rename from
smerge-refine-highlight-change.  Remove `buf` arg.
(smerge-refine-subst): Redefine as an obsolete alias.

7 years agoWork around AddressSanitizer bug with vfork
Paul Eggert [Wed, 17 May 2017 17:58:11 +0000 (10:58 -0700)]
Work around AddressSanitizer bug with vfork

Problem reported by Jim Meyering in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00246.html
* src/conf_post.h (vfork) [ADDRESS_SANITIZER]: Define to fork.
Unfortunately with the AddressSanitizer in Fedora 25 x86-64, the
vforked child messes up the parent’s shadow memory.  This is too
bad, as we’d rather have AddressSanitizer catch memory-access bugs
related to vfork.

7 years agoCatch IPv4/IPv6 issues at compile time
Paul Eggert [Wed, 17 May 2017 17:27:31 +0000 (10:27 -0700)]
Catch IPv4/IPv6 issues at compile time

* src/process.c (connect_network_socket): Use verify,
not eassert, so that any problems are caught at compile-time.
Avoid dodgy cast by using a local var of the correct type.

7 years agoPacify --enable-gcc-warnings --with-x-toolkit=no
Paul Eggert [Wed, 17 May 2017 17:25:21 +0000 (10:25 -0700)]
Pacify --enable-gcc-warnings --with-x-toolkit=no

* src/composite.c (autocmp_chars) [!HAVE_WINDOW_SYSTEM]:
Avoid unused local.

7 years ago* admin/update_autogen (commit): Pull before push.
Glenn Morris [Wed, 17 May 2017 16:44:29 +0000 (12:44 -0400)]
* admin/update_autogen (commit): Pull before push.

7 years agoautoload-rubric no longer provides a feature by default
Glenn Morris [Wed, 17 May 2017 16:43:23 +0000 (12:43 -0400)]
autoload-rubric no longer provides a feature by default

* lisp/emacs-lisp/autoload.el (autoload-rubric):
Stop providing a feature unless explicitly requested.
(autoload-find-generated-file): Update autoload-rubric call.

7 years agoRemove redundant code in connect_network_socket
Eli Zaretskii [Wed, 17 May 2017 15:12:58 +0000 (18:12 +0300)]
Remove redundant code in connect_network_socket

* src/process.c (connect_network_socket) [HAVE_GETSOCKNAME]:
Remove redundant type-casting and variables.  Don't call
'getsockname' to find the port for AF_LOCAL sockets.
[AF_INET6]: Add an assertion to verify that the ports in the IPv4
and IPv6 structures are at the same offset and have the same size.

7 years agoFix minor timezone memory leak
Paul Eggert [Tue, 16 May 2017 21:19:36 +0000 (14:19 -0700)]
Fix minor timezone memory leak

* src/editfns.c (wall_clock_tz): Remove; unused.

7 years agoDo not discard AddressSanitizer stderr
Paul Eggert [Tue, 16 May 2017 21:30:37 +0000 (14:30 -0700)]
Do not discard AddressSanitizer stderr

* src/emacs.c (close_output_streams) [ADDRESS_SANITIZER]:
Do not close stderr.

7 years agoSimplify procname code to avoid GCC bug
Paul Eggert [Tue, 16 May 2017 21:29:18 +0000 (14:29 -0700)]
Simplify procname code to avoid GCC bug

* src/process.c (server_accept_connection): Simplify and avoid
multiple calls and struct literals in the last case of a switch.
The old code ran afoul of GCC bug 80659, which caused an internal
compiler error.  Problem reported by Jim Meyering in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00182.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80659

7 years agoPacify GCC 7 with --enable-gcc-warnings
Paul Eggert [Tue, 16 May 2017 20:24:33 +0000 (13:24 -0700)]
Pacify GCC 7 with --enable-gcc-warnings

* src/regex.c (regex_compile): Swap labels, so that the
FALLTHROUGH immediately precedes the case label.

7 years agoMerge with gnulib, pacifying GCC 7
Paul Eggert [Tue, 16 May 2017 17:24:19 +0000 (10:24 -0700)]
Merge with gnulib, pacifying GCC 7

This incorporates:
2017-05-16 manywarnings: update for GCC 7
2017-05-15 sys_select: Avoid "was expanded before it was required"
* configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and
-Wformat-overflow=2 options, due to too many false alarms.
* doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4:
Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.
* src/coding.c (decode_coding_iso_2022):
Fix bug uncovered by -Wimplicit-fallthrough.
* src/conf_post.h (FALLTHROUGH): New macro.
Use it to mark all switch cases that fall through.
* src/editfns.c (styled_format): Use !, not ~, on bool.
* src/gtkutil.c (xg_check_special_colors):
When using sprintf, don’t trust Gtk to output colors in [0, 1] range.
(xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool;
this bug was actually caught by Clang.
* src/search.c (boyer_moore):
Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character.
* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Tell GCC that glyph->u.glyphless.ch must be a character.

7 years agoMake autoloading Tramp more robust
Michael Albinus [Tue, 16 May 2017 13:55:06 +0000 (15:55 +0200)]
Make autoloading Tramp more robust

* lisp/net/tramp.el (tramp-file-name-for-operation):
Use `default-directory' where appropriate.
(tramp-file-name-handler): Do not autoload.
(tramp-autoload-file-name-handler): Reintroduce function.
(tramp-register-autoload-file-name-handlers): Use it.

7 years agoExtend tramp-tests.el
Michael Albinus [Tue, 16 May 2017 12:49:51 +0000 (14:49 +0200)]
Extend tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-change-syntax):
Remove declaration, not needed anymore.
(tramp-test05-expand-file-name-relative): New test.
(tramp-test10-write-region): Extend test.

7 years ago* lisp/net/tramp.el: Avoid recursive load of Tramp. (Bug#26943)
Michael Albinus [Tue, 16 May 2017 09:22:33 +0000 (11:22 +0200)]
* lisp/net/tramp.el: Avoid recursive load of Tramp.  (Bug#26943)

7 years agoMake `indent-line-to' respect field boundaries (Bug#26891)
Noam Postavsky [Fri, 12 May 2017 01:06:33 +0000 (21:06 -0400)]
Make `indent-line-to' respect field boundaries (Bug#26891)

* lisp/indent.el (indent-line-to): Use `back-to-indentation' instead
of `backward-to-indentation'.

7 years agoMake sure indent-sexp stops at end of sexp (Bug#26878)
Noam Postavsky [Thu, 11 May 2017 22:12:40 +0000 (18:12 -0400)]
Make sure indent-sexp stops at end of sexp (Bug#26878)

* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Check endpos before
indenting.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-stop): New
test.

7 years agoStop some epg tests failing on rhel7 with gpg 2.0.22 (bug#23619)
Glenn Morris [Tue, 16 May 2017 01:01:30 +0000 (21:01 -0400)]
Stop some epg tests failing on rhel7 with gpg 2.0.22 (bug#23619)

* test/lisp/epg-tests.el (with-epg-tests):
Also set GNUPGHOME in the environment of child processes.
This avoids problems if gpg does not pass --homedir to spawned agent.
; Ref eg https://gpgtools.tenderapp.com/discussions/problems/29537-gpg2-doesnt-start-agent-properly-if-using-homedir

7 years agoAdd oldxmenu to system-configuration-features
Glenn Morris [Tue, 16 May 2017 00:56:46 +0000 (20:56 -0400)]
Add oldxmenu to system-configuration-features

* configure.ac (HAVE_OLDXMENU): New.
(emacs_config_features): Add oldxmenu.

7 years ago* .gitlab-ci.yml: Adjust disclaimer as per RMS.
Ted Zlatanov [Mon, 15 May 2017 20:06:08 +0000 (16:06 -0400)]
* .gitlab-ci.yml: Adjust disclaimer as per RMS.

7 years agoRemove unneeded stuff from nt/inc/sys/time.h
Eli Zaretskii [Mon, 15 May 2017 19:45:57 +0000 (22:45 +0300)]
Remove unneeded stuff from nt/inc/sys/time.h

* nt/inc/sys/time.h (_TIMEVAL_DEFINED, struct timevat, timerisset)
(timercmp, timerclear): Don't define.  Instead, include the system
header sys/time.h, and add only the interval timers stuff.  This
avoids compiler warnings about 'gettimeofday's prototype, and also
avoids redefinition of macros from system headers.

7 years agoFix address violation found by AddressSanitizer
Paul Eggert [Mon, 15 May 2017 01:44:36 +0000 (18:44 -0700)]
Fix address violation found by AddressSanitizer

* src/process.c (connect_network_socket):
Use struct sockaddr_storage, not struct sockaddr_in, to store info
about a socket address.  Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00314.html
This fix is based on a patch by Philipp in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00357.html

7 years agoMake edebug-step-in work on generic methods (Bug#22294)
Gemini Lasswell [Sat, 13 May 2017 18:35:49 +0000 (11:35 -0700)]
Make edebug-step-in work on generic methods (Bug#22294)

* lisp/emacs-lisp/edebug.el (edebug-match-cl-generic-method-args):
New function to implement the edebug-form-spec property of
the symbol cl-generic-method-args.
(edebug-instrument-function): If the function is a generic
function, find and instrument all of its methods. Return a list
instead of a single symbol.
(edebug-instrument-callee): Now returns a list. Update docstring.
(edebug-step-in): Handle the list returned by edebug-instrument-callee.
* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Use name and
cl-generic-method-args in its Edebug spec.
* lisp/emacs-lisp/eieio-compat.el (defmethod): Use name and
cl-generic-method-args in its Edebug spec.
* lisp/subr.el (method-files): New function.
* test/lisp/subr-tests.el (subr-tests--method-files--finds-methods)
(subr-tests--method-files--nonexistent-methods): New tests.

7 years agoMerge from gnulib
Paul Eggert [Sun, 14 May 2017 19:39:26 +0000 (12:39 -0700)]
Merge from gnulib

This incorporates:
2017-05-14 same-inode: Adapt for windows-stat-inodes
2017-05-14 windows-stat-inodes: New module
2017-05-14 stat-time: Adapt for windows-stat-timespec
* lib/gnulib.mk.in: Regenerate.
* lib/stat-time.h, lib/sys_types.in.h, m4/sys_types_h.m4:
Copy from gnulib.

7 years agoRemove gettimeofday from w32 sources
Eli Zaretskii [Sun, 14 May 2017 16:02:50 +0000 (19:02 +0300)]
Remove gettimeofday from w32 sources

* lib-src/ntlib.c (gettimeofday):
* nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused
function 'gettimeofday' and all of its supporting code.

7 years agoFix the MS-Windows build
Eli Zaretskii [Sun, 14 May 2017 14:53:39 +0000 (17:53 +0300)]
Fix the MS-Windows build

* nt/inc/sys/time.h (gettimeofday):
* src/w32.c (gettimeofday): Adjust signature to match Gnulib.

7 years agoMerge from gnulib
Paul Eggert [Sun, 14 May 2017 08:29:05 +0000 (01:29 -0700)]
Merge from gnulib

This incorporates:
2017-05-13 largefile: Simplify
2017-05-13 largefile: Improve and document
2017-05-13 truncate: New module
2017-05-13 windows-stat-timespec: New module
2017-05-13 windows-stat-override: New module
2017-05-11 getopt-posix: port to mingw
2017-05-11 gettimeofday: Increase precision on mingw
2017-05-10 time: Fix missing initialization of HAVE_TIMEZONE_T
2017-05-10 Implement a way to opt out from MSVC support
2017-05-09 tzset: Expand comment about TZ problem on native Windows
* build-aux/config.guess, lib/dup2.c, lib/fcntl.c, lib/fsync.c:
* lib/getdtablesize.c, lib/getopt.c, lib/gettimeofday.c:
* lib/mktime.c, lib/stat-time.h, lib/sys_stat.in.h, lib/unistd.in.h:
* lib/utimens.c, m4/gettimeofday.m4, m4/largefile.m4:
* m4/sys_stat_h.m4, m4/sys_time_h.m4, m4/time_h.m4, m4/time_rz.m4:
* m4/unistd_h.m4: Copy from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

7 years agoMerge branch 'fix/bug-21072'
Marcin Borkowski [Sun, 14 May 2017 05:09:54 +0000 (07:09 +0200)]
Merge branch 'fix/bug-21072'

7 years ago* .gitlab-ci.yml: Add setup for GitLab CI builds.
Ted Zlatanov [Wed, 26 Apr 2017 18:40:03 +0000 (14:40 -0400)]
* .gitlab-ci.yml: Add setup for GitLab CI builds.

7 years ago; Revert "Adjust the edebug spec of if-let*"
Mark Oteiza [Sun, 14 May 2017 01:40:23 +0000 (21:40 -0400)]
; Revert "Adjust the edebug spec of if-let*"

This reverts commit fd4b83ca7c20a68060772ec13aadbe29db612b3f.

7 years agoNew minor mode 'pixel-scroll-mode'
Tak Kunihiro [Sat, 13 May 2017 17:25:39 +0000 (20:25 +0300)]
New minor mode 'pixel-scroll-mode'

* lisp/pixel-scroll.el: New file.

* etc/NEWS: Mention pixel-scroll-mode.

7 years agoMake `old-style-backquotes' variable internal
Philipp [Sat, 6 May 2017 20:23:03 +0000 (22:23 +0200)]
Make `old-style-backquotes' variable internal

* src/lread.c (load_warn_old_style_backquotes, Fload, read1)
(syms_of_lread): Rename `old-style-backquotes' to
`lread--old-style-backquotes', and clarify that it's for internal
use only.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Rename
variable.
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Add
unit test.
* emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes): Add unit test.

7 years agoImprove unescaped character literal warnings
Philipp Stephani [Sat, 13 May 2017 10:28:48 +0000 (12:28 +0200)]
Improve unescaped character literal warnings

* src/lread.c (load_warn_unescaped_character_literals)
(syms_of_lread):
lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Improve
formatting of unescaped character literal warnings.

* test/src/lread-tests.el (lread-tests--unescaped-char-literals):
test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals): Adapt unit tests.

7 years agoFontify C++ for loop variable as variable, even when followed by parentheses
Alan Mackenzie [Fri, 12 May 2017 21:11:49 +0000 (21:11 +0000)]
Fontify C++ for loop variable as variable, even when followed by parentheses

In the following: "for (auto *Friend : Class->friends()) {", "Friend" was
getting fontified as a function, due to insufficient checking of the tokens
between it and "()".

* lisp/progmodes/cc-langs.el (c-:-op-cont-tokens, c-:-op-cont-regexp): New
lang-consts/vars.

* lisp/progmodes/cc-engine.el (c-forward-declarator): After finding a putative
declarator's identifier, check for a ":" token inside a for's parentheses, and
abort the search for "(" if this is found.

7 years agoMake Tramp backward compatible
Michael Albinus [Fri, 12 May 2017 16:36:41 +0000 (18:36 +0200)]
Make Tramp backward compatible

* lisp/net/tramp-cmds.el (tramp-change-syntax):
Set tramp-autoload cookie.

* lisp/net/tramp-compat.el: Run `tramp-change-syntax' at
startup, if necessary.

* lisp/net/tramp.el (tramp-syntax): Use `tramp-compat-user-error'.
(tramp-register-autoload-file-name-handlers): Do not mark
`operations' for `tramp-file-name-handler'.
(tramp-register-file-name-handlers): Remove also
`tramp-autoload-file-name-handler' for backward compatibility.
(tramp-register-foreign-file-name-handler): Use `delete-dups'.

* test/lisp/net/tramp-tests.el (tramp-change-syntax): Declare.

7 years agoModify `beginning-of-defun-comments'
Noam Postavsky [Tue, 9 May 2017 07:38:49 +0000 (09:38 +0200)]
Modify `beginning-of-defun-comments'

* lisp/emacs-lisp/lisp.el (beginning-of-defun-comments): Try not to stop
in the middle of a multiline comment.

7 years agoFix elisp-tests-with-temp-buffer compilation
Noam Postavsky [Thu, 27 Apr 2017 21:13:33 +0000 (17:13 -0400)]
Fix elisp-tests-with-temp-buffer compilation

* test/lisp/emacs-lisp/lisp-tests.el (elisp-tests-with-temp-buffer):
Don't refer to the =!NAME= as "markers" since they produce variables
with just plain positions, not marker objects.  Explicitly specify
that CONTENTS is evaluated at compile time.  Don't re-evaluate
CONTENTS at runtime.  Fix debug specification.  Suppress warnings due
to BODY not using =!NAME= variables.
(elisp-test-point-position-regex): Rename from
`elisp-test-point-marker-regex'.
(mark-defun-test-buffer): Wrap in `eval-and-compile'.

7 years ago* lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point.
Noam Postavsky [Thu, 20 Apr 2017 12:07:19 +0000 (14:07 +0200)]
* lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point.

7 years agoFix Bug#21072 and rework `mark-defun'
Marcin Borkowski [Fri, 31 Mar 2017 11:06:06 +0000 (13:06 +0200)]
Fix Bug#21072 and rework `mark-defun'

* test/lisp/progmodes/elisp-mode-tests.el (mark-defun-test-buffer):
  New variable
(mark-defun-no-arg-region-inactive)
(mark-defun-no-arg-region-active)
(mark-defun-arg-region-active)
(mark-defun-pos-arg-region-inactive)
(mark-defun-neg-arg-region-inactive, mark-defun-bob): Add tests for
the new `mark-defun'.

* lisp/emacs-lisp/lisp.el (beginning-of-defun--in-emptyish-line-p):
  New function.
(beginning-of-defun-comments): New function.
(mark-defun): Fix bug#21072, also rewrite large parts of `mark-defun'
to accept a numerical prefix argument.

7 years ago* lisp/mail/rmail.el (rmail-ignored-headers): Add 3 headers to ignore.
Alfred M. Szmidt [Fri, 12 May 2017 08:44:07 +0000 (11:44 +0300)]
* lisp/mail/rmail.el (rmail-ignored-headers): Add 3 headers to ignore.

Copyright-paperwork-exempt: yes.

7 years agoImprove doc strings in net-utils.el
Eli Zaretskii [Fri, 12 May 2017 08:38:04 +0000 (11:38 +0300)]
Improve doc strings in net-utils.el

* lisp/net/net-utils.el (ifconfig, iwconfig, netstat, arp)
(route, traceroute, nslookup, ftp, smbclient)
(smbclient-list-shares, finger, whois)
(network-connection-to-service, network-service-connection)
(network-connection-reconnect): Improve doc strings.

7 years agoExtend DNS lookup commands to allow specifying the name server
Andrew Robbins [Fri, 12 May 2017 08:19:46 +0000 (11:19 +0300)]
Extend DNS lookup commands to allow specifying the name server

* lisp/net/net-utils.el (ffap-string-at-point): Removed due to
'net-utils-machine-at-point' obviating this autoloaded
function (Bug#25426).
(dig-program-options): New customization variable.
(nslookup-host, dns-lookup-host, run-dig): Can now specify
optional name server argument interactively (by prefix arg) and
non-interactively.

* etc/NEWS: Mention the extension of DNS lookup commands.

7 years agoDon't hard-code loaddefs files in lisp/Makefile
Glenn Morris [Fri, 12 May 2017 01:22:13 +0000 (21:22 -0400)]
Don't hard-code loaddefs files in lisp/Makefile

* lisp/Makefile.in (loaddefs): New variable.
(AUTOGENEL): Use $loaddefs, and include directory.
(bootstrap-clean): Update for AUTOGENEL change.

7 years agoKill modified buffers silently when quitting (bug#26862)
Katsumi Yamaoka [Thu, 11 May 2017 05:49:45 +0000 (05:49 +0000)]
Kill modified buffers silently when quitting (bug#26862)

* lisp/gnus/gnus-start.el (gnus-clear-system): Run do-auto-save to make
sure that latest drafts are saved, and kill modified buffers silently.

7 years agoImplement 1-based column numbering in mode line
Perry E. Metzger [Wed, 10 May 2017 17:57:21 +0000 (20:57 +0300)]
Implement 1-based column numbering in mode line

* src/xdisp.c (decode_mode_spec): Implement the %C construct.

* lisp/bindings.el (column-number-indicator-zero-based): New
defcustom.
(mode-line-position): Use %C when
column-number-indicator-zero-based is nil.

* src/xdisp.c (syms_of_xdisp) <frame-title-format>:
* src/buffer.c (syms_of_buffer) <mode-line-format>:
* doc/lispref/modes.texi (%-Constructs):
* doc/lispref/frames.texi (Frame Titles): Document the %C
construct.

* doc/emacs/display.texi (Optional Mode Line): Document
'column-number-indicator-zero-based'.

* etc/NEWS: Mention 'column-number-indicator-zero-based' and the
%C construct.

7 years agoEnsure cursor's foreground color is in sync with 'default' face
Eli Zaretskii [Wed, 10 May 2017 17:06:15 +0000 (20:06 +0300)]
Ensure cursor's foreground color is in sync with 'default' face

* src/w32term.c (x_set_cursor_gc): Don't reuse cursor GC if its
foreground color is different from the background of the glyph
string's face.  (Bug#26851)

7 years agoFix vertical cursor motion when columns are of unequal size
Eli Zaretskii [Wed, 10 May 2017 16:58:06 +0000 (19:58 +0300)]
Fix vertical cursor motion when columns are of unequal size

* lisp/simple.el (line-move-finish): In line-move-visual mode, use
vertical-motion to move to the goal column, as the goal column
should in that case be interpreted in units of frame's canonical
character width.  (Bug#26852)