Lars Ingebrigtsen [Wed, 13 Sep 2017 18:10:51 +0000 (20:10 +0200)]
Make gnutls-verify-error work again with url-retrieve-synchronously
* lisp/url/url-gw.el (url-open-stream): Only use :nowait if
we're doing async connections (bug#26835).
* lisp/url/url-parse.el (url): Add an asynchronous slot.
* lisp/url/url.el (url-asynchronous): New variable.
(url-retrieve-internal): Store the value.
(url-retrieve-synchronously): Bind the variable.
Michael Albinus [Wed, 13 Sep 2017 18:10:40 +0000 (20:10 +0200)]
Improve backward compatibility of tramp-tests
* test/lisp/net/tramp-tests.el (seq): Don't require.
(tramp--test-emacs26-p): New defun.
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Use it.
(tramp-test16-file-expand-wildcards): Use `copy-sequence'.
Michael Albinus [Wed, 13 Sep 2017 18:10:10 +0000 (20:10 +0200)]
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 25.3.
Mark Oteiza [Wed, 13 Sep 2017 17:25:41 +0000 (13:25 -0400)]
Add clarification to if-let* docstring
Also make its behaviour consistent with and-let* in that empty bindings
results in success, not failure.
* lisp/emacs-lisp/subr-x.el: Edit docstring, change else to then.
Lars Ingebrigtsen [Wed, 13 Sep 2017 16:08:34 +0000 (18:08 +0200)]
Make fully qualified domain names more fully qualified
* lisp/gnus/message.el (message-make-fqdn): Don't try to use a
system-name without any periods as a fully qualified domain name.
Paul Eggert [Wed, 13 Sep 2017 15:47:33 +0000 (08:47 -0700)]
Remove unused file lib/getopt_.h
* lib/getopt_.h: Remove. It was renamed to lib/getopt.in.h etc.
on 2011-01-08, but I forgot to remove the old file.
Mark Oteiza [Wed, 13 Sep 2017 14:38:05 +0000 (10:38 -0400)]
Remove "baroque" use of prefix argument from gensym
'cl-gensym' was simply moved here, but let us take an opportunity to
shed some historical baggage.
* lisp/subr.el (gensym): Remove special treatment of PREFIX as a
number. Use "g" as prefix to differentiate from cl-gensym defaults.
* doc/lispref/symbols.texi (Creating Symbols): Update accordingly.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter, cl-gensym): Restore.
Mark Oteiza [Wed, 13 Sep 2017 14:36:05 +0000 (10:36 -0400)]
Provide an lcms2 feature
* src/lcms.c (syms_of_lcms2): Provide "lcms2".
Mark Oteiza [Wed, 13 Sep 2017 14:27:37 +0000 (10:27 -0400)]
Add lcms2 interface
configure.ac: Add boilerplate for configuring and detecting liblcms2.
etc/NEWS: Mention new configure option and color-distance change.
src/Makefile.in: Add references to lcms.c and liblcms.
src/emacs.c: Define lcms2 symbols.
src/lcms.c: New file.
src/lisp.h: Add declaration for lcms2.
src/xfaces.c: Add optional METRIC argument.
Mark Oteiza [Wed, 13 Sep 2017 14:19:59 +0000 (10:19 -0400)]
; Fix previous commit
Removing extraneous code, thanks to Michael Heerdegen.
* lisp/emacs-lisp/subr-x.el (internal--listify): Remove latter
condition which always evaluates to t.
(internal--build-binding-value-form): Remove dead code.
Mark Oteiza [Wed, 13 Sep 2017 14:00:39 +0000 (10:00 -0400)]
Add other D series white points and some simple conversions
* lisp/color.el (color-d75-xyz, color-d55-xyz, color-d50-xyz): New
constants.
(color-xyz-to-xyy, color-xyy-to-xyz, color-lab-to-lch):
(color-lch-to-lab): New functions.
Mark Oteiza [Wed, 13 Sep 2017 13:59:37 +0000 (09:59 -0400)]
Permit non-integral color gradients
* lisp/color.el (color-gradient): Float the step-number.
Katsumi Yamaoka [Wed, 13 Sep 2017 10:04:14 +0000 (10:04 +0000)]
Protect against malformed MIME messages that cause inf-loop (bugfix)
* lisp/gnus/gnus-art.el (gnus-article-mime-handles):
Protect against malformed MIME messages that cause inf-loop.
Paul Eggert [Wed, 13 Sep 2017 09:07:03 +0000 (02:07 -0700)]
Merge from Gnulib
This incorporates:
2017-09-13 all: prefer https: URLs
This just changes http: to https: in comments,
in files copied from Gnulib.
Dmitry Gutov [Tue, 12 Sep 2017 23:30:45 +0000 (02:30 +0300)]
Call vc-resynch-buffer in vc-git-resolve-when-done
* lisp/vc/vc-git.el (vc-git-resolve-when-done):
Call vc-resynch-buffer on the current file (bug#28121).
Move its autoload to before this function.
Eric Abrahamsen [Tue, 12 Sep 2017 23:06:12 +0000 (16:06 -0700)]
Allow write-contents-functions to short-circuit buffer save
Bug#28412
* lisp/files.el (basic-save-buffer): Re-arrange function so that
write-contents-functions are run earlier. If they return non-nil,
consider the buffer saved without requiring the buffer to be
visiting a file.
(save-some-buffers): This function should consider any buffer with a
buffer-local value for write-contents-functions eligible for
saving.
* test/lisp/files-tests.el (files-test-no-file-write-contents): New
test.
* doc/lispref/files.texi (Saving Buffers): Mention in docs.
* etc/NEWS: And in NEWS.
Paul Eggert [Tue, 12 Sep 2017 19:55:29 +0000 (12:55 -0700)]
* etc/NEWS.25: Copy from emacs-25 etc/NEWS.
Paul Eggert [Tue, 12 Sep 2017 19:17:41 +0000 (12:17 -0700)]
Less chatter for ’make info/dir’
* Makefile.in (${srcdir}/info/dir): Tweak shell command so
that an ordinary make says just "GEN info/dir" rather than
also having a seemingly-unrelated mv line.
Paul Eggert [Tue, 12 Sep 2017 19:15:22 +0000 (12:15 -0700)]
Tweak Gnus doc re gnus-copy-file
* doc/misc/gnus.texi (Saving Articles):
Document behavior with directory name targets (Bug#27986).
Problem reported by Katsumi Yamaoka in:
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00216.html
Mark Oteiza [Tue, 12 Sep 2017 17:08:47 +0000 (13:08 -0400)]
Update uses of if-let and when-let
* lisp/dom.el (dom-previous-sibling):
* lisp/emacs-lisp/package.el (package--with-work-buffer):
(package--sort-deps-in-alist, package--sort-by-dependence):
(package-install-from-archive, package-install):
(package-menu-execute, package-menu--populate-new-package-list):
* lisp/filenotify.el (file-notify--rm-descriptor):
(file-notify--event-watched-file, file-notify--event-file-name):
(file-notify--event-file1-name, file-notify-rm-watch):
(file-notify-valid-p):
* lisp/gnus/message.el (message-toggle-image-thumbnails):
* lisp/gnus/nnimap.el (nnimap-request-move-article):
* lisp/ibuf-ext.el (ibuffer-repair-saved-filters):
* lisp/mpc.el (mpc-format):
* lisp/net/eww.el (eww-tag-meta, eww-process-text-input):
(eww-save-history):
* lisp/net/shr.el (shr-tag-base, shr-tag-object, shr-make-table-1):
* lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
* lisp/svg.el (svg-remove):
* lisp/textmodes/css-mode.el (css--named-color):
(css--colon-inside-funcall):
* lisp/textmodes/sgml-mode.el (html-current-buffer-classes):
(html-current-buffer-ids): Use if-let* and when-let* instead.
Mark Oteiza [Tue, 12 Sep 2017 16:44:45 +0000 (12:44 -0400)]
Implement and-let*
This also includes changes to if-let and when-let. The single tuple
special case is ambiguous, and binding a symbol to nil is not as
useful as binding it to its value outside the lexical scope of the
binding. (Bug#28254)
* etc/NEWS: Mention.
* lisp/emacs-lisp/subr-x.el (internal--listify):
(internal--build-binding-value-form): Extend to account for
solitary symbols and (EXPR) items in binding varlist.
(if-let*, when-let*): Nix single tuple case and incumbent
bind-symbol-to-nil behavior.
(and-let*): New macro.
(if-let, when-let): Mark obsolete. Redefine in terms of if-let*, so
they implicitly gain the new features without breaking existing code.
* test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of
single-tuple special case, lack of binding solitary symbols to nil,
and the introduction of uninterned symbols for (EXPR) bindings. Add
SRFI-2 test suite adapted to Elisp.
Eli Zaretskii [Tue, 12 Sep 2017 16:29:45 +0000 (19:29 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 12 Sep 2017 16:28:41 +0000 (19:28 +0300)]
Fix minor typos in the Emacs manual
* doc/emacs/text.texi (Org Organizer):
* doc/emacs/ack.texi (Acknowledgments): Fix spelling of Org nodes.
Paul Eggert [Tue, 12 Sep 2017 16:24:43 +0000 (09:24 -0700)]
Merge Emacs 25.3 fixes
The security patches released for Emacs 25.3 were less drastic
than what we had immediately put into master. Adjust master to
match 25.3 (Bug#28350).
* lisp/textmodes/enriched.el (enriched-translations):
Re-enable FUNCTION and display translations that are safe.
(enriched-handle-display-prop): Bring back.
(enriched-decode-display-prop): Bring back, but disable
the unsafe part.
Alan Mackenzie [Tue, 12 Sep 2017 16:19:52 +0000 (16:19 +0000)]
Don't match C++ template delims starting within a token. FIxes bug #28418.
* lisp/progmodes/cc-engine.el (c-restore-<>-properties): After failing an
attempted match from the start of a token (in particular, "<<"), move to the
next token rather than the nex character before searching for the next "<".
Mark Oteiza [Tue, 12 Sep 2017 15:08:00 +0000 (11:08 -0400)]
Move gensym to core Elisp
* doc/lispref/symbols.texi (Creating Symbols): Mention gensym right
after make-symbol.
* etc/NEWS: Mention.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Alias to
gensym-counter.
(cl-gensym): Alias to gensym.
* lisp/emacs-lisp/cl.el: Remove gensym from list of aliases.
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper):
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture):
(ert--expand-should-1, ert--expand-should):
(ert--should-error-handle-error):
* lisp/emacs-lisp/generator.el (cps--gensym):
* lisp/emacs-lisp/gv.el (setf):
* lisp/emacs-lisp/inline.el (inline--do-letlisteval):
* lisp/emacs-lisp/pcase.el (pcase--make-docstring, pcase-dolist):
(pcase--funcall, pcase--u1): Use gensym.
* lisp/subr.el (gensym-counter): New variable.
(gensym): New function, assimilated from cl-lib.
Mark Oteiza [Tue, 12 Sep 2017 15:00:58 +0000 (11:00 -0400)]
Fix cl-gentemp
* lisp/emacs-lisp/cl-macs.el (cl--gentemp-counter): New variable.
(cl-gentemp): Use it. Change prefix to "T".
Sam Steingold [Tue, 12 Sep 2017 14:31:13 +0000 (10:31 -0400)]
gnus-score-file-name: Do not append empty suffix.
Michael Albinus [Tue, 12 Sep 2017 09:20:49 +0000 (11:20 +0200)]
Extend tramp-tests according to bug#27986
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Extend tests.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Specifiy error symbol in `should-error'.
Mark Oteiza [Tue, 12 Sep 2017 02:20:41 +0000 (22:20 -0400)]
Add cl-print method for hash tables
* lisp/emacs-lisp/cl-print.el (cl-print-object): New method.
Mark Oteiza [Tue, 12 Sep 2017 02:16:14 +0000 (22:16 -0400)]
Add docstrings to cl-print entry points
* lisp/emacs-lisp/cl-print.el (cl-print-compiled): Fix docstring.
(cl-prin1, cl-prin1-to-string): Add docstrings.
Mark Oteiza [Tue, 12 Sep 2017 01:23:38 +0000 (21:23 -0400)]
; Fix previous commit
The printer otherwise includes the 0x prefix.
* lisp/emacs-lisp/cl-print.el: Add 0x to format.
Glenn Morris [Mon, 11 Sep 2017 22:11:37 +0000 (18:11 -0400)]
Improve reproducibility of generated leim-list.el
* lisp/international/quail.el (quail-update-leim-list-file):
Sort the quail directory listing, for more stable output.
Philipp Stephani [Mon, 11 Sep 2017 20:11:41 +0000 (22:11 +0200)]
; * lisp/files.el (basic-save-buffer-2): Fix typo.
Mark Oteiza [Mon, 11 Sep 2017 20:06:06 +0000 (16:06 -0400)]
Include sxhash of object with printed bytecode
This printing, while succint, is rather opaque. At least give an
immediate clue of whether different byte code printouts are for the
same or different byte code objects.
* lisp/emacs-lisp/cl-print.el (cl-print-object): Add object sxhash to
printed token "#<bytecode>".
Eli Zaretskii [Mon, 11 Sep 2017 16:48:56 +0000 (19:48 +0300)]
Update documentation of 'max-lisp-eval-depth'
* doc/lispref/eval.texi (Eval): Update the documented default
value of 'max-lisp-eval-depth'.
Eli Zaretskii [Mon, 11 Sep 2017 16:44:38 +0000 (19:44 +0300)]
Another place to produce debugging output in etags
* lib-src/etags.c (Ruby_functions): One more place to print
debugging output under --debug.
Eli Zaretskii [Mon, 11 Sep 2017 16:40:43 +0000 (19:40 +0300)]
Improve documentation of etags-related features
* doc/emacs/maintaining.texi (Looking Up Identifiers): Document
'xref-prompt-for-identifier'. (Bug#28403)
(Etags Regexps): Document \D back references in etags regexps.
Alan Third [Mon, 11 Sep 2017 16:15:13 +0000 (17:15 +0100)]
Fix macOS compatibility versions for vibrant dark theme (bug#28415)
* src/nsterm.m (ns_set_appearance, EmacsView::initFrameFromEmacs):
Change macOS compatibility from 10.9 to 10.10.
Michael Albinus [Mon, 11 Sep 2017 15:12:32 +0000 (17:12 +0200)]
Further optimization in Tramp's file name decomposition
* lisp/net/tramp.el (tramp-syntax): Recompute all file name
components. Call `custom-set-variables' after loading.
(tramp-build-prefix-format, tramp-build-prefix-regexp)
(tramp-build-method-regexp)
(tramp-build-postfix-method-format)
(tramp-build-postfix-method-regexp)
(tramp-build-prefix-ipv6-format)
(tramp-build-prefix-ipv6-regexp)
(tramp-build-postfix-ipv6-format)
(tramp-build-postfix-ipv6-regexp)
(tramp-build-postfix-host-format)
(tramp-build-postfix-host-regexp)
(tramp-build-file-name-regexp)
(tramp-build-completion-file-name-regexp): New defuns.
(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, tramp-file-name-regexp)
(tramp-completion-file-name-regexp): Convert defuns into defvars.
(tramp-prefix-regexp-alist)
(tramp-postfix-method-regexp-alist)
(tramp-prefix-ipv6-regexp-alist)
(tramp-postfix-ipv6-regexp-alist)
(tramp-postfix-host-regexp-alist)
(tramp-remote-file-name-spec-regexp-alist): Remove.
(tramp-build-remote-file-name-spec-regexp)
(tramp-build-file-name-structure): Simplify.
(tramp-completion-file-name-regexp-alist): New defconst.
(tramp-tramp-file-p, tramp-dissect-file-name)
(tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name)
(tramp-rfn-eshadow-update-overlay-regexp)
(tramp-register-file-name-handlers)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-dissect-file-name, tramp-clear-passwd):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
(tramp-compute-multi-hops): Use variables but functions for
file name components.
* test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
Use variables but functions for file name components.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Eli Zaretskii [Sun, 10 Sep 2017 16:01:16 +0000 (19:01 +0300)]
; * configure.ac: Fix last change.
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.
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)
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.
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.
Paul Eggert [Sat, 9 Sep 2017 07:50:53 +0000 (00:50 -0700)]
* etc/NEWS.25: Document 25.3 changes.
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.
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.
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.
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.
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)
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.
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.
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.
Miles Bader [Sat, 9 Sep 2017 14:28:08 +0000 (23:28 +0900)]
; Add a comment for make-text-button in rcirc-markup-urls
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)
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.
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.
Miles Bader [Fri, 19 Sep 2014 06:33:13 +0000 (15:33 +0900)]
* admin/quick-install-emacs: Tweak configure.ac parsing
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.
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)
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
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
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
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.
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)
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)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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)