1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-03 20:24:29 +00:00

133228 Commits

Author SHA1 Message Date
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
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
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 3aab8626ba5080bb04d0fdae52d99c850a842a52)
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 91e582a31ada28fab5ae55bdbf959a9d30796587)
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 2d0eff42b8f1122e00f948759ed01a3be1a8c3fc)
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 e2879c1f837059335af89022b2a9ac9bc861e96d)
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 bbe2cadc544e63e9378350621887f8fb9bbcc236)
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 842b3d7412eaed6b2c9f90c3361abb4932ec0b1d)
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 2a1fe08307402d6217d073f8ab7737750d253dd4)
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 4a20174d7949028f66b18a92a75d6b74194242a8)
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 33cba5405c724566673cf023513bfb1faa963bea)
2018-06-02 12:21:23 +03:00
Eli Zaretskii
a6cf7be3f0 Fix mouse-set-point when line numbers are displayed
* src/xdisp.c (move_it_to): Initialize the line_number_produced_p
flag before iterating on a new line.  (Bug#30818)

(cherry picked from commit 5c585b8b994aad4e6844f8eed80bdfbb396e91bf)
2018-06-02 12:19:42 +03:00
Eli Zaretskii
ae78b14290 * src/xdisp.c (Fwindow_text_pixel_size): Fix last change.
(cherry picked from commit 06911714ef66ea81380b1eda75a9f7cfbc9e0b65)
2018-06-02 12:18:56 +03:00
Eli Zaretskii
f1f12d8be3 Fix 'window-text-pixel-size' when display properties are around
* src/xdisp.c (Fwindow_text_pixel_size): Correct the result when
there's a display property at the  TO position, and the call to
move_it_to overshoots.  (Bug#30746)

(cherry picked from commit 50e2c0fb5180a757d8d533518f68837ffe5909be)
2018-06-02 12:17:16 +03:00
Eli Zaretskii
8b2b4b580c Fix display of TABs in hscrolled windows with line numbers
* src/dispextern.h (struct it): New members tab_offset and
line_number_produced_p.
* src/xdisp.c (display_line): Don't set row->x to a negative value
if line numbers are being displayed.  (Bug#30582)
Reset the line_number_produced_p flag before laying out the glyph
row.
(x_produce_glyphs): Use the line_number_produced_p flag to decide
whether to offset the X coordinate due to line-number display.
Use the tab_offset member to restore the original TAB width for
alignment purposes.
(move_it_in_display_line_to): Don't produce line numbers when moving
in hscrolled window to the left of first_visible_x.
(maybe_produce_line_number): Set the line_number_produced_p flag.
(Bug#30584)
* src/term.c (produce_glyphs): Correct TAB width only when
line_number_produced_p flag is set.

(cherry picked from commit 1ac190553886ff20817d3dd218464e2fc6f9e42a)
2018-06-02 12:15:14 +03:00
Matthias Dahl
de69d28458 Fix wait_reading_process_output wait_proc hang
* src/process.c (read_process_output): Track bytes read from
a process.
(wait_reading_process_output): If called recursively through
timers and/or process filters via accept-process-output, it is
possible that the output of wait_proc has already been read by
one of those recursive calls, leaving the original call hanging
forever if no further output arrives through that fd and no
timeout has been set.  Fix that by using the process read
accounting to keep track of how many bytes have been read and
use that as a condition to break out of the infinite loop and
return to the caller as well as to calculate the proper return
value (if a wait_proc is given that is).

* src/process.h (struct Lisp_Process): Add nbytes_read to track
bytes read from a process.

(cherry picked from commit 4ba32858d61eee16f17b51aca01c15211a0912f8)
2018-06-02 12:13:12 +03:00
Eli Zaretskii
76f692e82f Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 2018-06-02 12:10:51 +03:00
Eli Zaretskii
ddd1b957e9 Fix posn-at-point in Flycheck buffers
* src/dispnew.c (buffer_posn_from_coords): Improve commentary.

* src/xdisp.c (move_it_in_display_line_to): Don't exit the loop
under truncate-lines if the glyph at TO_CHARPOS was not yet
produced.  This avoids bailing out too early when we are at
TO_CHARPOS, but didn't yet produce glyphs for that buffer
position, because the last call to PRODUCE_GLYPHS at this position
was for an object other than the buffer.  For further details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html.

(cherry picked from commit c0154ac7c3423f68d8f3a2e85a756c9759219039)
2018-06-02 12:08:48 +03:00
Martin Rudalics
90bea37d46 ; * etc/PROBLEMS: Fix fvwm version number in last commit 2018-06-02 11:05:52 +02:00
Martin Rudalics
af82d1f4bd * etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31650) 2018-06-02 09:49:13 +02:00
John Shahid
9ac76456eb Fix column double counting in term.el (Bug#31662)
* lisp/term.el (term-emulate-terminal): Invalidate
`term-current-column' after deleting overwritten text.
2018-06-01 23:06:34 -04:00
João Távora
6a672b7925 Minimally support Flymake in Emacs C sources
The check-syntax target is enabled the use of Flymake's "legacy"
backend, flymake-proc-legacy-flymake in src/*.c.  It works quite well
with C sources.  The green light for this change had already been
given some time ago in

https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00385.html

* src/Makefile.in (check-syntax): New target.
(.PHONY): Add check-syntax.
2018-06-02 01:47:19 +01:00
Eli Zaretskii
4a3aed2507 Update Emacs Lisp Intro to match current behavior
* doc/lispintro/emacs-lisp-intro.texi (Wrong Type of Argument)
(debug, debug-on-entry, Void Function, Void Variable): Update the
*Backtrace* buffer display to current Emacs.  (Bug#31654)
2018-06-01 17:11:36 +03:00
Eli Zaretskii
21f2247cf4 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 2018-06-01 17:10:46 +03:00
Ville Skyttä
86ace8fbf6 Fix a typo in emacs-mime.texi (Bug#31610)
Copyright-paperwork-exempt: yes
2018-06-01 16:38:09 +03:00
Robert Pluim
3257085443 Fix previous commit
* doc/emacs/files.texi (Interlocking): Two spaces at end of sentence
2018-06-01 15:34:33 +02:00
Ville Skyttä
6d2352594f Fix typos in several manuals (Bug#31610)
Copyright-paperwork-exempt: yes
2018-06-01 16:33:58 +03:00
Robert Pluim
9188291f7a Add detailed documentation about lock files
* doc/emacs/files.texi (Interlocking): Point user at detailed
file locking description in lisp reference manual.  Add index
entry for '.#' to improve disoverability of information about locking.

* doc/lispref/files.texi (File Locks): Describe in detail what
the form of the lock file is.  Add index entry for '.#' to
improve disoverability of information about locking.

* src/filelock.c (create-lockfiles): Add cross reference to
file locking in user manual and to 'lock-buffer'.  Add string
'.#' to help users find the doc string.
2018-06-01 15:06:20 +02:00
Eli Zaretskii
e5471b2381 Add commentary for subtle aspect of frame.el
* lisp/frame.el: Explain why we use symbol-function when adding
watchers for certain variables that need to trigger redisplay.
2018-06-01 15:34:30 +03:00
Glenn Morris
2746040a0b ; Auto-commit of loaddefs files. 2018-06-01 07:32:59 -04:00
Glenn Morris
61c8434fec ; Auto-commit of loaddefs files. 2018-06-01 06:30:31 -04:00
Eli Zaretskii
ca3f0a8343 ; * etc/NEWS: Belated announcement of 2 changes made in Emacs 26.1. 2018-06-01 11:37:56 +03:00
Eli Zaretskii
99f92dab3d Improve documentation of 'directory-files-and-attributes'
* doc/lispref/files.texi (Contents of Directories): Fix inaccurate
description of the return value of directory-files-and-attributes.

* src/dired.c (Fdirectory_files_and_attributes): Describe the
function's value in more detail.
2018-06-01 11:27:29 +03:00
Robert Pluim
c0a0351249 Obsolete image-jpeg-p
* lisp/image.el (image-jpeg-p): Declare obsolete.
2018-05-31 17:14:28 +02:00
Lars Ingebrigtsen
8ca4228393 Fdirectory_files_and_attributes doc string clarification
* src/dired.c (Fdirectory_files_and_attributes): Clarify what data
is returned.
2018-05-31 13:52:32 +02:00
Alan Mackenzie
e50634c354 Amend c-before-change-check-unbalanced-strings to handle a quote at EOB.
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Before
going back a sexp from the \n marked with a string-fence syntax-table text
property, check that it is indeed a \n.  If not, simply delete that text
property from the isolated quote, not the quote and the \n which otherwise
delimit an unterminated string.  Should we encounter a double quote marked
with a string-fence syntax-table text property at the end of the last line,
remove that property.
2018-05-31 11:32:15 +00:00