]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoSet frame size to actual requested size (bug#18215)
Alan Third [Sat, 2 Sep 2017 17:32:08 +0000 (18:32 +0100)]
Set frame size to actual requested size (bug#18215)

* src/nsterm.m (x_set_window_size): Don't use
FRAME_TEXT_TO_PIXEL_WIDTH or FRAME_TEXT_TO_PIXEL_HEIGHT.

7 years agoautogen.sh: omit bogus chatter if no .git
Paul Eggert [Thu, 7 Sep 2017 07:10:05 +0000 (00:10 -0700)]
autogen.sh: omit bogus chatter if no .git

Problem reported by Angelo Graziosi in:
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00045.html
* autogen.sh (git_config): Do not execut 'git' if $do_git fails.

7 years agoSkip emacsclient tests if --enable-profiling was used
Glenn Morris [Thu, 7 Sep 2017 00:06:57 +0000 (20:06 -0400)]
Skip emacsclient tests if --enable-profiling was used

* test/lib-src/emacsclient-tests.el
(emacsclient-test-call-emacsclient): Make it a macro.
Handle "Profiling timer expired" return from emacsclient.  (Bug#28319)
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes): Update for above.

7 years agoFix a minor markup problem in ELisp manual
Eli Zaretskii [Wed, 6 Sep 2017 18:00:29 +0000 (21:00 +0300)]
Fix a minor markup problem in ELisp manual

* doc/lispref/functions.texi (Mapping Functions): Fix the order of
@example and @group.  For the details, see
http://lists.gnu.org/archive/html/bug-texinfo/2017-09/msg00007.html.

7 years agoAdd XDG desktop file parsing and tests
Mark Oteiza [Wed, 6 Sep 2017 17:17:05 +0000 (13:17 -0400)]
Add XDG desktop file parsing and tests

* lisp/xdg.el: Add support for Desktop Entry Specification.
(xdg--user-dirs-parse-line): Check if file is readable.
(xdg-desktop-group-regexp, xdg-desktop-entry-regexp): New variables.
(xdg--desktop-parse-line, xdg-desktop-read-file, xdg-desktop-strings):
New functions.
* test/lisp/xdg-tests.el:
* test/data/xdg/test.desktop:
* test/data/xdg/wrong.desktop: New files.

7 years ago; Try not to affect match data
Mark Oteiza [Wed, 6 Sep 2017 15:20:21 +0000 (11:20 -0400)]
; Try not to affect match data

* lisp/xdg.el (xdg-user-dir): Use save-match-data.

7 years ago; * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Fix tag.
Glenn Morris [Wed, 6 Sep 2017 00:53:57 +0000 (20:53 -0400)]
; * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Fix tag.

7 years agoAllow for adjusting line length of test backtraces
Glenn Morris [Wed, 6 Sep 2017 00:46:38 +0000 (20:46 -0400)]
Allow for adjusting line length of test backtraces

* test/Makefile.in (TEST_BACKTRACE_LINE_LENGTH): New option.
(%.log): Respect backtrace line length.

7 years agoAllow customizing line length of ert backtraces in batch mode
Glenn Morris [Wed, 6 Sep 2017 00:40:10 +0000 (20:40 -0400)]
Allow customizing line length of ert backtraces in batch mode

* lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin):
Make it a user option.
(ert-run-tests-batch): Handle ert-batch-backtrace-right-margin nil.

7 years agoMinor emacsclient-tests simplification
Glenn Morris [Tue, 5 Sep 2017 22:55:49 +0000 (18:55 -0400)]
Minor emacsclient-tests simplification

* test/lib-src/emacsclient-tests.el (emacsclient-test-emacs):
Simplify.  Also work when running installed.

7 years agoRevert "Force screen update after drawing cursor glyph (bug#23774)"
Alan Third [Tue, 5 Sep 2017 22:40:46 +0000 (23:40 +0100)]
Revert "Force screen update after drawing cursor glyph (bug#23774)"

This reverts commit 1b492fa5456e2b6face8d0856f11d17e432693b0.

See bug#28358

7 years agoRefactor some loops in mailcap.el
Mark Oteiza [Tue, 5 Sep 2017 20:39:21 +0000 (16:39 -0400)]
Refactor some loops in mailcap.el

* lisp/net/mailcap.el (mailcap-mime-types):
(mailcap-file-default-commands): Convert nested maps to loops.

7 years agoemacsclient-tests: remove some debug statements
Glenn Morris [Tue, 5 Sep 2017 20:01:11 +0000 (16:01 -0400)]
emacsclient-tests: remove some debug statements

* test/lib-src/emacsclient-tests.el
(emacsclient-test-call-emacsclient): Remove debug statements.

7 years agoHandle non-zero exit status from psql more gracefully
Simen Heggestøyl [Wed, 9 Aug 2017 13:34:34 +0000 (15:34 +0200)]
Handle non-zero exit status from psql more gracefully

* lisp/progmodes/sql.el (sql-postgres-list-databases): Handle non-zero
exit statuses from `psql -ltX' more gracefully by returning nil.

* test/lisp/progmodes/sql-tests.el
(sql-tests-postgres-list-databases-error): New test.

7 years agoAvoid losing Ctrl-C keystrokes in compilation mode on MS-Windows
Eli Zaretskii [Tue, 5 Sep 2017 17:33:40 +0000 (20:33 +0300)]
Avoid losing Ctrl-C keystrokes in compilation mode on MS-Windows

* src/w32proc.c (sys_kill): Preserve the up/down state of the
Ctrl key across the simulated Ctrl-C keystroke.  (Bug#28348)

7 years ago* src/image.c (Fimagemagick_types): Doc fix.
Andreas Schwab [Tue, 5 Sep 2017 16:58:37 +0000 (18:58 +0200)]
* src/image.c (Fimagemagick_types): Doc fix.

7 years agoMove soundex.el test to a proper test
Mark Oteiza [Tue, 5 Sep 2017 16:03:10 +0000 (12:03 -0400)]
Move soundex.el test to a proper test

* test/lisp/soundex-tests.el: New file.
* lisp/soundex.el: Use lexical-binding.  Remove commented test.

7 years agoAdd tests for mailcap.el
Mark Oteiza [Tue, 5 Sep 2017 15:53:37 +0000 (11:53 -0400)]
Add tests for mailcap.el

* test/data/mailcap/mime.types: New file.
* test/lisp/net/mailcap-tests.el: New file.

7 years agoDoc precisment about remote link targets
Michael Albinus [Tue, 5 Sep 2017 13:32:03 +0000 (15:32 +0200)]
Doc precisment about remote link targets

* doc/lispref/files.texi (Truenames): Explain handling of
targets of `file-truename' and `make-symbolic-link', which
look like a remote file name.

* etc/NEWS: Precise examples for symlinks which look like
remote file names.  MUSTBENEW of `write-region' is not
propagated to file name handlers.

7 years agoRemove an opinionated section on "What Eshell is not"
John Wiegley [Tue, 5 Sep 2017 13:24:25 +0000 (14:24 +0100)]
Remove an opinionated section on "What Eshell is not"

I don't find this information to accurately reflect possible use cases
for Eshell; plus, it doesn't offer much in the way of information,
just opinion.

7 years agoFix configure test for Xpm
Ken Brown [Tue, 5 Sep 2017 01:46:05 +0000 (21:46 -0400)]
Fix configure test for Xpm

Problem reported by Ashish Shukla in
https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00020.html.
* configure.ac (HAVE_XPM) [HAVE_X11]: Include X11/xpm.h instead of
noX/xpm.h in configure test.

7 years agoRevert recent float→double Motif change
Paul Eggert [Mon, 4 Sep 2017 19:08:55 +0000 (12:08 -0700)]
Revert recent float→double Motif change

Problem reported by Martin Rudalics in:
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00014.html
* src/xterm.c (xm_scroll_callback, xaw_jump_callback)
(x_set_toolkit_scroll_bar_thumb)
(x_set_toolkit_horizontal_scroll_bar_thumb):
Go back to using ‘float’ temporaries rather than ‘double’.
Although quite possibly this masks an underlying bug,
we lack time to look into that now.

7 years agoemacsclient-tests: add some debug statements
Glenn Morris [Mon, 4 Sep 2017 16:21:24 +0000 (09:21 -0700)]
emacsclient-tests: add some debug statements

* test/lib-src/emacsclient-tests.el
(emacsclient-test-call-emacsclient): Add debug statements.

7 years agoWork on Tramp's (symbolic) links
Michael Albinus [Mon, 4 Sep 2017 11:10:52 +0000 (13:10 +0200)]
Work on Tramp's (symbolic) links

* doc/misc/tramp.texi (Traces and Profiles): Mention the
backtrace when tramp-verbose is greater than or equal to 10.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-add-name-to-file'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
`tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_CONNECTION_DISCONNECTED" and
"NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
(tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
(tramp-smb-do-file-attributes-with-stat): Return non-nil only
if one of the attributes is non-nil.
(tramp-smb-handle-file-local-copy): Use `file-truename'.
(tramp-smb-handle-file-truename): Move to tramp.el.
(tramp-smb-handle-insert-directory): Show symlinks.
(tramp-smb-handle-make-symbolic-link): Improve.
(tramp-smb-read-file-entry): Handle extended file modes in Samba.

* lisp/net/tramp.el (tramp-handle-add-name-to-file)
(tramp-handle-file-truename): New defuns.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp--test-check-files): Make check for "smb".

7 years agoEmbed JSON readtable into json-read
Mark Oteiza [Mon, 4 Sep 2017 07:40:30 +0000 (03:40 -0400)]
Embed JSON readtable into json-read

Also unroll dispatch into a cond.
* lisp/json.el (json-readtable): Remove.
(json-readtable-dispatch): New macro.  Assimilate json-readtable.
(json-read): Use the macro.

7 years agoHexify strings in EWW search queries
Mark Oteiza [Mon, 4 Sep 2017 00:42:01 +0000 (20:42 -0400)]
Hexify strings in EWW search queries

Previously, inputting "cats & dogs" would lose dogs because the
ampersand signifies a query parameter.  Instead, hexify each word while
preserving quotes with split-string.
* lisp/net/eww.el (eww--dwim-expand-url): Join hexified words together
with + separators, instead of replacing whitespace with +.

7 years agoemacsclient-tests: call-process may return non-integer
Glenn Morris [Sun, 3 Sep 2017 17:55:45 +0000 (10:55 -0700)]
emacsclient-tests: call-process may return non-integer

* test/lib-src/emacsclient-tests.el
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes):
Handle non-integer return from call-process.

7 years ago; Drop note about tracing X protocol errors from a TTY based server
Martin Rudalics [Sun, 3 Sep 2017 17:27:52 +0000 (19:27 +0200)]
; Drop note about tracing X protocol errors from a TTY based server

* etc/DEBUG: Drop note about how to trace X protocol errors when
a GUI client connects to a server running from a text terminal.

7 years ago* lisp/simple.el (visual-line-mode): Doc fix. (Bug#28337)
Eli Zaretskii [Sun, 3 Sep 2017 15:20:31 +0000 (18:20 +0300)]
* lisp/simple.el (visual-line-mode): Doc fix.  (Bug#28337)

7 years agoForce screen update after drawing cursor glyph (bug#23774)
Alan Third [Sun, 3 Sep 2017 12:51:14 +0000 (13:51 +0100)]
Force screen update after drawing cursor glyph (bug#23774)

* src/nsterm.m (ns_draw_window_cursor): Force a screen update after
drawing the glyph over the cursor.

7 years agoCorrect the fontification of quote marks after buffer changes in CC Mode.
Alan Mackenzie [Sun, 3 Sep 2017 11:01:21 +0000 (11:01 +0000)]
Correct the fontification of quote marks after buffer changes in CC Mode.

* lisp/progmodes/cc-defs.el
(c-search-forward-char-property-with-value-on-char): New macro.

* lisp/progmodes/cc-mode.el (c-parse-quotes-before-change)
(c-parse-quotes-after-change): Rewrite the functions, simplifying
considerably, and removing unnecessary optimisations.  Invalidate two caches
after manipulating text properties.

7 years agoFix fontification of "operator~" in C++ Mode.
Alan Mackenzie [Sun, 3 Sep 2017 09:40:31 +0000 (09:40 +0000)]
Fix fontification of "operator~" in C++ Mode.

* lisp/progmodes/cc-langs.el (c-ambiguous-overloadable-or-identifier-prefices)
(c-ambiguous-overloadable-or-identifier-prefix-re): New c-lang-defconsts/vars.

* lisp/progmodes/cc-engine.el (c-forward-name): Do not try to parse "~" (and
two other symbols) as a cast without good evidence.  Prefer an overloaded
operator in ambiguous cases.

7 years agoIn delete_frame do not delete terminal for any toolkit build
Martin Rudalics [Sun, 3 Sep 2017 09:30:16 +0000 (11:30 +0200)]
In delete_frame do not delete terminal for any toolkit build

* src/frame.c (delete_frame): Neither delete terminal for
non-GTK toolkit builds (Bug#5802, Bug#21509, Bug#23499,
Bug#27816).

7 years agoImprove error messages for improper plists (Bug#27726)
Philipp Stephani [Sat, 2 Sep 2017 19:08:04 +0000 (21:08 +0200)]
Improve error messages for improper plists (Bug#27726)

* src/fns.c (Fplist_put, Flax_plist_get, Flax_plist_put)
(Fplist_member, syms_of_fns): Use ‘plistp’ as pseudo-predicate for
improper plists instead of ‘listp.’

* test/src/fns-tests.el (plist-get/odd-number-of-elements)
(lax-plist-get/odd-number-of-elements)
(plist-put/odd-number-of-elements)
(lax-plist-put/odd-number-of-elements)
(plist-member/improper-list): Add unit tests.

7 years agoFix decrypting in plstore.el on MS-Windows
Eli Zaretskii [Sat, 2 Sep 2017 10:02:10 +0000 (13:02 +0300)]
Fix decrypting in plstore.el on MS-Windows

* lisp/plstore.el (plstore-open): Bind coding-system-for-read to
raw-text, instead of using insert-file-contents-literally.
(Bug#28114)

7 years ago* src/fileio.c (Fexpand_file_name): Doc fix. (Bug#27982)
Eli Zaretskii [Sat, 2 Sep 2017 09:57:30 +0000 (12:57 +0300)]
* src/fileio.c (Fexpand_file_name): Doc fix.  (Bug#27982)

7 years agoRewrite Antinews for Emacs 26
Eli Zaretskii [Sat, 2 Sep 2017 09:37:51 +0000 (12:37 +0300)]
Rewrite Antinews for Emacs 26

* doc/lispref/anti.texi (Antinews): Rewrite for Emacs 26.
* doc/lispref/elisp.texi (Top): Update the top-level menu's
Antinews entry.
* doc/emacs/anti.texi (Antinews): Rewrite for Emacs 26.
* doc/emacs/emacs.texi (Top): Update the top-level menu's Antinews
entry.

* etc/NEWS: Rearrange some entries in a more reasonable order.

7 years agoFix a mis-binding in a test
Reuben Thomas [Fri, 1 Sep 2017 22:41:36 +0000 (23:41 +0100)]
Fix a mis-binding in a test

* test/lisp/progmodes/python-tests.el
(python-shell-calculate-process-environment-3): Fix binding of
process-environment.  A level of parens was missing.

This was found after Glenn Morris noticed a similar problem with the
patch for Bug#28319.

7 years agoFix a mis-binding and a bad defun name in a test (Bug#28319)
Reuben Thomas [Fri, 1 Sep 2017 22:38:31 +0000 (23:38 +0100)]
Fix a mis-binding and a bad defun name in a test (Bug#28319)

test/lib-src/emacs-client-tests.el (call-emacsclient): Rename
emacsclient-test-call-emacsclient.
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes): Fix let-binding of
process-environment.

Thanks to Glenn Morris for noticing these errors.

7 years ago* test/Makefile.in (check-no-automated-subdir): Silence by default.
Glenn Morris [Fri, 1 Sep 2017 22:29:49 +0000 (18:29 -0400)]
* test/Makefile.in (check-no-automated-subdir): Silence by default.

7 years ago* test/Makefile.in (ELFILES): Sort, for a reproducible order.
Glenn Morris [Fri, 1 Sep 2017 22:27:31 +0000 (18:27 -0400)]
* test/Makefile.in (ELFILES): Sort, for a reproducible order.

7 years agoTurn off checkdoc complaint about default argument order
Mark Oteiza [Fri, 1 Sep 2017 21:31:45 +0000 (17:31 -0400)]
Turn off checkdoc complaint about default argument order

* etc/NEWS: Mention change.
* lisp/emacs-lisp/checkdoc.el (checkdoc-arguments-in-order-flag):
Disable by default, note version.

7 years agoStop emacsclient tests hanging (Bug#28319)
Reuben Thomas [Fri, 1 Sep 2017 20:21:38 +0000 (21:21 +0100)]
Stop emacsclient tests hanging (Bug#28319)

* test/lib-src/emacsclient-tests.el
(emacsclient-test-alternate-editor-allows-arguments): Use a
non-existent file to communicate with server, so that any existing
default server will not be hijacked (in fact, the test does
not need a server).
(emacsclient-test-alternate-editor-allows-quotes): Likewise.

7 years ago* lisp/obsolete/html2text.el: Don't require CL
Stefan Monnier [Fri, 1 Sep 2017 18:29:57 +0000 (14:29 -0400)]
* lisp/obsolete/html2text.el: Don't require CL

(html2text-clean-anchor): Mark unused arg.

7 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Sep 2017 10:26:57 +0000 (06:26 -0400)]
; Auto-commit of loaddefs files.

7 years agoDon't remove undisplayers from inlined MIME parts (bugfix)
Katsumi Yamaoka [Fri, 1 Sep 2017 07:25:38 +0000 (07:25 +0000)]
Don't remove undisplayers from inlined MIME parts (bugfix)

* lisp/gnus/gnus-art.el (gnus-mime-buttonize-attachments-in-header):
Don't remove undisplayers from inlined MIME parts (bugfix);
Simplify criterion that finds attachments.

7 years ago; Escape some character literals
Mark Oteiza [Thu, 31 Aug 2017 21:32:10 +0000 (17:32 -0400)]
; Escape some character literals

* lisp/leim/quail/latin-ltx.el: Escape some fancy brackets.

7 years agoMake ucs-names a hash table (Bug#28302)
Mark Oteiza [Thu, 31 Aug 2017 21:22:39 +0000 (17:22 -0400)]
Make ucs-names a hash table (Bug#28302)

* etc/NEWS: Mention the type change.
* lisp/descr-text.el (describe-char): Use gethash to access ucs-names.
Hardcode BEL's name into the function instead of needlessly mapping
over the hash table in the spirit of rassoc.
* lisp/international/mule-cmds.el (ucs-names): Fix variable and
function docstrings.  Initialize a hash table for ucs-names--the
number of entries is 42845 here.  Switch to hash-table
getters/setters.
(mule--ucs-names-annotation): Use hash-table getter.
(char-from-name): Upcase the string if ignore-case is truthy.
* lisp/leim/quail/latin-ltx.el: Use maphash instead of dolist.

7 years agoRemove unneeded version checks (bug#28222)
Alan Third [Thu, 31 Aug 2017 19:42:35 +0000 (20:42 +0100)]
Remove unneeded version checks (bug#28222)

* src/macfont.h (CGContextSetFontSmoothingStyle): Remove version
check.
* src/macfont.m (macfont_draw): Remove version check, and test for
existence of CGContextSetFontSmoothingStyle.

7 years agoFix a glitch in CC Mode's syntactic whitespace cache.
Alan Mackenzie [Thu, 31 Aug 2017 19:06:16 +0000 (19:06 +0000)]
Fix a glitch in CC Mode's syntactic whitespace cache.

* lisp/progmodes/cc-engine.el (c-forward-sws): Deal correctly with a block
comment close at the end of a macro.

7 years agoCorrect the fontification of C++ Mode enclosed declarations.
Alan Mackenzie [Thu, 31 Aug 2017 18:08:21 +0000 (18:08 +0000)]
Correct the fontification of C++ Mode enclosed declarations.

* lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): abolish the
spurious check that the character before the start of an enclosed declaration
must be ; or }.  It might also be {.

7 years agoIn xterm.c fix some recently introduced compiler warnings
Martin Rudalics [Thu, 31 Aug 2017 08:00:23 +0000 (10:00 +0200)]
In xterm.c fix some recently introduced compiler warnings

* src/xterm.c (xaw_jump_callback)
(x_set_toolkit_scroll_bar_thumb): Fix some recently introduced
-Wdouble-promotion warnings.

7 years agoRestrict fix of Bug#24963 and Bug#25887 to GTK builds
Martin Rudalics [Thu, 31 Aug 2017 07:36:46 +0000 (09:36 +0200)]
Restrict fix of Bug#24963 and Bug#25887 to GTK builds

* src/xterm.c (handle_one_xevent): Restrict earlier fix of
Bug#24963 and Bug#25887 to avoid that a non-GTK Emacs won't
react to state changes received via ConfigureNotify.

7 years agoRespect directory a user enters (bug#28299)
Katsumi Yamaoka [Thu, 31 Aug 2017 00:45:54 +0000 (00:45 +0000)]
Respect directory a user enters (bug#28299)

* lisp/gnus/mm-decode.el (mm-save-part):
Respect directory a user enters (bug#28299).

7 years agoDo not split line before width of fill-prefix
Samuel Freilich [Wed, 23 Aug 2017 17:40:45 +0000 (13:40 -0400)]
Do not split line before width of fill-prefix

When auto-filling a paragraph, don't split a line before the width of the
fill-prefix, creating a subsequent line that is as long or longer (Bug#20774).
* lisp/simple.el (do-auto-fill): Only consider break-points that are later in
the line than the width of the fill-prefix.  This is a more general solution
than the previous logic, which only skipped over the exact fill-prefix.  The
fill-prefix doesn't necessarily match the prefix of the first line of a
paragraph in adaptive-fill-mode.

7 years agoSupport lazy loading for autogenerated usage docstrings too (Bug#27748)
Noam Postavsky [Sat, 19 Aug 2017 14:29:05 +0000 (10:29 -0400)]
Support lazy loading for autogenerated usage docstrings too (Bug#27748)

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble):
Consider any documentation that ended up in code as a docstring (e.g.,
autogenerated (fn ARG1 ARG2) type things), not just what the user
passed.

7 years agoDrop docstrings from cl-defsubst produced inline bodies (Bug#27748)
Noam Postavsky [Fri, 18 Aug 2017 12:15:25 +0000 (08:15 -0400)]
Drop docstrings from cl-defsubst produced inline bodies (Bug#27748)

* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Use macroexp-parse-progn
to drop the docstring.  Add a simple docstring to the compiler-macro.

7 years agoQuote file-truename symlink to "../foo:bar:"
Paul Eggert [Wed, 30 Aug 2017 21:45:52 +0000 (14:45 -0700)]
Quote file-truename symlink to "../foo:bar:"

Problem reported by Michael Albinus (Bug#28264#19).
* lisp/files.el (files--splice-dirname-file): Fix bug where
a relative symlink to "../foo:bar:" did not quote the result.

7 years agoAdd support for arguments in emacsclient's ALTERNATE_EDITOR (Bug #25082)
Reuben Thomas [Thu, 1 Dec 2016 15:21:57 +0000 (15:21 +0000)]
Add support for arguments in emacsclient's ALTERNATE_EDITOR (Bug #25082)

* lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or
corresponding command-line argument, into quote- or space-separated
tokens.  If a token starts with a quote, then it naturally is expected
to end with a quote; escaping is not supported. This is enough to cope
with the typical case of requiring the initial path to be quoted,
common on Windows where it may contain spaces.
* etc/NEWS: Document.
* doc/emacs/misc.texi: Likewise.
* doc/man/emacsclient.1: Tweak to remove the implication that only an
editor can be specified (the manual already mentions a “command”).
Fix a small error where “EDITOR” is referred to rather than
“ALTERNATE_EDITOR”.
* test/lib-src/emacsclient-tests.el: Add tests.

7 years ago* lisp/man.el (Man-softhyphen-to-minus): Avoid string-as-multibyte.
Stefan Monnier [Wed, 30 Aug 2017 19:00:56 +0000 (15:00 -0400)]
* lisp/man.el (Man-softhyphen-to-minus): Avoid string-as-multibyte.

7 years agoCorrect "hide others" shortcut on macOS (bug#28215)
Devon Sean McCullough [Thu, 24 Aug 2017 20:08:16 +0000 (21:08 +0100)]
Correct "hide others" shortcut on macOS (bug#28215)

* lisp/term/ns-win.el: Fix shortcut for ns-do-hide-others.

Copyright-paperwork-exempt: yes

7 years ago; * etc/NEWS: Some more minor copyedits.
Eli Zaretskii [Wed, 30 Aug 2017 17:50:25 +0000 (20:50 +0300)]
; * etc/NEWS: Some more minor copyedits.

7 years agoSync NEWS with the documentation
Eli Zaretskii [Wed, 30 Aug 2017 16:23:59 +0000 (19:23 +0300)]
Sync NEWS with the documentation

* etc/NEWS: Mark entries according to documentation.

* doc/lispref/functions.texi (Mapping Functions): Document 'mapcan'.

7 years agoImprove symlinks for Tramp
Michael Albinus [Wed, 30 Aug 2017 10:00:26 +0000 (12:00 +0200)]
Improve symlinks for Tramp

* lisp/files.el (files--splice-dirname-file): Quote whole file.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
Do not expand TARGET, it could be remote.
(tramp-sh-handle-file-truename): Check for cyclic symlink also
in case of readlink.  Quote result if it looks remote.
(tramp-sh-handle-file-local-copy): Use `file-truename'.

* test/lisp/net/tramp-tests.el (tramp-test08-file-local-copy)
(tramp-test09-insert-file-contents): Test also file missing.
(tramp-test21-file-links): Extend test.

7 years agoPreserve display's foreground color when clearing internal borders (Bug#28278)
Martin Rudalics [Wed, 30 Aug 2017 08:27:36 +0000 (10:27 +0200)]
Preserve display's foreground color when clearing internal borders (Bug#28278)

* src/xterm.c (x_after_update_window_line): Preserve display's
foreground color when clearing internal borders (Bug#28278).

7 years agoUse cl-print for all values printed by `describe-variable'
Noam Postavsky [Wed, 30 Aug 2017 01:59:42 +0000 (21:59 -0400)]
Use cl-print for all values printed by `describe-variable'

* lisp/help-fns.el (describe-variable): Use cl-prin1 for original and
global values too.

7 years agoMinor simplification for byte-compile-constant-push
Noam Postavsky [Sun, 13 Aug 2017 14:06:45 +0000 (10:06 -0400)]
Minor simplification for byte-compile-constant-push

* lisp/emacs-lisp/bytecomp.el (byte-compile-constant): Move the meat
of the code from here...
(byte-compile-constant-push): ... to here.  No need to bind
byte-compile--for-effect anymore.

7 years agoPrefer file-name-quote to concat "/:"
Paul Eggert [Wed, 30 Aug 2017 02:17:54 +0000 (19:17 -0700)]
Prefer file-name-quote to concat "/:"

Suggested by Michael Albinus (Bug#28264#13).
* lisp/files.el (files--splice-dirname-file): Use file-name-quote
rather than attempting to do it by hand.

7 years ago* configure.ac: fix typo in previous change
Paul Eggert [Wed, 30 Aug 2017 01:56:36 +0000 (18:56 -0700)]
* configure.ac: fix typo in previous change

7 years agoBe more conservative in link time optimization doc
Paul Eggert [Tue, 29 Aug 2017 21:52:57 +0000 (14:52 -0700)]
Be more conservative in link time optimization doc

While testing --enable-link-time-optimization with GCC 7.1.1
I ran into a serious GCC code-generation bug which makes me
think that --enable-link-time-optimization should be
discouraged for typical installs (Bug#28213).  See:
https://bugzilla.redhat.com/show_bug.cgi?id=1486455

7 years agoMake garbage collection more conservative
Paul Eggert [Tue, 29 Aug 2017 21:35:37 +0000 (14:35 -0700)]
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.

7 years agoImprove stack-top heuristic
Paul Eggert [Tue, 29 Aug 2017 21:20:47 +0000 (14:20 -0700)]
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.

7 years agoAlign stack bottom properly.
Paul Eggert [Tue, 29 Aug 2017 19:49:22 +0000 (12:49 -0700)]
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.

7 years agoAvoid spinning waiting for git-gui.exe on Windows
Eli Zaretskii [Tue, 29 Aug 2017 18:53:49 +0000 (21:53 +0300)]
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)

7 years agoDocument '--module-assertions'
Eli Zaretskii [Tue, 29 Aug 2017 16:39:15 +0000 (19:39 +0300)]
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.

7 years agoAdd news entry about new macOS features
Alan Third [Thu, 24 Aug 2017 20:59:33 +0000 (21:59 +0100)]
Add news entry about new macOS features

* etc/NEWS: Add entry about ns-appearance, ns-transparent-titlebar and
ns-use-thin-smoothing.

7 years agoFix cross macOS version building (bug#28222)
Alan Third [Sat, 26 Aug 2017 08:44:42 +0000 (09:44 +0100)]
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.

7 years agoEnable thin font smoothing in macOS (bug#28222)
Ben Bonfil [Sat, 26 Aug 2017 08:41:41 +0000 (09:41 +0100)]
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

7 years agoMinor improvement in documentation of display-line-numbers
Eli Zaretskii [Tue, 29 Aug 2017 16:13:19 +0000 (19:13 +0300)]
Minor improvement in documentation of display-line-numbers

* doc/emacs/display.texi (Display Custom): Document the
display-line-numbers-mode and related options.

7 years agoAvoid aborting in 'waitpid' on MS-Windows
Eli Zaretskii [Tue, 29 Aug 2017 15:13:44 +0000 (18:13 +0300)]
Avoid aborting in 'waitpid' on MS-Windows

* src/w32proc.c (waitpid): Don't allow quitting if called with
WNOHANG in OPTIONS.  (Bug#28268)

7 years ago; Fix Org sync 3ad8ca429bac
Rasmus [Tue, 29 Aug 2017 14:47:21 +0000 (16:47 +0200)]
; Fix Org sync 3ad8ca429bac

* etc/refcards/orgcard.tex: Restore dropped line from 54aadd94f

See http://permalink.gmane.org/gmane.emacs.devel/217877

7 years ago* lisp/progmodes/sh-script.el: Test "in-string" of the right char!
Stefan Monnier [Tue, 29 Aug 2017 13:44:19 +0000 (09:44 -0400)]
* lisp/progmodes/sh-script.el: Test "in-string" of the right char!

(sh-syntax-propertize-function): Fix off-by-one error.
Fixes bug#23526.

7 years agoUpdate Org to v9.0.10
Rasmus [Tue, 29 Aug 2017 08:07:08 +0000 (10:07 +0200)]
Update Org to v9.0.10

Please see etc/ORG-NEWS for major changes. Note, this is a bugfix
release.

7 years agoSilence false alarms for symlinks to sources
Paul Eggert [Tue, 29 Aug 2017 04:50:09 +0000 (21:50 -0700)]
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.

7 years agoSimplify remove_slash_colon
Paul Eggert [Tue, 29 Aug 2017 04:47:16 +0000 (21:47 -0700)]
Simplify remove_slash_colon

* src/process.c (remove_slash_colon): Simplify
and avoid a special case for "/:" by itself.

7 years agoRemove font family from minibuffer-prompt face
Tassilo Horn [Mon, 28 Aug 2017 16:13:59 +0000 (18:13 +0200)]
Remove font family from minibuffer-prompt face

* etc/themes/tsdh-light-theme.el (tsdh-light): Remove font family from
minibuffer-prompt face.

7 years agoFurther fixes in tramp-smb.el
Michael Albinus [Mon, 28 Aug 2017 16:08:16 +0000 (18:08 +0200)]
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.

7 years ago; Fix last ido patch
Michael Albinus [Mon, 28 Aug 2017 15:55:31 +0000 (17:55 +0200)]
; Fix last ido patch

7 years agoDon’t assume -g3 in .gdbinit
Paul Eggert [Mon, 28 Aug 2017 15:38:05 +0000 (08:38 -0700)]
Don’t assume -g3 in .gdbinit

* src/.gdbinit (EMACS_INT_WIDTH, USE_LSB_TAG):
Use reasonable defaults if not in the symbol table.

7 years agoUse string-match to check for dotfiles in ido
Robert Pluim [Mon, 28 Aug 2017 07:49:56 +0000 (09:49 +0200)]
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

7 years agoFont-lock FDO desktop files correctly
Mark Oteiza [Mon, 28 Aug 2017 02:22:29 +0000 (22:22 -0400)]
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.

7 years agoFix auto-fill bug in js-mode
Tom Tromey [Sun, 27 Aug 2017 18:54:01 +0000 (12:54 -0600)]
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.

7 years agoDisable completion while entering python multiline statements
Noam Postavsky [Sat, 19 Aug 2017 15:45:07 +0000 (11:45 -0400)]
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.

7 years agoTramp cleanup
Michael Albinus [Sun, 27 Aug 2017 17:16:58 +0000 (19:16 +0200)]
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.

7 years agoFix previous xterm.h change for non-gtk builds
Glenn Morris [Sun, 27 Aug 2017 17:06:30 +0000 (10:06 -0700)]
Fix previous xterm.h change for non-gtk builds

* src/xterm.h (GTK_CHECK_VERSION) [!USE_GTK]: Define it.

7 years agoFix GdkSettings-related deprecation warnings
Philipp Stephani [Sun, 27 Aug 2017 11:13:16 +0000 (13:13 +0200)]
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.

7 years agoAlways use gtk_window_move in new versions
Philipp Stephani [Sun, 27 Aug 2017 10:38:46 +0000 (12:38 +0200)]
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.

7 years agoFix 'diff-goto-source' when buffer is narrowed (Bug#21262)
Charles A. Roelli [Tue, 22 Aug 2017 13:57:01 +0000 (15:57 +0200)]
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.

7 years agoRemove use of a deprecated GTK+ function in new versions
Philipp Stephani [Sun, 27 Aug 2017 11:11:55 +0000 (13:11 +0200)]
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

7 years agoStop using deprecated GdkScreen monitor functions in newer GDK
Philipp Stephani [Sun, 27 Aug 2017 11:15:34 +0000 (13:15 +0200)]
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+