]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoPort tramp-tests to new copy-directory behavior
Paul Eggert [Mon, 11 Sep 2017 06:04:10 +0000 (23:04 -0700)]
Port tramp-tests to new copy-directory behavior

* test/lisp/net/tramp-tests.el (tramp-test15-copy-directory):
Use directory name as arg for copy-directory when we want
the special behavior.

7 years agoAdjust thumbs to new rename-file behavior
Paul Eggert [Mon, 11 Sep 2017 05:28:08 +0000 (22:28 -0700)]
Adjust thumbs to new rename-file behavior

* etc/NEWS: Mention this.
* lisp/thumbs.el (thumbs-rename-images): Treat the destination
as special only if it is a directory name.  When there is
a marked list, turn the destination into a directory name
if it is not already.

7 years agoAdjust ob-tangle to new copy-file behavior
Paul Eggert [Mon, 11 Sep 2017 05:22:55 +0000 (22:22 -0700)]
Adjust ob-tangle to new copy-file behavior

* lisp/org/ob-tangle.el (org-babel-tangle-publish):
Port to new copy-file behavior.

7 years agoMake gnus-copy-file act like copy-file etc.
Paul Eggert [Mon, 11 Sep 2017 05:21:20 +0000 (22:21 -0700)]
Make gnus-copy-file act like copy-file etc.

* etc/NEWS: Mention this.
* lisp/gnus/gnus-util.el (gnus-copy-file): Treat the destination
as special only if it is a directory name.

7 years agoMake write-file act like copy-file etc.
Paul Eggert [Mon, 11 Sep 2017 05:19:01 +0000 (22:19 -0700)]
Make write-file act like copy-file etc.

Change write-file to be consistent with the new behavior
of copy-file, etc.
* etc/NEWS: Mention this.
* lisp/files.el (write-file): Treat the destination as special
only if it is a directory name.

7 years agoMake copy-directory act like copy-file etc.
Paul Eggert [Mon, 11 Sep 2017 05:07:30 +0000 (22:07 -0700)]
Make copy-directory act like copy-file etc.

Do the special dance with the destination only if it is a
directory name, for consistency with copy-file etc. (Bug#27986).
* doc/emacs/files.texi (Copying and Naming):
* doc/lispref/files.texi (Create/Delete Dirs):
* etc/NEWS: Document this.
* lisp/files.el (copy-directory): Treat NEWNAME as special
only if it is a directory name.

7 years agoFix some make-directory bugs
Paul Eggert [Mon, 11 Sep 2017 03:37:17 +0000 (20:37 -0700)]
Fix some make-directory bugs

* lisp/files.el (files--ensure-directory): New function.
(make-directory): Use it to avoid bugs when (make-directory FOO t)
is invoked on a non-directory, or on a directory hierarchy that
is being built by some other process while Emacs is running.
* test/lisp/files-tests.el (files-tests--make-directory): New test.

7 years agoFix race with rename-file etc. with dir NEWNAME
Paul Eggert [Sun, 10 Sep 2017 22:39:24 +0000 (15:39 -0700)]
Fix race with rename-file etc. with dir NEWNAME

This changes the behavior of rename-file etc. slightly.
The old behavior mostly disagreed with the documentation, and had
a race condition bug that could allow attackers to modify victims'
write-protected directories (Bug#27986).
* doc/lispref/files.texi (Changing Files): Document that in
rename-file etc., NEWFILE is special if it is a directory name.
* etc/NEWS: Document the change in behavior.
* src/fileio.c (directory_like): Remove.  All uses removed.
(expand_cp_target): Test only whether NEWNAME is a directory name,
not whether it is currently a directory.  This avoids a race.
(Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
Document behavior if NEWNAME is a directory name.
(Frename_file): Simplify now that the destdir behavior occurs
only when NEWNAME is a directory name.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp--test-check-files):
Adjust tests to match new behavior.

7 years agoExtend --debug printouts in etags
Eli Zaretskii [Sun, 10 Sep 2017 19:10:33 +0000 (22:10 +0300)]
Extend --debug printouts in etags

* lib-src/etags.c (regex_tag_multiline, readline): Under
"--debug", print tags found via regexps.

7 years agoAdd --debug option to etags
Eli Zaretskii [Sun, 10 Sep 2017 16:46:00 +0000 (19:46 +0300)]
Add --debug option to etags

* lib-src/etags.c (make_tag): Print found tags under --debug.
(longopts): Add --debug.

7 years agoSpelling fixes
Paul Eggert [Sun, 10 Sep 2017 16:20:27 +0000 (09:20 -0700)]
Spelling fixes

* lisp/progmodes/cc-langs.el:
(c-ambiguous-overloadable-or-identifier-prefixes): Rename from
c-ambiguous-overloadable-or-identifier-prefices.  Caller changed.

7 years ago; Add to last commit
Mark Oteiza [Sun, 10 Sep 2017 16:20:06 +0000 (12:20 -0400)]
; Add to last commit

* lisp/xdg.el (xdg-desktop-entry-regexp): Add a commented capture group
for future reference.

7 years ago; * configure.ac: Fix last change.
Eli Zaretskii [Sun, 10 Sep 2017 16:01:16 +0000 (19:01 +0300)]
; * configure.ac: Fix last change.

7 years agoMerge from gnulib
Paul Eggert [Sun, 10 Sep 2017 15:39:55 +0000 (08:39 -0700)]
Merge from gnulib

This incorporates:
2017-09-08 stddef: Avoid conflict with system-defined max_align_t
2017-08-24 warnings: fix compilation with old autoconf
2017-08-23 glob: merge from glibc with Zanella glob changes
2017-08-17 random: Fix test compilation failure on Cygwin 1.5.25
* doc/misc/texinfo.tex, lib/flexmember.h, lib/stddef.in.h:
* lib/stdlib.in.h, m4/manywarnings.m4, m4/stdlib_h.m4:
* m4/warnings.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

7 years agoImplement renameat_noreplace on recent Cygwin
Ken Brown [Sun, 10 Sep 2017 15:00:35 +0000 (11:00 -0400)]
Implement renameat_noreplace on recent Cygwin

* src/sysdep.c [CYGWIN]: Include cygwin/fs.h.
(renameat_noreplace) [RENAME_NOREPLACE]: Use renameat2.
(Bug#27986)

7 years agoAvoid warnings about file names in autoloads on MS-Windows
Eli Zaretskii [Sun, 10 Sep 2017 14:52:41 +0000 (17:52 +0300)]
Avoid warnings about file names in autoloads on MS-Windows

* configure.ac (srcdir) [mingw32]: Downcase the drive letter, to
avoid warnings from find-file-noselect when making autoloads.  For
the details, see
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00049.html.

7 years agoAvoid looking at localized strings
Mark Oteiza [Sun, 10 Sep 2017 03:12:47 +0000 (23:12 -0400)]
Avoid looking at localized strings

* lisp/xdg.el (xdg-desktop-read-group): Add condition to catch
localized strings.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Add test to ensure
parsing l10n strings doesn't error but is essentially a no-op.

7 years ago* etc/NEWS.25: Document 25.3 changes.
Paul Eggert [Sat, 9 Sep 2017 07:50:53 +0000 (00:50 -0700)]
* etc/NEWS.25: Document 25.3 changes.

7 years agoRemove unsafe enriched mode translations
Lars Ingebrigtsen [Sat, 9 Sep 2017 03:23:31 +0000 (20:23 -0700)]
Remove unsafe enriched mode translations

* lisp/gnus/mm-view.el (mm-inline-text):
Do not worry about enriched or richtext type.
* lisp/textmodes/enriched.el (enriched-translations):
Remove translations for FUNCTION, display (Bug#28350).
(enriched-handle-display-prop, enriched-decode-display-prop): Remove.

7 years agoBe more consistent about "directory name" in manual
Paul Eggert [Sat, 9 Sep 2017 20:39:22 +0000 (13:39 -0700)]
Be more consistent about "directory name" in manual

This clarifies the documentation, partly in response to the
discussion in Bug#27986.

7 years agoRemove more compilation warnings in MinGW64 build
Eli Zaretskii [Sat, 9 Sep 2017 19:15:30 +0000 (22:15 +0300)]
Remove more compilation warnings in MinGW64 build

* src/w32.c (faccessat, map_w32_filename):
* src/w32fns.c (w32_wnd_proc):
* src/w32term.c (w32_horizontal_scroll_bar_handle_click)
(w32_scroll_bar_handle_click): Use FALLTHROUGH to avoid compiler
warnings with GCC 7 and later.

7 years agoImprove --enable-gcc-warnings for MinGW64
Paul Eggert [Sat, 9 Sep 2017 18:10:35 +0000 (11:10 -0700)]
Improve --enable-gcc-warnings for MinGW64

This partially reverts my 2016-05-30 patch.  Apparently MinGW64
still requires pacifications that GCC 7.1.1 x86-64 (Fedora 26)
does not.  Also, pacify tparam.c, which isn’t used on Fedora.
* lib-src/etags.c (process_file_name, TeX_commands):
* src/buffer.c (fix_overlays_before):
* src/data.c (Fmake_variable_buffer_local, cons_to_unsigned)
(cons_to_signed):
* src/editfns.c (Ftranslate_region_internal):
Prefer UNINIT to some stray value, as this simplifies
code-reading later.
* src/eval.c (CACHEABLE): New macro.
(internal_lisp_condition_case): Use it.
* src/tparam.c (tparam1): Use FALLTHROUGH to pacify GCC.

7 years agoFix font-lock in Compilation mode
Eli Zaretskii [Sat, 9 Sep 2017 18:04:31 +0000 (21:04 +0300)]
Fix font-lock in Compilation mode

* lisp/progmodes/compile.el (compilation-face): Restore function
lost during recent changes.  (Bug#28349)

7 years agoAdd function to read all entries in a group
Mark Oteiza [Sat, 9 Sep 2017 15:55:09 +0000 (11:55 -0400)]
Add function to read all entries in a group

Use that to extend xdg-desktop-read-file.  Also fix a bug where all
entries in all groups were read and returned by xdg-desktop-read-file.
* lisp/xdg.el (xdg-desktop-read-group): New function.
(xdg-desktop-read-file): Use it.
* test/data/xdg/malformed.desktop: New file.
* test/data/xdg/test.desktop: Add another section.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Test presence of a key
in another group.  Test reading a prescribed group.  Test detecting a
malformed key=value.

7 years agoReduce Tramp's memory usage
Gemini Lasswell [Wed, 30 Aug 2017 14:11:41 +0000 (07:11 -0700)]
Reduce Tramp's memory usage

Construct Tramp syntax strings and regular expressions once instead
of every time they are used, and store them in alists keyed by Tramp
syntax.
* tramp.el (tramp-build-remote-file-name-spec-regexp)
(tramp-build-file-name-structure): New functions.
(tramp-prefix-format-alist, tramp-prefix-regexp-alist)
(tramp-method-regexp-alist)
(tramp-postfix-method-format-alist)
(tramp-postfix-method-regexp-alist)
(tramp-prefix-ipv6-format-alist, tramp-prefix-ipv6-regexp-alist)
(tramp-postfix-ipv6-format-alist)
(tramp-postfix-ipv6-regexp-alist)
(tramp-postfix-host-format-alist)
(tramp-postfix-host-regexp-alist)
(tramp-remote-file-name-spec-regexp-alist)
(tramp-file-name-structure-alist): New constants.
(tramp-lookup-syntax): New function.
(tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp)
(tramp-postfix-method-format, tramp-postfix-method-regexp)
(tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp)
(tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp)
(tramp-postfix-host-format, tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp, tramp-file-name-structure):
Use it.

7 years agoFix compilation warnings in MinGW64 build using GCC 7
Eli Zaretskii [Sat, 9 Sep 2017 15:50:50 +0000 (18:50 +0300)]
Fix compilation warnings in MinGW64 build using GCC 7

Reported by Richard Copley <rcopley@gmail.com>.
* src/w32heap.c (init_heap): Declare enable_lfh only for
mingw.org's MinGW build.

* src/w32console.c (w32con_write_glyphs):
* src/unexw32.c (get_section_info, COPY_CHUNK, unexec): Fix some
mismatches of data type vs format spec.

* src/w32fns.c (compute_tip_xy):
* src/w32proc.c (stop_timer_thread):
* src/w32notify.c (remove_watch):
* src/eval.c (internal_lisp_condition_case):
* src/editfns.c (Ftranslate_region_internal):
* src/data.c (Fmake_variable_buffer_local, cons_to_unsigned)
(cons_to_signed):
* src/buffer.c (fix_overlays_before): Initialize variables to
avoid compiler warnings.

* lib-src/etags.c (TeX_commands, process_file_name): Initialize
variables to avoid compilation warnings.

7 years ago; Add a comment for make-text-button in rcirc-markup-urls
Miles Bader [Sat, 9 Sep 2017 14:28:08 +0000 (23:28 +0900)]
; Add a comment for make-text-button in rcirc-markup-urls

7 years agoAvoid infloop when scrolling under scroll-preserve-screen-position
Eli Zaretskii [Sat, 9 Sep 2017 14:20:47 +0000 (17:20 +0300)]
Avoid infloop when scrolling under scroll-preserve-screen-position

* src/window.c (window_scroll_pixel_based): If screen position is
to be preserved, make sure its recorded Y coordinate is outside
the scroll margin.  (Bug#28342)

7 years agoClarification in tramp-texi
Michael Albinus [Sat, 9 Sep 2017 10:31:54 +0000 (12:31 +0200)]
Clarification in tramp-texi

* doc/misc/tramp.texi (Connection caching): Two connections are
regarded as different now when they differ in the port number only.

7 years ago; Fix previous commit
Mark Oteiza [Sat, 9 Sep 2017 04:46:41 +0000 (00:46 -0400)]
; Fix previous commit

See https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00101.html
* test/lisp/xdg.el: Remove match data tests.
* lisp/xdg.el (xdg-user-dir): Fix docstring. Remove save-match-data.
(xdg-desktop-read-file, xdg-desktop-strings): Remove save-match-data.

7 years ago* admin/quick-install-emacs: Tweak configure.ac parsing
Miles Bader [Fri, 19 Sep 2014 06:33:13 +0000 (15:33 +0900)]
* admin/quick-install-emacs: Tweak configure.ac parsing

7 years agoUse text-property buttons in rcirc-markup-urls
Miles Bader [Tue, 30 Jul 2013 10:21:31 +0000 (19:21 +0900)]
Use text-property buttons in rcirc-markup-urls

* lisp/net/rcirc.el (rcirc-markup-urls): Use `make-text-button'
instead of `make-button'; the former is much more efficient in large
buffers, and for the purposes of rcirc, changes no functionality.

7 years agoFix line-pixel-height for lines of variable height
Eli Zaretskii [Fri, 8 Sep 2017 13:15:23 +0000 (16:15 +0300)]
Fix line-pixel-height for lines of variable height

* src/xdisp.c (Fline_pixel_height): Start moving from the
beginning of the screen line, to capture the full metrics of the
line.  (Bug#28391)

7 years agoNew variable 'dired-confirm-killing-deleted-buffers'
Alex Branham [Fri, 8 Sep 2017 09:36:59 +0000 (12:36 +0300)]
New variable 'dired-confirm-killing-deleted-buffers'

* lisp/dired-x.el (dired-clean-confirm-killing-deleted-buffers):
New variable.
* lisp/dired.el (dired-clean-up-after-deletion): Kill buffers
visiting deleted files without confirming if
dired-clean-confirm-killing-deleted-buffers is nil.  (Bug#28373)
* etc/NEWS: Document the change.

Copyright-paperwork-exempt: yes

7 years agoSupport SVN files with svn:externals property
Alfred M. Szmidt [Fri, 8 Sep 2017 09:19:24 +0000 (12:19 +0300)]
Support SVN files with svn:externals property

* lisp/vc/vc-svn.el (vc-svn-parse-status): Don't ignore files
marked with the svn:externals property.

Copyright-paperwork-exempt: yes

7 years agoList locally removed files in vc-dir with SVN back-end
Alfred M. Szmidt [Fri, 8 Sep 2017 09:14:58 +0000 (12:14 +0300)]
List locally removed files in vc-dir with SVN back-end

* lisp/vc/vc-svn.el (vc-svn-after-dir-status): List files marked
with ?! as needs-update.

Copyright-paperwork-exempt: yes

7 years agoFix Rmail editing with reapplying encoding to message body
Ken Olum [Fri, 8 Sep 2017 09:08:49 +0000 (12:08 +0300)]
Fix Rmail editing with reapplying encoding to message body

* lisp/mail/rmailedit.el (rmail-cease-edit):  If no
content-type in edited headers, look for one in original
headers and add it to edited headers.  (Bug #26918)
Use a marker to track start of new body, so that
content-transfer-encoding gets applied only to body.  (Bug #27353).
Ensure blank line at end of message after encoding, not
before.

7 years agoDocument last change in dired.el
Eli Zaretskii [Fri, 8 Sep 2017 09:02:59 +0000 (12:02 +0300)]
Document last change in dired.el

* etc/NEWS (Dired): Document the last change in dired.el.
(Bug#27435)

7 years agoMake mouse clicks in Dired more customizable
Tak Kunihiro [Fri, 8 Sep 2017 08:52:47 +0000 (11:52 +0300)]
Make mouse clicks in Dired more customizable

* lisp/dired.el (dired-mouse-find-file): Allow callers to
specify functions to visit file/directory.
(dired-mouse-find-file-other-window)
(dired-mouse-find-file-other-frame): New functions to visit
files in another window/frame.  (Bug#27435)

7 years agoAvoid compiler warnings on MS-Windows with GCC 6 and 7
Eli Zaretskii [Fri, 8 Sep 2017 08:00:34 +0000 (11:00 +0300)]
Avoid compiler warnings on MS-Windows with GCC 6 and 7

* src/w32font.c (SUBRANGE): Use unsigned arithmetic for
bit-shifting, to avoid compiler warnings.
(w32font_text_extents): Tell GCC NGLYPHS is non-negative, to avoid
a warning.  For details of the warning, see
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00093.html.
* src/term.c (keys) [WINDOWSNT]: Don't define, as it is not used
in that build.
* src/sound.c (sound_perror): Ifdef away on WINDOWSNT, as this
function is not used in that build.

* configure.ac: Disable -Wsuggest-attribute=format on MS-Windows.

7 years agoFix 'directory-file-name' on DOS_NT systems as well
Eli Zaretskii [Fri, 8 Sep 2017 07:51:14 +0000 (10:51 +0300)]
Fix 'directory-file-name' on DOS_NT systems as well

* src/fileio.c (directory_file_name) [DOS_NT]: Fix the DOS_NT case
to be consistent with last change.

* test/src/fileio-tests.el (fileio-tests--odd-symlink-chars):
Disable on MS-Windows.
(fileio-tests--directory-file-name-dos-nt)
(fileio-tests--file-name-as-directory-dos-nt): New tests.

7 years agoFix various verilog-mode.el issues.
Wilson Snyder [Fri, 8 Sep 2017 03:24:28 +0000 (23:24 -0400)]
Fix various verilog-mode.el issues.

* lisp/progmodes/verilog-mode.el (verilog-expand-dirnames): Fix expanding
"*/*", msg2284. Reported by Jonathan Ferguson.
(ignore-errors): Fix ignore-errors error on Emacs 22.3, bug1177. Reported
by Victor Lau.
(verilog-getopt, verilog-getopt-file) (verilog-library-flags,
verilog-substitute-file-name-path): Support -F in verilog getopt files,
bug1171. Reported by George Cuan.
(verilog-do-indent): Fix misindenting symbols starting with t,
bug1169. Reported by Hoai Tran.
(verilog-read-auto-template-middle): Fix slow template matching on
AUTOINST. Reported by Jeffrey Huynh.
(verilog-pretty-expr): The extra whitespace addition before "=" operators
is now done only if the whole assignment block contains the 2-character
"<=" operator.  Remove the unused argument _myre.  Use `unless',
`save-excursion' and `when' functions where possible.  Internal variables
refactored for clarity.  Follow elisp convention for closing parentheses.
By Kaushal Modi.
(verilog-get-lineup-indent-2): Update docstring.  Internal variables
refactored for clarity.  Earlier EDPOS argument was expected to be a
marker; it is now renamed to END and is now expected to be a position.
Use `when' instead of `if'.  By Kaushal Modi.
(electric-verilog-terminate-line): Remove the unused second argument from
`verilog-pretty-expr' call.  By Kaushal Modi.
(verilog-calc-1): Fix indentation of a virtual class definition after a
typedef class, bug1080.  By Kaushal Modi.

7 years agoDon't use summary window to visit group buffer (bugfix)
Katsumi Yamaoka [Fri, 8 Sep 2017 02:16:19 +0000 (02:16 +0000)]
Don't use summary window to visit group buffer (bugfix)

* lisp/gnus/gnus-sum.el (gnus-summary-jump-to-group): Make sure that
the window to open the group buffer doesn't visit the summary buffer.
This fixes a bug: `gnus-summary-next-article' sometimes causes an error
by trying to select nonexistent summary window.

7 years agoFix bug: (directory-file-name "///") returned "//"
Paul Eggert [Fri, 8 Sep 2017 00:46:12 +0000 (17:46 -0700)]
Fix bug: (directory-file-name "///") returned "//"

* src/fileio.c (directory_file_name): For "///" and longer,
return "/", not "//", as per POSIX.
* test/src/fileio-tests.el (fileio-tests--directory-file-name)
(fileio-tests--file-name-as-directory): New tests.

7 years agoRemove obsolete vc-mistrust-permissions doc
Paul Eggert [Thu, 7 Sep 2017 23:34:20 +0000 (16:34 -0700)]
Remove obsolete vc-mistrust-permissions doc

* doc/emacs/vc1-xtra.texi (RCS and SCCS): Remove documentation
for vc-mistrust-permissions, which no longer exists.

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.