1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00
Commit graph

130297 commits

Author SHA1 Message Date
Paul Eggert
e13bdfee17 Make garbage collection more conservative
Check for a pointer anywhere within the object, as opposed to just
the start of the object.  This is needed for gcc -Os -flto on
x86-64 (Bug#28213).  This change means that the garbage collector
is more conservative, and will incorrectly keep objects that it
does not need to, but that is better than incorrectly discarding
objects that should be kept.
* src/alloc.c (ADVANCE, VINDEX): Now functions, not macros;
this is easier to debug.
(setup_on_free_list): Rename from SETUP_ON_FREE_LIST.
Now a function with two args, not a macro with three.
All callers changed.
(live_string_holding, live_cons_holding, live_symbol_holding)
(live_misc_holding, live_vector_holding, live_buffer_holding):
New functions, which check for any object containing the addressed
byte, not just for an object at the given address.
(live_string_p, live_cons_p, live_symbol_p, live_misc_p)
(live_vector_p, live_buffer_p):
Redefine in terms of the new functions.
(live_float_p): Refactor slightly to match the new functions.
(mark_maybe_object, mark_maybe_pointer): Use the new functions.
Don’t bother checking mark bits, as mark_object already does that,
and omitting the checks here simplifies the code.  Although
mark_maybe_object can continue to insist that tagged pointers
still address the start of the object, mark_maybe_pointer now is
more conservative and checks for pointers anywhere into an object.
2017-08-29 14:58:49 -07:00
Paul Eggert
9baeed3514 Improve stack-top heuristic
This is needed for gcc -Os -flto on x86-64; otherwise, GC misses part
of the stack when scanning for heap roots, causing Emacs to crash
later (Bug#28213).  The problem is that Emacs's hack for getting an
address near the stack top does not work when link-time optimization
moves stack variables around.
* configure.ac (HAVE___BUILTIN_FRAME_ADDRESS): New macro.
* lib-src/make-docfile.c (DEFUN_noinline): New constant.
(write_globals, scan_c_stream): Support noinline.
* src/alloc.c (NEAR_STACK_TOP): New macro.
(SET_STACK_TOP_ADDRESS): Use it.
(flush_stack_call_func, Fgarbage_collect): Now noinline.
2017-08-29 14:58:49 -07:00
Paul Eggert
f1fdb5bc57 Align stack bottom properly.
This is needed for gcc -Os -flto on x86-64 (Bug#28213).
* src/emacs.c (main): Align stack-bottom variable as a pointer,
since mark_memory requires this.
2017-08-29 14:58:48 -07:00
Eli Zaretskii
02255c5fbc Avoid spinning waiting for git-gui.exe on Windows
* src/w32proc.c (waitpid): If GetExitCodeProcess returns
STILL_ACTIVE, and we were called with WNOHANG, pretend that the
process exited.  (Bug#28268)
2017-08-29 21:53:49 +03:00
Eli Zaretskii
1454ad6f06 Document '--module-assertions'
* doc/emacs/cmdargs.texi (Initial Options): Document the
'--module-assertions' command-line option.
* doc/lispref/loading.texi (Dynamic Modules): Add a
cross-reference to the description of '--module-assertions'.

* etc/NEWS: Update the NEWS entry for --module-assertions.
2017-08-29 19:39:15 +03:00
Alan Third
67e565fad5 Add news entry about new macOS features
* etc/NEWS: Add entry about ns-appearance, ns-transparent-titlebar and
ns-use-thin-smoothing.
2017-08-29 17:19:05 +01:00
Alan Third
fdde98113c Fix cross macOS version building (bug#28222)
* src/macfont.h (CGContextSetFontSmoothingStyle): Function
declaration.
* src/macfont.m (macfont_draw): Limit new code to macOS 10.8 and up.
2017-08-29 17:19:05 +01:00
Ben Bonfil
1b0d72244d Enable thin font smoothing in macOS (bug#28222)
* src/nsterm.m (syms_of_nsterm): Define var ns-use-thin-smoothing.
* src/macfont.m (macfont_draw): Use font smoothing.

Copyright-paperwork-exempt: yes
2017-08-29 17:19:04 +01:00
Eli Zaretskii
573ccb9803 Minor improvement in documentation of display-line-numbers
* doc/emacs/display.texi (Display Custom): Document the
display-line-numbers-mode and related options.
2017-08-29 19:13:19 +03:00
Eli Zaretskii
bf0045d7a4 Avoid aborting in 'waitpid' on MS-Windows
* src/w32proc.c (waitpid): Don't allow quitting if called with
WNOHANG in OPTIONS.  (Bug#28268)
2017-08-29 18:13:44 +03:00
Rasmus
b65cb981cc ; Fix Org sync 3ad8ca429b
* etc/refcards/orgcard.tex: Restore dropped line from 54aadd94f

See http://permalink.gmane.org/gmane.emacs.devel/217877
2017-08-29 16:52:16 +02:00
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