1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00
Commit Graph

130435 Commits

Author SHA1 Message Date
Paul Eggert
cb80fd0d50 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.
2017-09-12 12:18:08 -07:00
Paul Eggert
7aa49c2952 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
2017-09-12 12:18:07 -07:00
Mark Oteiza
370d0e7aa7 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.
2017-09-12 13:18:10 -04:00
Mark Oteiza
4612b2a2b3 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.
2017-09-12 13:18:06 -04:00
Eli Zaretskii
c87331a1c0 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2017-09-12 19:29:45 +03:00
Eli Zaretskii
b215b3a2f3 Fix minor typos in the Emacs manual
* doc/emacs/text.texi (Org Organizer):
* doc/emacs/ack.texi (Acknowledgments): Fix spelling of Org nodes.
2017-09-12 19:28:41 +03:00
Paul Eggert
b3fd6831dc 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.
2017-09-12 09:26:37 -07:00
Alan Mackenzie
f4859757b6 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 "<".
2017-09-12 16:23:10 +00:00
Mark Oteiza
35c893ddaf 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.
2017-09-12 11:08:00 -04:00
Mark Oteiza
2ae46b4c0d Fix cl-gentemp
* lisp/emacs-lisp/cl-macs.el (cl--gentemp-counter): New variable.
(cl-gentemp): Use it.  Change prefix to "T".
2017-09-12 11:00:58 -04:00
Sam Steingold
fcf5d894c0 gnus-score-file-name: Do not append empty suffix. 2017-09-12 10:31:26 -04:00
Michael Albinus
49a42fbd27 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'.
2017-09-12 11:20:49 +02:00
Mark Oteiza
370e04fbb2 Add cl-print method for hash tables
* lisp/emacs-lisp/cl-print.el (cl-print-object): New method.
2017-09-11 22:20:41 -04:00
Mark Oteiza
8130186cfb 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.
2017-09-11 22:16:14 -04:00
Mark Oteiza
f6474b4808 ; Fix previous commit
The printer otherwise includes the 0x prefix.
* lisp/emacs-lisp/cl-print.el: Add 0x to format.
2017-09-11 21:23:38 -04:00
Glenn Morris
23252d4ccf 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.
2017-09-11 18:11:37 -04:00
Philipp Stephani
123d52f69c ; * lisp/files.el (basic-save-buffer-2): Fix typo. 2017-09-11 22:13:04 +02:00
Mark Oteiza
a66155555b 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>".
2017-09-11 16:06:06 -04:00
Eli Zaretskii
4c57eda5cf Update documentation of 'max-lisp-eval-depth'
* doc/lispref/eval.texi (Eval): Update the documented default
value of 'max-lisp-eval-depth'.
2017-09-11 19:48:56 +03:00
Eli Zaretskii
7fb03a28e7 Another place to produce debugging output in etags
* lib-src/etags.c (Ruby_functions): One more place to print
debugging output under --debug.
2017-09-11 19:44:38 +03:00
Eli Zaretskii
e33234ab9f 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.
2017-09-11 19:40:43 +03:00
Alan Third
aa4bb9de9d 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.
2017-09-11 17:23:47 +01:00
Michael Albinus
7004545244 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.
2017-09-11 17:12:32 +02:00
Paul Eggert
29963648dd 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.
2017-09-10 23:05:20 -07:00
Paul Eggert
2aa0288259 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.
2017-09-10 22:31:23 -07:00
Paul Eggert
74b8615fcc Adjust ob-tangle to new copy-file behavior
* lisp/org/ob-tangle.el (org-babel-tangle-publish):
Port to new copy-file behavior.
2017-09-10 22:31:23 -07:00
Paul Eggert
739593d687 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.
2017-09-10 22:31:23 -07:00
Paul Eggert
61946d991b 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.
2017-09-10 22:31:23 -07:00
Paul Eggert
e22794867d 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.
2017-09-10 22:31:23 -07:00
Paul Eggert
cf9891e14e 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.
2017-09-10 20:38:19 -07:00
Paul Eggert
01c885f21f 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.
2017-09-10 15:46:51 -07:00
Eli Zaretskii
52739ffe77 Extend --debug printouts in etags
* lib-src/etags.c (regex_tag_multiline, readline): Under
"--debug", print tags found via regexps.
2017-09-10 22:10:33 +03:00
Eli Zaretskii
4b86cf5668 Add --debug option to etags
* lib-src/etags.c (make_tag): Print found tags under --debug.
(longopts): Add --debug.
2017-09-10 19:46:00 +03:00
Paul Eggert
cdef84fb68 Spelling fixes
* lisp/progmodes/cc-langs.el:
(c-ambiguous-overloadable-or-identifier-prefixes): Rename from
c-ambiguous-overloadable-or-identifier-prefices.  Caller changed.
2017-09-10 09:24:37 -07:00
Mark Oteiza
4973788c6a ; Add to last commit
* lisp/xdg.el (xdg-desktop-entry-regexp): Add a commented capture group
for future reference.
2017-09-10 12:20:06 -04:00
Eli Zaretskii
6ae845637b ; * configure.ac: Fix last change. 2017-09-10 19:01:16 +03:00
Paul Eggert
b079ee72ac 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.
2017-09-10 08:40:43 -07:00
Ken Brown
c990f8d93d Implement renameat_noreplace on recent Cygwin
* src/sysdep.c [CYGWIN]: Include cygwin/fs.h.
(renameat_noreplace) [RENAME_NOREPLACE]: Use renameat2.
(Bug#27986)
2017-09-10 11:04:30 -04:00
Eli Zaretskii
43779f9b97 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.
2017-09-10 17:52:41 +03:00
Mark Oteiza
e716538911 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.
2017-09-09 23:14:07 -04:00
Paul Eggert
3ef0c16484 * etc/NEWS.25: Document 25.3 changes. 2017-09-09 15:30:07 -07:00
Lars Ingebrigtsen
19584f13b1 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.
2017-09-09 15:30:07 -07:00
Paul Eggert
743b95cc63 Be more consistent about "directory name" in manual
This clarifies the documentation, partly in response to the
discussion in Bug#27986.
2017-09-09 13:41:20 -07:00
Eli Zaretskii
ad7ba0fbf1 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.
2017-09-09 22:15:30 +03:00
Paul Eggert
d63123542f 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.
2017-09-09 11:11:51 -07:00
Eli Zaretskii
715f0835b5 Fix font-lock in Compilation mode
* lisp/progmodes/compile.el (compilation-face): Restore function
lost during recent changes.  (Bug#28349)
2017-09-09 21:04:31 +03:00
Mark Oteiza
4131f9785e 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.
2017-09-09 12:26:50 -04:00
Gemini Lasswell
68b7ecbac1 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.
2017-09-09 09:06:00 -07:00
Eli Zaretskii
2b84c16662 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.
2017-09-09 18:50:50 +03:00
Miles Bader
e91da7f8f2 ; Add a comment for make-text-button in rcirc-markup-urls 2017-09-09 23:28:08 +09:00