1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 13:40:36 -08:00
Commit graph

130436 commits

Author SHA1 Message Date
Stefan Monnier
01832ec21f * lisp/progmodes/sh-script.el: Test "in-string" of the right char!
(sh-syntax-propertize-function): Fix off-by-one error.
Fixes bug#23526.
2017-08-29 09:44:19 -04:00
Rasmus
3ad8ca429b Update Org to v9.0.10
Please see etc/ORG-NEWS for major changes. Note, this is a bugfix
release.
2017-08-29 10:13:31 +02:00
Paul Eggert
c1854b1d31 Silence false alarms for symlinks to sources
Problem reported by Glenn Morris (Bug#28264).
* lisp/files.el (files--splice-dirname-file): New function.
(file-truename, file-chase-links): Use it.
2017-08-28 21:51:39 -07:00
Paul Eggert
7b8699759f Simplify remove_slash_colon
* src/process.c (remove_slash_colon): Simplify
and avoid a special case for "/:" by itself.
2017-08-28 21:51:38 -07:00
Tassilo Horn
cd0360fac3 Remove font family from minibuffer-prompt face
* etc/themes/tsdh-light-theme.el (tsdh-light): Remove font family from
minibuffer-prompt face.
2017-08-28 18:13:59 +02:00
Michael Albinus
3a19e6ec23 Further fixes in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-file-truename): New defun.
(tramp-smb-file-name-handler-alist): Use it.
(tramp-smb-handle-make-symbolic-link): Unquote target.

* test/lisp/net/tramp-tests.el
(tramp--test-ignore-make-symbolic-link-error): New defmacro.
(tramp-test18-file-attributes, tramp-test21-file-links)
(tramp--test-check-files): Use it.
2017-08-28 18:08:16 +02:00
Michael Albinus
32cdfa0e9c ; Fix last ido patch 2017-08-28 17:55:31 +02:00
Paul Eggert
b93a5f197e Don’t assume -g3 in .gdbinit
* src/.gdbinit (EMACS_INT_WIDTH, USE_LSB_TAG):
Use reasonable defaults if not in the symbol table.
2017-08-28 08:38:29 -07:00
Robert Pluim
433cf5b204 Use string-match to check for dotfiles in ido
* lisp/ido.el (ido-make-file-list): Use string-match to check
for dotfiles instead of substring, as when using tramp
simplified syntax ido-temp-list may contain empty strings.

Copyright-paperwork-exempt: yes
2017-08-28 09:49:56 +02:00
Mark Oteiza
043a84702f Font-lock FDO desktop files correctly
Single and double quotes do not have a special meaning in
desktop files.
https://standards.freedesktop.org/desktop-entry-spec/latest/
* etc/NEWS: Mention new mode.
* lisp/files.el (auto-mode-alist): Split out an entry for handling
the .desktop extension with conf-desktop-mode.
* lisp/textmodes/conf-mode.el (conf-desktop-font-lock-keywords): New
variable with rules for booleans and format specifiers.
(conf-unix-mode): Remove desktop file entry example from docstring.
(conf-desktop-mode): New derived major mode.
2017-08-27 22:40:52 -04:00
Tom Tromey
9e79a31c09 Fix auto-fill bug in js-mode
* lisp/progmodes/js.el (js-do-auto-fill): New function.
(js-mode): Set normal-auto-fill-function.
* test/lisp/progmodes/js-tests.el (js-mode-fill-comment-bug): New
test.
2017-08-27 12:54:19 -06:00
Noam Postavsky
5440b238b1 Disable completion while entering python multiline statements
The "legacy" completion mechanism sends newlines to the running python
process to get the list of completions, which confuses things if the
user is in the middle of entering a multiline statement (Bug#28051).
It's better to disable completion in this case.
* lisp/progmodes/python.el (python-shell--block-prompt): New variable.
(python-shell-prompt-set-calculated-regexps): Set it.
(python-shell-completion-at-point): Return 'ignore' as the completion
function when the current prompt is a block prompt.
2017-08-27 13:46:41 -04:00
Michael Albinus
79cc9445e1 Tramp cleanup
* lisp/net/tramp-sh.el (tramp-sh-extra-args): Remove compat code.
(tramp-sh-handle-make-symbolic-link): More robust check for
TARGET remoteness.

* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
Disable copying by tar temporarily, it doesn't work reliably.
(tramp-smb-do-file-attributes-with-stat): Resolve symlink.
(tramp-smb-handle-make-symbolic-link): Fix implementation.

* lisp/net/tramp.el (tramp-handle-file-symlink-p): Simplify.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Extend test.
2017-08-27 19:16:58 +02:00
Glenn Morris
c99507645a Fix previous xterm.h change for non-gtk builds
* src/xterm.h (GTK_CHECK_VERSION) [!USE_GTK]: Define it.
2017-08-27 10:06:30 -07:00
Philipp Stephani
853ed4533b Fix GdkSettings-related deprecation warnings
* src/gtkutil.c (xg_initialize): Don’t set deprecated and ignored
gtk-menu-bar-accel setting in new versions of GTK+.  Use g_object_set
instead of deprecated gtk_settngs_set_string_property otherwise.
2017-08-27 15:00:18 +02:00
Philipp Stephani
fe49aa17d5 Always use gtk_window_move in new versions
* src/gtkutil.c (my_log_handler): Don’t define in new versions of
GTK+.
(xg_set_geometry): Always use gtk_window_move in new versions of GTK+.

* src/xterm.c (syms_of_xterm): Document that x-gtk-use-window-move
is ignored.

* lisp/subr.el (x-gtk-use-window-move): Make obsolete.
2017-08-27 14:45:58 +02:00
Charles A. Roelli
208a3cb05f Fix 'diff-goto-source' when buffer is narrowed (Bug#21262)
* lisp/vc/diff-mode.el (diff-find-file-name): Save the current
narrowing, and widen the buffer before searching for the name of the
file corresponding to the diff.

With thanks to Noam Postavsky.
2017-08-27 14:14:46 +02:00
Philipp Stephani
d309ce4299 Remove use of a deprecated GTK+ function in new versions
* src/gtkutil.c (xg_make_tool_item): Use gtk_widget_set_focus_on_click
if available
2017-08-27 14:09:36 +02:00
Philipp Stephani
2132629573 Stop using deprecated GdkScreen monitor functions in newer GDK
* src/xfns.c (Fx_display_monitor_attributes_list): Use GdkMonitor
objects instead of the deprecated GdkScreen functions in GDK 3.22+
2017-08-27 14:05:40 +02:00
Philipp Stephani
7cb3d3bba1 Use GdkSeat in new GDK versions
* src/gtkutil.c (xg_event_is_for_scrollbar): Use GdkSeat instead of
GdkDeviceManager in GDK 3.20+
2017-08-27 13:53:36 +02:00
Philipp Stephani
982ec0398c * src/xterm.c (XTflash): Don’t use gdk_cairo_create in GDK 3.22+ 2017-08-27 13:44:47 +02:00
Philipp Stephani
a1faaf3092 Remove call of deprecated GDK function
* src/xterm.h (XSync): Don’t call gdk_window_process_all_updates in
GDK 3.22 or later.
2017-08-27 13:27:02 +02:00
Alan Mackenzie
a2c967e28b Amend the CC Mode macro cache to cope with changes at the macro start
Fixes bug #28233.

* lisp/progmodes/cc-engine.el (c-invalidate-macro-cache): Fix an off-by-1
error.
2017-08-27 10:38:47 +00:00
Paul Eggert
231bfd6818 Fix over-protection of byte-compiled files
Problem reported by Sven Joachim (Bug#28244).
Also, fix similar problem for autoload files.
* lisp/emacs-lisp/autoload.el (autoload--save-buffer):
Set temp file modes to the buffer-file-name file modes (or 666
if not available) as adjusted by umask.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Set temp file modes to 666 as adjusted by umask.
2017-08-26 23:07:58 -07:00
Tom Tromey
1be689fbc4 Refine conf-toml-mode font-lock
Bug#28218
* lisp/textmodes/conf-mode.el (conf-toml-font-lock-keywords): Use
conf-toml-recognize-section.  Use \s- in variable regexp.
(conf-toml-recognize-section): New function.
2017-08-26 20:36:51 -06:00
Paul Eggert
e8001d4c27 Do not munge contents of local symbolic links
This lets Emacs deal with arbitrary local symlinks without
mishandling their contents (Bug#28156).  For example,
(progn (shell-command "ln -fs '~' 'x'") (rename-file "x" "/tmp/x"))
now consistently creates a symbolic link from '/tmp/x' to '~'.
Formerly, it did that only if the working directory was on the
same filesystem as /tmp; otherwise, it expanded the '~' to
the user's home directory.
* lisp/dired.el (dired-get-filename): Use files--name-absolute-system-p
instead of rolling our own code.
* lisp/files.el (files--name-absolute-system-p): New function.
(file-truename, file-chase-links): Use it to avoid mishandling
symlink contents that begin with ~.
(copy-directory, move-file-to-trash):
Use concat rather than expand-file-name, to avoid mishandling
symlink contents that begin with ~.
* src/fileio.c (Fmake_symbolic_link): Do not expand leading "~" in the
target unless interactive.  Strip leading "/:" if interactive.
(emacs_readlinkat): Do not prepend "/:" to the link target if
it starts with "/" and contains ":" before NUL.
* test/src/fileio-tests.el (try-link): Rename from try-char,
and accept a string instead of a char.  All uses changed.
(fileio-tests--symlink-failure): Also test leading ~, and "/:",
to test the new behavior.
2017-08-26 18:36:38 -07:00
Reuben Thomas
937d9d7f60 Remove invalid regexp for shell builtins for wksh
* lisp/progmodes/sh-script.el (sh-builtins): Shell built-ins have to
be literal strings, so remove a regexp for wksh. In any case, it’s a
defunct proprietary shell.
2017-08-27 00:27:53 +01:00
Paul Eggert
0becd64d63 Improve doc for file-name-absolute-p. 2017-08-26 13:45:25 -07:00
Michael Albinus
cc7530cae0 Fix Tramp part of Bug#28156
* lisp/files.el (file-name-non-special): Use `file-name-quote'
instead prefixing "/:", the file could already be quoted.

* lisp/net/tramp.el (tramp-error): Handle null arguments.
(tramp-handle-make-symbolic-link):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-add-name-to-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
(tramp-smb-handle-make-symbolic-link): Adapt implementation to
stronger semantics in Emacs.  (Bug#28156)

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Extend test.
2017-08-26 15:09:55 +02:00
Eli Zaretskii
dcc3ef3ee7 Fix bugs merged with bug#25428
* lisp/simple.el (auto-fill-mode, visual-line-mode): Doc fix.
(Bug#13926)  (Bug#25434)  (Bug#25435)
2017-08-26 12:52:07 +03:00
Eli Zaretskii
5bb61463a2 Improve documentation of Info virtual files and nodes
* lisp/info.el (Info-virtual-files, Info-virtual-nodes): Doc fix.
(Bug#28237)
2017-08-26 12:40:02 +03:00
Eli Zaretskii
fca62645b6 * lisp/delsel.el (delete-selection-mode): Doc fix. (Bug#25428) 2017-08-26 12:01:24 +03:00
Grégory Mounié
21a9e5253e Support multi-lingual detection of SEE ALSO man sections
* lisp/man.el (Man-see-also-regexp): Add support for SEE ALSO
section detection in several langages: French, German, Spanish,
Portugese, Italian, Polish, Turkish, Japanese, Chinese.  (Bug#28142)

Copyright-paperwork-exempt: yes
2017-08-26 11:36:58 +03:00
Paul Eggert
05f9ffd53c Improve expand-file-name doc
* doc/lispref/files.texi (Relative File Names, Directory Names)
(File Name Expansion):
* doc/lispref/minibuf.texi (Reading File Names):
Document expand-file-name behavior with ~ more clearly
and accurately.
* doc/misc/org.texi (Batch execution): Simplify example
script so that it does not need expand-file-name and thus
will not mishandle file names with leading ~.
2017-08-25 21:14:06 -07:00
Jefferson Carpenter
feecb66b6f Support all perl variable declarators and prefixes (Bug#27613)
* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression)
(perl-font-lock-keywords-2): Match declators 'anon', 'argument', 'has',
'local', 'state', 'supersede', 'let', and 'temp'.

Copyright-paperwork-exempt: yes
2017-08-25 22:50:15 -04:00
Noam Postavsky
a7ed4ec095 ; * doc/lispref/files.texi (File Attributes): Add missing word. 2017-08-25 22:47:51 -04:00
Paul Eggert
2b7e009257 Fix file-attributes race on GNU hosts
* doc/lispref/files.texi (File Attributes):
Document file-attributes atomicity.
* etc/NEWS: Document the fix.
* src/dired.c (file_attributes): New args DIRNAME and FILENAME,
for diagnostics.  All callers changed.  On platforms like
GNU/Linux that support O_PATH, fix a race condition in
file-attributes and similar functions, so that these functions do
not return nonsense if a directory entry is replaced while getting
its attributes.  On non-GNU platforms, do a better (though not
perfect) job of detecting the race, and return nil if detected.
2017-08-25 13:19:45 -07:00
Paul Eggert
9a223dab90 Simplify expand_and_dir_to_file
* src/fileio.c (expand_and_dir_to_file): Simplify by omitting 2nd
argument, since in practice it always has the default value.  All
callers changed.  Prefer C99 style decls in nearby code.
2017-08-25 09:32:09 -07:00
Eli Zaretskii
579890f1c7 ; * src/w32.c (faccessat): Fix last change. (Bug#28207) 2017-08-25 18:01:19 +03:00
Eli Zaretskii
0d2b409398 Fix file-name completion on network shares
* src/w32.c (faccessat): Don't assume that F_OK is non-zero.
(Bug#28207)
2017-08-25 17:43:15 +03:00
Reuben Thomas
690512d2af Fix a FIXME with an exegetical comment
* lisp/progmodes/sh-script.el (sh-builtins): Explain why we have a
regexp for wksh builtins.
2017-08-25 13:59:21 +01:00
Reuben Thomas
38daeca937 Minor docstring language fix
* lisp/progmodes/sh-script.el (sh-show-indent): Remove spurious “the”.
2017-08-25 13:49:06 +01:00
Reuben Thomas
ca30d22fba Remove old commented code from sh-script.el
* lisp/progmodes/sh-script.el (sh-abbrevs): Remove commented function
and variable, commented since 2001.
2017-08-25 13:49:06 +01:00
Stefan Monnier
1bd1658111 * lisp/emacs-lisp/package.el: Don't let failure stop us
(package-activate-1): Don't throw an error for missing deps.
(package-unpack): Don't bother compiling if activation failed.
(package-initialize): Report failures but keep activating other packages.
2017-08-25 02:10:53 -04:00
Paul Eggert
daf434b40d Prefer ‘double’ for FP temps in xterm.c
* src/xterm.c (xm_scroll_callback, xaw_jump_callback)
(x_set_toolkit_scroll_bar_thumb)
(x_set_toolkit_horizontal_scroll_bar_thumb): Prefer ‘double’ to
‘float’ for individual local floating-point temporaries.
2017-08-24 16:17:39 -07:00
Reuben Thomas
bd9ad2ea10 Avoid using string-to-multibyte in ispell.el
* lisp/textmodes/ispell.el (ispell-get-decoded-string): Use
decode-coding-string instead. Note that decode-coding-string returns a
string that satisfies multibyte-string-p even if its input is pure
ASCII and the third argument is t, so the result of
ispell-get-decoded-string is always a multibyte string.
2017-08-24 18:53:28 +01:00
Tino Calancha
22ebde63c9 Store the regexp just when there are matches
* lisp/hi-lock.el (hi-lock-set-pattern): When font-lock-mode is
disabled and there are no matches do not store REGEXP
in hi-lock-interactive-patterns.
2017-08-25 00:24:59 +09:00
Tino Calancha
303481b4ec Keep face available if there are no matches
If font-lock-mode is disabled in the current buffer, and
there are no matches for REGEXP, then keep FACE available
for a next search.
* lisp/hi-lock.el (hi-lock-set-pattern): Add FACE into
hi-lock--unused-faces if font-lock-mode is disabled and
there are no matches.
* test/lisp/hi-lock-tests.el (hi-lock-test-set-pattern): Add test.
2017-08-25 00:09:50 +09:00
Michael Albinus
0332a0ef2b Minor improvements for tramp-interrupt-process, documentation
* doc/lispref/processes.texi (Signals to Processes):
* etc/NEWS: Document interrupt-process-functions.

* lisp/net/tramp.el (tramp-interrupt-process): Test also for
`process-live-p'.

* src/process.c (Vinterrupt_process_functions): Fix docstring.

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
Extend test.
2017-08-24 15:53:56 +02:00
Reuben Thomas
fa5e63e404 Fix a comment whitespace typo.
src/fileio.c: A double space was added after "..", used in a code
example. Make it a single space.
2017-08-23 23:52:24 +01:00