1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-24 19:03:29 +00:00
Commit Graph

133403 Commits

Author SHA1 Message Date
Eli Zaretskii
e35a08ea4b Prevent infloop in 'delete-trailing-whitespace'
* lisp/simple.el (delete-trailing-whitespace): Avoid inflooping
when some region of trailing whitespace is unmodifiable.
(Bug#31557)
2018-06-04 19:33:07 +03:00
Glenn Morris
1dafa4a02e ; Merge from origin/emacs-26
The following commit was skipped:

5d448ca (origin/emacs-26) Make cl-print respect print-level and print...
2018-06-04 09:25:22 -07:00
Glenn Morris
4ee82a4ea9 Merge from origin/emacs-26
03697e6 Fix remote-host directory tracking for shells in `term' buffers
16e8541 Update doc string of 'rx'
2018-06-04 09:25:22 -07:00
Glenn Morris
a3ec2e7edd ; Merge from origin/emacs-26
The following commits were skipped:

9a14b4d ; Merge: backports from master
ed962f2 Fix bug#30846, along with misc cleanups found along the way
3ba5fc2 esh-opt.el: Fix improper parsing of first argument (Bug#28323)
0ac98cc * lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bu...
9552485 Fix cl-print for circular sublists (Bug#31146)
4c6cdf6 Revert "Make mail-extract-address-components return the user ...
51ee8bc Centralize Bug#30931 fix
daa6023 Fix another case of freed markers in the undo-list (Bug#30931)
7460840 Fix CHECK_ALLOCATED_AND_LIVE abort during GC
71192e0 Don't wait for visible frames to become visible
5fa73a7 query-replace undo: Handle when user edits the replacement st...
031004e Backport: Fix corner case in query-replace-regexp undo
50c0624 Backport: Preserve case in query-replace undo
2018-06-04 09:25:22 -07:00
Glenn Morris
b12333f122 Merge from origin/emacs-26
defd53a Set accessibility subroles for child frame (bug#31324)
de6a876 Fix redefinition of child frames on NS
2018-06-04 09:25:22 -07:00
Michael Albinus
5e307525b9 Fix Bug#31489
* lisp/files.el (file-name-unquote-non-special): Remove.
(file-name-quoted-p, file-name-quote, file-name-unquote):
Add optional argument TOP.
(file-name-non-special): Adapt callees.  Finish implementation of
functions which need a local copy.  (Bug#31489)
2018-06-04 18:15:54 +02:00
Gemini Lasswell
5d448ca98c Make cl-print respect print-level and print-length (bug#31559)
* lisp/emacs-lisp/cl-print.el (cl-print--depth): New variable.
(cl-print-object) <cons>: Print ellipsis if printing depth greater
than 'print-level' or length of list greater than 'print-length'.
(cl-print-object) <vector>: Truncate printing with ellipsis if
vector is longer than 'print-length'.
(cl-print-object) <cl-structure-object>: Truncate printing with
ellipsis if structure has more slots than 'print-length'.
(cl-print-object) <:around>: Bind 'cl-print--depth'.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-3, cl-print-tests-4): New tests.

(cherry picked from commit 0f48d18fd2)
2018-06-04 08:57:10 -07:00
João Távora
9a0b20d5b3 Add proper Flymake support to cc-mode.el
Except for the important detail that it doesn't make temporary files,
the new flymake-cc backend doesn't yet behave much differently from
the old flymake-proc-legacy-flymake, i.e. it still needs a special
`check-syntax' Makefile target to provide the compiler and compilation
flags.  However, the new infrastructure created should allow less
intrusive cleverer flag guessers (yet to be written) to replace that
mechanism.

* lisp/progmodes/cc-mode.el (c-mode, c++-mode): Add to
flymake-diagnostic-functions.

* lisp/progmodes/flymake-cc.el: New file.
2018-06-04 01:47:02 +01:00
Phil Sainty
03697e648c Fix remote-host directory tracking for shells in `term' buffers
* lisp/term.el (term-handle-ansi-terminal-messages): Use an explicit
tramp method when constructing the tramp path for a non-local host,
as this is now mandatory.  "-" is a pseudo-method for the user's
`tramp-default-method'.  (Bug#31355)

Specify the remote username explicitly in all cases, as
`tramp-default-user' and `tramp-default-user-alist' could cause the
previous logic to fail.

Minor related improvements to the commentary.
2018-06-04 11:10:21 +12:00
Alan Third
fb8d2e064d Add NS style text scale keybindings
* lisp/term/ns-win.el: Add super-based keybindings for adjusting text
zoom.
2018-06-03 20:25:13 +01:00
Eli Zaretskii
16e8541b74 Update doc string of 'rx'
* lisp/emacs-lisp/rx.el (rx): Update the description of some
character classes.
2018-06-03 20:20:52 +03:00
Noam Postavsky
9a14b4d1ce ; Merge: backports from master 2018-06-03 12:55:40 -04:00
Stefan Monnier
ed962f2b8a Fix bug#30846, along with misc cleanups found along the way
* test/src/data-tests.el (data-tests-kill-all-local-variables): New test.

* src/buffer.c (swap_out_buffer_local_variables): Remove.
Fuse the body of its loop into that of reset_buffer_local_variables.
(Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
(reset_buffer_local_variables): Make sure the buffer's local binding
is swapped out before removing it from the alist (bug#30846).
Call watchers before actually killing the var.

* src/data.c (Fmake_local_variable): Simplify.
Use swap_in_global_binding to swap out any local binding, instead of
a mix of find_symbol_value followed by messing with where&found.
Don't call swap_in_symval_forwarding since the currently swapped
binding is never one we've modified.
(Fkill_local_variable): Use swap_in_global_binding rather than messing
with where&found to try and trick find_symbol_value into doing the same.

* src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.

(cherry picked from commit 3ddff08034)
2018-06-03 12:48:14 -04:00
Jay Kamat
3ba5fc2bbe esh-opt.el: Fix improper parsing of first argument (Bug#28323)
Examples of broken behavior:

    sudo -u root whoami
    Outputs: -u
    ls -I '*.txt' /dev/null
    Errors with: *.txt: No such file or directory

* lisp/eshell/esh-opt.el (eshell--process-args): Refactor usage of
args to eshell--args, as we rely on modifications from
eshell--process-option and vice versa.  These modifications were not
being propogated in the (if (= ai 0)) case, since popping the first
element of a list doesn't destructively modify the underlying list
object.

(cherry picked from commit 92a8230e49)
2018-06-03 12:48:14 -04:00
Noam Postavsky
0ac98cc6ed * lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).
(cherry picked from commit 217202c084)
2018-06-03 12:48:14 -04:00
Noam Postavsky
9552485c4d Fix cl-print for circular sublists (Bug#31146)
* lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Push each
element of list being printed onto cl-print--currently-printing.
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle-2): New
test.

(cherry picked from commit b8aa7ecf54)
2018-06-03 12:48:13 -04:00
Lars Ingebrigtsen
4c6cdf6fc9 Revert "Make mail-extract-address-components return the user name more"
This reverts commit 8b50ae8b22.

According to tests in bug#27656 by OGAWA Hirofumi, this patch
led to wrong results when binding

(dolist (addr '("Rasmus <rasmus@gmx.us>" "Rasmus <mbox@gmx.us>"))
  (dolist (ignore-single '(t nil))
    (dolist (ignore-same '(t nil))
      (let ((mail-extr-ignore-single-names ignore-single)
	    (mail-extr-ignore-realname-equals-mailbox-name ignore-same))
	(message "%s" (mail-extract-address-components addr))))))

in combination.

(cherry picked from commit a3a9d5434d)
2018-06-03 12:48:13 -04:00
Paul Eggert
51ee8bc448 Centralize Bug#30931 fix
* src/marker.c (detach_marker): New function.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Use it.

(cherry picked from commit 6f66a43d7a)
2018-06-03 12:48:13 -04:00
Noam Postavsky
daa602338f Fix another case of freed markers in the undo-list (Bug#30931)
* src/alloc.c (free_marker): Remove.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Detach the markers from the
buffer when we're done with them instead of calling free_marker on
them.
* test/src/editfns-tests.el (delete-region-undo-markers-1)
(delete-region-undo-markers-2): New tests.

(cherry picked from commit 96b8747d5c)
2018-06-03 12:48:13 -04:00
Paul Eggert
7460840a6c Fix CHECK_ALLOCATED_AND_LIVE abort during GC
* src/editfns.c (save_restriction_restore):
Wait for the GC to free the temporary markers (Bug#30931).

(cherry picked from commit 670f2ffae7)
2018-06-03 12:48:13 -04:00
Noam Postavsky
71192e0b7e Don't wait for visible frames to become visible
For discussion, see thread starting at
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00807.html.
* src/xterm.c (x_make_frame_visible): Check FRAME_VISIBLE_P before
calling x_wait_for_event.

(cherry picked from commits 2a192e21cf
and 00c1f771f2)
2018-06-03 12:48:13 -04:00
Tino Calancha
5fa73a7d98 query-replace undo: Handle when user edits the replacement string
* lisp/replace.el (perform-replace): Update the replacement string
after the user edit it (Fix Bug#31538).

* test/lisp/replace-tests.el (query-replace-undo-bug31538): New test.

Backport: (cherry picked from commits
ea133e04f4
and
7dcfdf5b14)
2018-06-03 23:28:30 +09:00
Tino Calancha
031004e81b Backport: Fix corner case in query-replace-regexp undo
This commit fixes Bug#31492.
* lisp/replace.el (replace-match-maybe-edit): Preserve match data.

* test/lisp/replace-tests.el (query-replace-undo-bug31492): Add test.

(cherry picked from commit bab73230d1)
2018-06-03 23:28:24 +09:00
Tino Calancha
50c0624b2a Backport: Preserve case in query-replace undo
If the user query and replaces 'foo' with 'BAR', then
undo must comeback to 'foo', not to 'FOO' (Bug#31073).
* lisp/replace.el (perform-replace): Bind nocasify to non-nil
value during undo/undo-all actions.
* test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test.

(cherry picked from commit 32dc0cb1b5)
2018-06-03 23:28:14 +09:00
Michael Albinus
e75c57f10e Extend file-name-non-special
* lisp/files.el (insert-file-contents-literally):
Bind `inhibit-file-name-handlers' the default way.
(file-name-non-special): Rework, mainly for operations with two
file name arguments.
(file-name-unquote-non-special): New defsubst.
(file-name-unquote): Use it.

* test/lisp/files-tests.el (files-test-bug-18141): Skip if needed.
(files-tests--with-temp-non-special): Add docstring.  Delete also
`non-special-name' if the file/directory exists.
(files-tests--special-file-name-extension)
(files-tests--special-file-name-regexp): New defconst.
(files-tests--special-file-name-handler, files-tests--new-name):
New defuns.
(files-tests--with-temp-non-special-and-file-name-handler): New macro.
(files-tests-file-name-non-special-access-file)
(files-tests-file-name-non-special-add-name-to-file)
(files-tests-file-name-non-special-byte-compiler-base-file-name)
(files-tests-file-name-non-special-copy-directory)
(files-tests-file-name-non-special-copy-file)
(files-tests-file-name-non-special-delete-directory)
(files-tests-file-name-non-special-delete-file)
(files-tests-file-name-non-special-diff-latest-backup-file)
(files-tests-file-name-non-special-directory-file-name)
(files-tests-file-name-non-special-directory-files)
(files-tests-file-name-non-special-directory-files-and-attributes)
(files-tests-file-name-non-special-dired-compress-handler)
(files-tests-file-name-non-special-dired-uncache)
(files-tests-file-name-non-special-expand-file-name)
(files-tests-file-name-non-special-file-accessible-directory-p)
(files-tests-file-name-non-special-file-acl)
(files-tests-file-name-non-special-file-attributes)
(files-tests-file-name-non-special-file-directory-p)
(files-tests-file-name-non-special-file-equal-p)
(files-tests-file-name-non-special-file-executable-p)
(files-tests-file-name-non-special-file-exists-p)
(files-tests-file-name-non-special-file-in-directory-p)
(files-tests-file-name-non-special-file-local-copy)
(files-tests-file-name-non-special-file-modes)
(files-tests-file-name-non-special-file-name-all-completions)
(files-tests-file-name-non-special-file-name-as-directory)
(files-tests-file-name-non-special-file-name-case-insensitive-p)
(files-tests-file-name-non-special-file-name-completion)
(files-tests-file-name-non-special-file-name-directory)
(files-tests-file-name-non-special-file-name-nondirectory)
(files-tests-file-name-non-special-file-name-sans-versions)
(files-tests-file-name-non-special-file-newer-than-file-p)
(files-tests-file-name-non-special-notify-handlers)
(files-tests-file-name-non-special-file-ownership-preserved-p)
(files-tests-file-name-non-special-file-readable-p)
(files-tests-file-name-non-special-file-regular-p)
(files-tests-file-name-non-special-file-remote-p)
(files-tests-file-name-non-special-file-selinux-context)
(files-tests-file-name-non-special-file-symlink-p)
(files-tests-file-name-non-special-file-truename)
(files-tests-file-name-non-special-file-writable-p)
(files-tests-file-name-non-special-find-backup-file-name)
(files-tests-file-name-non-special-get-file-buffer)
(files-tests-file-name-non-special-insert-directory)
(files-tests-file-name-non-special-insert-file-contents)
(files-tests-file-name-non-special-load)
(files-tests-file-name-non-special-make-auto-save-file-name)
(files-tests-file-name-non-special-make-directory)
(files-tests-file-name-non-special-make-directory-internal)
(files-tests-file-name-non-special-make-symbolic-link)
(files-tests-file-name-non-special-rename-file)
(files-tests-file-name-non-special-set-file-acl)
(files-tests-file-name-non-special-set-file-modes)
(files-tests-file-name-non-special-set-file-selinux-context)
(files-tests-file-name-non-special-set-file-times)
(files-tests-file-name-non-special-set-visited-file-modtime)
(files-tests-file-name-non-special-shell-command)
(files-tests-file-name-non-special-start-file-process)
(files-tests-file-name-non-special-substitute-in-file-name)
(files-tests-file-name-non-special-temporary-file-directory)
(files-tests-file-name-non-special-unhandled-file-name-directory)
(files-tests-file-name-non-special-vc-registered)
(files-tests-file-name-non-special-write-region): Extends tests to
quoted file names, which would require a file name handler if unquoted.
(files-test-no-file-write-contents): Make test more robust.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Adapt test.
(tramp--test-emacs25-p): New defun.
(tramp-test34-vc-registered): Use it.
2018-06-03 14:30:41 +02:00
Michael R. Mauger
cb8b5f860c Improve buffer naming in sql.el (Bug#31446) 2018-06-02 19:21:31 -04:00
Glenn Morris
84f992d42e Merge from origin/emacs-26
4cfe531 (origin/emacs-26) Improve ELisp documentation of 'clone-indir...
9089b02 Improve documentation of 'inhibit-message'
6107e12 Improve documentation of comment styles
fb45125 Documentation improvements in newcomment.el
641c94c Imp[rove documentation of 'with-silent-modifications'
2018-06-02 10:29:38 -07:00
Glenn Morris
d3f94d2869 ; Merge from origin/emacs-26
The following commits were skipped:

6e0ff4c Fix decoding of directories when "~" includes non-ASCII chars
35c1ab1 Don't remove highlight of misspelled word on pdict save
aac541e Fix some problems in the Cairo build
e96245a Avoid infloops in font_open_entity
3a06e72 Fix encoding of characters when using GB18030 fonts
7782550 Fix C-p and C-n when wrap-prefix is too wide
9804482 Avoid redisplay problems with too wide wrap-prefix
5ee9ccf Fix 'posn-at-point' when line numbers are displayed
c4db766 Another followup to fixing 'window-text-pixel-width'
a6cf7be Fix mouse-set-point when line numbers are displayed
ae78b14 * src/xdisp.c (Fwindow_text_pixel_size): Fix last change.
f1f12d8 Fix 'window-text-pixel-size' when display properties are around
8b2b4b5 Fix display of TABs in hscrolled windows with line numbers
de69d28 Fix wait_reading_process_output wait_proc hang
2018-06-02 10:29:38 -07:00
Glenn Morris
0b0076c860 Merge from origin/emacs-26
76f692e Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
2018-06-02 10:29:38 -07:00
Glenn Morris
dfe9cadf75 ; Merge from origin/emacs-26
The following commit was skipped:

ddd1b95 Fix posn-at-point in Flycheck buffers
2018-06-02 10:29:37 -07:00
Glenn Morris
02c7d45d49 Merge from origin/emacs-26
90bea37 ; * etc/PROBLEMS: Fix fvwm version number in last commit
af82d1f * etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31...
4a3aed2 Update Emacs Lisp Intro to match current behavior
21f2247 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
3257085 Fix previous commit
6d23525 Fix typos in several manuals (Bug#31610)
9188291 Add detailed documentation about lock files
e5471b2 Add commentary for subtle aspect of frame.el

Conflicts:
	doc/lispintro/emacs-lisp-intro.texi
2018-06-02 10:29:37 -07:00
Glenn Morris
0aaf14a441 ; Merge from origin/emacs-26
The following commit was skipped:

61c8434 ; Auto-commit of loaddefs files.
2018-06-02 10:25:50 -07:00
Glenn Morris
42a851c634 Merge from origin/emacs-26
ca3f0a8 ; * etc/NEWS: Belated announcement of 2 changes made in Emacs...
99f92da Improve documentation of 'directory-files-and-attributes'
df8649a * lisp/gnus/message.el (message-remove-header): Don't remove ...
b682a7e ; * etc/NEWS: Add headings for Emacs 26.2
aa175a4 Adapt hexl-mode to native line-number display
b8e7749 Fix example in Tramp manual
f212fe5 Handle case where Xft is found but not XRender
186280f * doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh...
24ba633 Improve read-multiple-choice docstring (Bug#31628)

Conflicts:
	etc/NEWS
	src/dired.c
2018-06-02 10:25:50 -07:00
Alan Third
defd53a56c Set accessibility subroles for child frame (bug#31324)
; Depends on patch in bug#31440.

* src/nsterm.m (x_set_parent_frame): Set subrole depending on whether
frame is a child or not.
2018-06-02 15:31:59 +01:00
Alan Third
de6a876373 Fix redefinition of child frames on NS
* src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing
parent frame, remove it.
2018-06-02 15:31:59 +01:00
Eli Zaretskii
4cfe5312c8 Improve ELisp documentation of 'clone-indirect-buffer'
* doc/lispref/buffers.texi (Indirect Buffers): Be more explicit
about the value of DISPLAY-FLAG in interactive usage.  (Bug#31648)
2018-06-02 14:15:10 +03:00
Eli Zaretskii
9089b0239f Improve documentation of 'inhibit-message'
* src/xdisp.c (syms_of_xdisp) <inhibit-message>: Warn against
setting it non-nil globally.  (Bug#31627)
2018-06-02 14:09:11 +03:00
Eli Zaretskii
6107e12f76 Improve documentation of comment styles
* doc/lispref/syntax.texi (Syntax Flags): Define the "a" style.
(Bug#31624)
2018-06-02 14:01:18 +03:00
Eli Zaretskii
fb45125c80 Documentation improvements in newcomment.el
* lisp/newcomment.el (uncomment-region)
(uncomment-region-default): Doc fixes.  (Bug#31615)
2018-06-02 13:43:43 +03:00
Eli Zaretskii
641c94ce68 Imp[rove documentation of 'with-silent-modifications'
* doc/lispref/buffers.texi (Buffer Modification): Document
'with-silent-modifications'.  (Bug#31613)
* doc/lispref/text.texi (Changing Properties): Add a
cross-reference to "Buffer Modification".  Improve wording.
2018-06-02 13:27:22 +03:00
Eli Zaretskii
4a7e74fea6 Un-obsolete 'string-to-unibyte'
* lisp/subr.el (string-to-unibyte): No longer obsolete.  See the
emacs-devel discussion around this message:
http://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00656.html.

* etc/NEWS: Announce the change.
2018-06-02 13:04:15 +03:00
Eli Zaretskii
6e0ff4cc1f Fix decoding of directories when "~" includes non-ASCII chars
* src/fileio.c (Fexpand_file_name): Don't build multibyte strings
from unibyte non-ASCII strings when NAME and DEFAULT_DIRECTORY
have different multibyteness, as this adds bytes to the byte
sequence, and in some situations, e.g., when the home directory
includes non-ASCII characters, can fail file APIs.  (Bug#30755)

* lisp/startup.el (normal-top-level): Make sure default-directory
is set to a multibyte string when decoded on MS-Windows.

(cherry picked from commit 3aab8626ba)
2018-06-02 12:37:19 +03:00
Eli Zaretskii
35c1ab1419 Don't remove highlight of misspelled word on pdict save
* lisp/textmodes/ispell.el (ispell-pdict-save): Don't restart
flyspell-mode, as bug#11963, which this was supposed to fix, is
fixed better by ispell-command-loop, when the user types 'i' or
'a'.  Restarting Flyspell mode when the personal dictionary is
saved caused bug#31372 as side effect.
(ispell-command-loop): Test 'flyspell-mode', not whether
flyspell-unhighlight-at is fboundp, to determine whether Flyspell
mode is turned on in the current buffer.
(flyspell-unhighlight-at): Add declare-function form for it.

(cherry picked from commit 91e582a31a)
2018-06-02 12:35:42 +03:00
Ari Roponen
aac541e75e Fix some problems in the Cairo build
* src/xterm.c (x_begin_cr_clip): Create image surface.
(x_update_end) [USE_CAIRO]: Remove GTK3-specific code.
(x_scroll_run) [USE_CAIRO]: Implement scrolling.
* src/image.c (lookup_rgb_color) [USE_CAIRO]: Support Cairo.
(jpeg_load_body) [USE_CAIRO]: Support Cairo.  Use USE_CAIRO
instead of CAIRO for #ifdef's.
(imagemagick_load_image) [USE_CAIRO]: Support Cairo.
(Bug#31288)

(cherry picked from commit 2d0eff42b8)
2018-06-02 12:33:13 +03:00
Eli Zaretskii
e96245a549 Avoid infloops in font_open_entity
* src/font.c (font_open_entity): Fail after 15 iterations through
the loop that looks for a font whose average_width and height are
both positive.  This avoids infinite loops for fonts that, e.g.,
report average_width of zero for any possible size we try.
(Bug#31316)

(cherry picked from commit e2879c1f83)
2018-06-02 12:30:30 +03:00
Eli Zaretskii
3a06e72457 Fix encoding of characters when using GB18030 fonts
* lisp/international/fontset.el (font-encoding-alist): Fix the
GB18030 entry to encode characters correctly when passing them to
the xfont back-end.  (Bug#31315)  See also
http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.

(cherry picked from commit bbe2cadc54)
2018-06-02 12:29:15 +03:00
Eli Zaretskii
7782550b3f Fix C-p and C-n when wrap-prefix is too wide
* src/xdisp.c (move_it_in_display_line_to): Avoid looping in
previous/next-line when wrap-prefix is set to a too-wide
stretch of whitespace.  (Bug#30432)

(cherry picked from commit 842b3d7412)
2018-06-02 12:27:22 +03:00
Eli Zaretskii
9804482b02 Avoid redisplay problems with too wide wrap-prefix
* src/xdisp.c (display_line): Avoid looping in redisplay when
wrap-prefix is set to a too-wide stretch of whitespace.
(Bug#30432)

(cherry picked from commit 2a1fe08307)
2018-06-02 12:25:50 +03:00
Eli Zaretskii
5ee9ccf5c9 Fix 'posn-at-point' when line numbers are displayed
* src/xdisp.c (pos_visible_p): For the leftmost glyph, adjust the X
coordinate due to line-number display.  (Bug#30834)

(cherry picked from commit 4a20174d79)
2018-06-02 12:23:49 +03:00
Eli Zaretskii
c4db7662bb Another followup to fixing 'window-text-pixel-width'
* src/xdisp.c (Fwindow_text_pixel_size): Adjust the return value
when we stop one buffer position short of TO.  (Bug#30746)

(cherry picked from commit 33cba5405c)
2018-06-02 12:21:23 +03:00