1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-07 20:54:32 +00:00

130405 Commits

Author SHA1 Message Date
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
Eli Zaretskii
d1da8e534d 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)
2017-09-09 17:20:47 +03:00
Michael Albinus
af11532bb5 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.
2017-09-09 12:31:54 +02:00
Mark Oteiza
be9bc8e67d ; 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.
2017-09-09 00:46:41 -04:00
Miles Bader
ce96408451 * admin/quick-install-emacs: Tweak configure.ac parsing 2017-09-09 12:34:53 +09:00
Miles Bader
b464dab2af 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.
2017-09-09 12:30:33 +09:00
Eli Zaretskii
79150f6086 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)
2017-09-08 16:15:23 +03:00
Alex Branham
5f31879e16 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
2017-09-08 12:36:59 +03:00
Alfred M. Szmidt
9b9c93053a 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
2017-09-08 12:19:24 +03:00
Alfred M. Szmidt
e3476d2937 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
2017-09-08 12:14:58 +03:00
Ken Olum
f82d9323af 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.
2017-09-08 12:08:49 +03:00
Eli Zaretskii
37cde9c6a2 Document last change in dired.el
* etc/NEWS (Dired): Document the last change in dired.el.
(Bug#27435)
2017-09-08 12:02:59 +03:00
Tak Kunihiro
41eb4c518a 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)
2017-09-08 11:52:47 +03:00
Eli Zaretskii
be90cd1412 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.
2017-09-08 11:00:34 +03:00
Eli Zaretskii
e2a10d7fa8 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.
2017-09-08 10:51:14 +03:00
Wilson Snyder
442fe11143 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.
2017-09-07 23:24:28 -04:00
Katsumi Yamaoka
9546e1eba5 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.
2017-09-08 02:16:19 +00:00
Paul Eggert
aedc566a94 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.
2017-09-07 17:47:24 -07:00
Paul Eggert
53830c6336 Remove obsolete vc-mistrust-permissions doc
* doc/emacs/vc1-xtra.texi (RCS and SCCS): Remove documentation
for vc-mistrust-permissions, which no longer exists.
2017-09-07 16:34:52 -07:00
Alan Third
d31cd79b40 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.
2017-09-07 20:49:47 +01:00
Paul Eggert
93bab0fe55 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.
2017-09-07 00:10:54 -07:00
Glenn Morris
a0e3f715fc 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.
2017-09-06 20:06:57 -04:00
Eli Zaretskii
1436ce83d3 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.
2017-09-06 21:00:29 +03:00
Mark Oteiza
9604f9cd33 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.
2017-09-06 13:17:05 -04:00
Mark Oteiza
da3e101634 ; Try not to affect match data
* lisp/xdg.el (xdg-user-dir): Use save-match-data.
2017-09-06 11:20:21 -04:00
Glenn Morris
01a82957d2 ; * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Fix tag. 2017-09-05 20:53:57 -04:00
Glenn Morris
d48f30057f Allow for adjusting line length of test backtraces
* test/Makefile.in (TEST_BACKTRACE_LINE_LENGTH): New option.
(%.log): Respect backtrace line length.
2017-09-05 20:46:38 -04:00
Glenn Morris
52c9c6b9d8 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.
2017-09-05 20:40:10 -04:00
Glenn Morris
a2cf4d49f1 Minor emacsclient-tests simplification
* test/lib-src/emacsclient-tests.el (emacsclient-test-emacs):
Simplify.  Also work when running installed.
2017-09-05 18:55:49 -04:00
Alan Third
732fdeb341 Revert "Force screen update after drawing cursor glyph (bug#23774)"
This reverts commit 1b492fa5456e2b6face8d0856f11d17e432693b0.

See bug#28358
2017-09-05 23:42:20 +01:00
Mark Oteiza
964d672a7f Refactor some loops in mailcap.el
* lisp/net/mailcap.el (mailcap-mime-types):
(mailcap-file-default-commands): Convert nested maps to loops.
2017-09-05 16:45:13 -04:00