1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

130151 Commits

Author SHA1 Message Date
Eli Zaretskii
63daecda01 Fix the MS-Windows build
* src/fileio.c (Frename_file): Don't use ENOTSUP if it is equal to
ENOSYS.  (Bug#28097)  (Bug#27986)
2017-08-15 19:17:41 +03:00
Ted Zlatanov
7f8e50fb2a
* .gitlab-ci.yml: run "autogen.sh autoconf" to avoid Git. 2017-08-15 10:07:46 -04:00
Ted Zlatanov
b95efd359c
* .gitlab-ci.yml: add Git to the installed packages. 2017-08-15 10:01:04 -04:00
Simen Heggestøyl
141cc78aa4 Support indentation of detached Less CSS rulesets
* lisp/textmodes/css-mode.el (css-smie-rules): Provide better support
for indentation of detached rulesets passed to Less mixins.

* test/manual/indent/less-css-mode.less: New file.
2017-08-15 14:38:15 +02:00
Simen Heggestøyl
85a9f42b6c Fixes and tweaks for the new Less CSS mode
* etc/NEWS: Add an entry for the new mode.

* lisp/textmodes/less-css-mode.el (less-css): Tweak docstring.
(less-css-lessc-command): Tweak docstring. Don't mark it as
safe. Don't autoload.
(less-css-compile-at-save, less-css-lessc-options)
(less-css-output-directory): Tweak docstrings. Don't autoload.
(less-css-output-file-name): Tweak docstring. Don't mark it as safe.
(less-css-input-file-name): Tweak docstring. Don't autoload.
(less-css-compile-maybe): Use `when' for one-armed `if'.
(less-css--output-path): Tweak docstring.
(less-css--maybe-shell-quote-command): Remove function.
(less-css-compile): Don't autoload. Tweak docstring and message. Fix
compiler warning. Use `string-join' instead of `mapconcat'.
(less-css-font-lock-keywords): Use `font-lock-variable-name-face' for
variables.
(less-css-mode-syntax-table, less-css-mode-map): New variables.
(less-css-mode): Change status line mode name from "LESS" to
"Less". Tweak docstring. Move syntax table definitions to
`less-css-mode-syntax-table'.
(less-css-indent-line): Remove function.
2017-08-15 12:29:10 +02:00
Steve Purcell
3f887812e7 New major mode: Less CSS mode
* lisp/textmodes/less-css-mode.el: New file.
2017-08-15 12:28:53 +02:00
Tino Calancha
66b75d3f20 archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
* lisp/arc-mode.el (archive-int-to-mode):
Swap order of 2048 and 1024 tests (Bug#28092).
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
Update test.
2017-08-15 15:43:31 +09:00
Paul Eggert
97460582e2 Improve rename-file port to macOS
* src/fileio.c (Frename_file): On macOS, renameat_noreplace can
fail with errno == ENOTSUP on file systems where it is not
supported, according to the Apple documentation.
2017-08-14 18:16:23 -07:00
Noam Postavsky
e88bbd22c5 Speed up ./configure with more caching (Bug#27960)
* configure.ac: Cache the 'GTK compiles', 'GSettings is in gio',
'LN_S', '-znocombreloc', 'sysinfo', 'gcc autodepends', '-b link',
'Xkb', 'Xpm preprocessor', 'tputs library' 'GLib', 'signals via
characters', and 'Windows API header' checks.  Remove pause after
warning about GTK bug.
2017-08-14 20:19:12 -04:00
Paul Eggert
13a846823a Improve rename-file behavior on macOS
Problem reported by Philipp Stephani (Bug#27986).
* src/fileio.c (Frename_file):
Worry about file name case sensitivity only if CYGWIN or DOS_NT.
* src/sysdep.c (renameat_noreplace): Use renameatx_np on macOS,
since this provides the necessary atomicity guarantees.
2017-08-14 15:53:28 -07:00
Glenn Morris
4fe9a9efcf Clean up temp files after some tests
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--with-temp-file): Also delete .elc file if present.
* test/lisp/progmodes/etags-tests.el
(etags-buffer-local-tags-table-list): Delete temp file at end.
2017-08-14 17:23:18 -04:00
Eli Zaretskii
5ba4c7d16b Implement renameat_noreplace for MS-Windows
* src/sysdep.c (renameat_noreplace) [WINDOWSNT]: Implement minimal
emulation for MS-Windows.  (Bug#27986)
2017-08-14 19:31:12 +03:00
Eli Zaretskii
16f11be4b9 Fix 'rename' on MS-Windows
* src/w32.c (sys_rename_replace): Use the FORCE argument only if
the primitive rename errors out with EEXIST.
2017-08-14 19:17:22 +03:00
Michael Albinus
65899e5b01 * lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Support ftp-ssl. 2017-08-14 18:05:58 +02:00
Mark Oteiza
ab2da681b9 Tiny JSON performance improvement
Get rid of some needless uses of apply.  Measuring with
  (benchmark-run 10 (json-read-file "test.json"))
showed 1.5-2.5% reduction of execution time.
* lisp/json.el (json-peek): Nix let-binding.
(json-read-string): Use concat for making a string from chars.
(json-read-array): Use cond and more appropriate conversion instead
of blindly applying.
2017-08-14 01:54:11 -04:00
Paul Eggert
5bdc97d55d Be consistent in spelling 'ok-if-already-exists'. 2017-08-13 11:55:12 -07:00
Eli Zaretskii
8de2edd9ef Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2017-08-13 18:58:24 +03:00
Alexander Gramiak
e2e3856141 Use 'header-line-highlight' face in proced and erc
* lisp/erc/erc-list.el (erc-list-button):
* lisp/proced.el (proced-format): Use the 'header-line-highlight
face.  (Bug#28033)
2017-08-13 17:56:31 +03:00
Ulf Jasper
abab4b091f Remove feeds with dead uris from newsticker--raw-url-list-defaults
* lisp/net/newst-backend.el (newsticker--raw-url-list-defaults):
  Remove feeds with dead uris.
2017-08-13 16:55:03 +02:00
Eli Zaretskii
2367c15b18 Fix vertical cursor motion when cursor is on the fringe
* lisp/simple.el (line-move-visual): Fix an off-by-one error in
setting temporary-goal-column when newline overflows into the
fringe.  Support that use case in R2L paragraphs as well.
2017-08-13 17:53:48 +03:00
Eli Zaretskii
28a5b8adcc Fix vertical cursor motion across too wide images
* src/indent.c (Fvertical_motion): If lines are truncated and we
end up beyond the right margin of the window, don't assume we are
in the next screen line, unless VPOS actually says so.  (Bug#28071)
2017-08-13 17:49:07 +03:00
Tino Calancha
8c8be4f8f4 Add test suites for arc-mode and tar-mode
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode)
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-grind-file-mode):
New tests.
2017-08-13 23:41:46 +09:00
Tino Calancha
00bc04f606 * lisp/tar-mode.el (tar-grind-file-mode): Fix docstring 2017-08-13 23:38:29 +09:00
Ulf Jasper
0b858d9a88 Fix uri of Emacs Wiki
* lisp/net/newst-backend.el (newsticker--raw-url-list-defaults): Fix
  uri of Emacs Wiki.  (Bug#27981)
2017-08-13 16:26:31 +02:00
Michael Albinus
55a5e30c9f ; Do not mention ange-ftp-lovers ML in ange-ftp.el (Bug#28075) 2017-08-13 10:45:22 +02:00
Paul Eggert
ebf53ed4f6 Fix make-temp-file bug with ""/"."/".." prefix
The bug with "." and ".." has been present for a while; I
introduced the bug with "" earlier today in my patch for Bug#28023.
* lisp/files.el (make-temp-file): Do not use expand-file-name if
PREFIX is empty or "." or "..", as it does the wrong thing.
Compute absolute-prefix here ...
(files--make-magic-temp-file): ... instead of here ...
* src/fileio.c (Fmake_temp_file_internal): ... or here.

* lisp/files.el (make-temp-file): If the prefix is empty, append
"/" to the absolute prefix so that the new files are children
rather than siblings of temporary-file-directory.  This fixes a
bug introduced in the previous change.
* test/lisp/files-tests.el (files-test-make-temp-file-empty-prefix):
New test, for the bug.
2017-08-12 20:05:23 -07:00
Paul Eggert
a6ad98ad66 Improve make-temp-file performance on local files
For the motivation behind this patch, please see Bug#28023 and:
http://emacshorrors.com/posts/make-temp-name.html
Although, given the recent changes to Tramp, the related security
problem in make-temp-file is already fixed, make-temp-file still has
several unnecessary system calls.  In the typical case on GNU/Linux,
this patch replaces 8 syscalls (symlink, open, close, readlinkat, uname,
getpid, unlink, umask) by 2 (open, close).
* admin/merge-gnulib (GNULIB_MODULES): Add tempname, now
that Emacs is using it directly.
* configure.ac (AUTO_DEPEND): Remove AC_SYS_LONG_FILE_NAMES;
no longer needed.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/files.el (files--make-magic-temp-file): Rename from
make-temp-file.
(make-temp-file): Use make-temp-file-internal for
non-magic file names.
* src/fileio.c: Include tempname.h.
(make_temp_name_tbl, make_temp_name_count)
(make_temp_name_count_initialized_p, make_temp_name): Remove.
(Fmake_temp_file_internal): New function.
(Fmake_temp_name): Use it.
* src/filelock.c (get_boot_time): Use Fmake_temp_file_internal
instead of make_temp_name.
2017-08-12 15:14:45 -07:00
Paul Eggert
9eb30cb036 Document internal-use naming conventions
* doc/lispref/functions.texi (Function Names):
* doc/lispref/variables.texi (Tips for Defining):
Document naming conventions for internal-use functions and vars.
See Bug#28023#59.
2017-08-12 10:55:40 -07:00
Paul Eggert
81e22163eb Simplify re and document 'autoconf.sh all'
* GNUmakefile (ALL_IF_GIT): Remove; no longer needed, now that
./autogen.sh defaults to "all".  All uses removed.
* README: Mention autoconf.sh's effect on Git configuration.
2017-08-12 09:09:40 -07:00
Paul Eggert
ed9404692f Default autogen.sh to 'all'
This addresses a problem noted by RMS in:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00052.html
* autogen.sh (do_git): Set to true if this script is invoked
with no arguments and there is a .git subdirectory.
2017-08-12 09:09:40 -07:00
Paul Eggert
bbf52c142a Adjust jka-compr to recent Tramp changes.
* lisp/jka-compr.el (jka-compr-write-region):
Two new args LOCKNAME and MUSTBENEW.
2017-08-12 08:52:53 -07:00
Eli Zaretskii
a685d9d759 Improve doc strings of 2 functions in simple.el
* lisp/simple.el (beginning-of-visual-line)
(move-beginning-of-line): Doc fix.  Reported by
Justin Burkett <justin@burkett.cc>.
2017-08-12 15:11:16 +03:00
Eli Zaretskii
fce2b2d2b4 Fix completion on directory names on MS-DOS/MS-Windows
* src/msdos.c (faccessat):
* src/w32.c (faccessat): Support relative file names, and add D_OK
to 'mode' if the argument is a directory.  This unbreaks file-name
completion when the completion result is a directory.
2017-08-12 14:44:20 +03:00
Michael Albinus
ec5cfaa456 Implement EXCL of write-region for Tramp
* lisp/net/ange-ftp.el (ange-ftp-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region)
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region)
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Implement MUSTBENEW.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-add-name-to-file)
(tramp-do-copy-or-rename-file)
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
Adapt error message for `file-already-exists'.

* src/lisp.h:
* src/eval.c (call8): New function.

* src/fileio.c (write_region): Pass also lockname and
mustbenew to the file name handler.

* test/lisp/net/tramp-tests.el (tramp-test10-write-region):
Add tests for MUSTBENEW.
2017-08-12 12:30:39 +02:00
Eli Zaretskii
e94b0d4d54 Adapt Proced display to display-line-numbers
* lisp/proced.el (proced-header-line): Account for the width taken
by display-line-numbers.  (Bug#27895)
2017-08-12 13:18:13 +03:00
Eli Zaretskii
a955d79516 Adapt tabulated list when display-line-number is turned on
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Add
a hook to revert the display when display-line-numbers is turned
on.  (Bug#27895)
2017-08-12 12:45:05 +03:00
Eli Zaretskii
8cc8ad02bd Use Gnulib 'tempname' on MS-Windows
* lib-src/ntlib.h (mkdir, open): Remove redefinitions.  They are
now in nt/inc/ms-w32.h.
* lib-src/ntlib.c (sys_mkdir, sys_open): New functions.
(mkostemp): Remove.

* src/w32.c (mkostemp): Remove.
(sys_mkdir): Accept a second (unused) argument.
* src/fileio.c (Fmake_directory_internal): Remove the WINDOWSNT
specific call to mkdir.  (Bug#28023)

* nt/inc/ms-w32.h (mkdir): Remove from "#ifdef emacs" and redefine
to accept 2 arguments.
(open): Remove from "#ifdef emacs".
* nt/mingw-cfg.site (ac_cv_func_mkostemp): Remove.
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_mkostemp)
(OMIT_GNULIB_MODULE_tempname): Remove.
2017-08-12 11:29:37 +03:00
Alexander Gramiak
84288cf421 Add new face 'header-line-highlight'
* lisp/faces.el: Define the face.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
* lisp/info.el (Info-fontify-node): Use the new face.
* doc/emacs/display.texi (Standard Faces):
* etc/NEWS: Document the new face.  (Bug#28033)
2017-08-12 10:12:36 +03:00
Arash Esbati
19d2b4a3e2 Make a case-sensitive match for strings
* lisp/textmodes/reftex.el (reftex-typekey-check): Temporarily
let-bind `case-fold-search' to nil in order to be case-sensitive
when matching a string.  (Bug#27518)
2017-08-12 08:11:11 +02:00
Stephen Berman
e3ed43f4ac Fix a minor todo-mode regression
* lisp/calendar/todo-mode.el (todo-get-overlay): Wrap in
save-excursion.  This fixes a regression introduced by the fix
for bug#27609, whereby trying to raise the priority of the
first item or lower the priority of the last item, which
should be noops, moves point to the item's start.  Clarify
comment.

* test/lisp/calendar/todo-mode-tests.el
(todo-test-raise-lower-priority): Add test cases for trying to
raise first item and lower last item.
(with-todo-test): Clear abbreviated-home-dir, since we change HOME.
(todo-test-toggle-item-header02): Remove ":expected-result
:failed" and tests of point after todo-next-item, since the
effect when using Todo mode is not reproducible in the test
environment.  Add commentary about this.
2017-08-11 11:28:57 +02:00
Paul Eggert
a56e6e7961 Improve performance for rename-file etc.
Although this does not fix Bug#27986, it is a step forward.
I plan to propose a more-significant patch later.
* lisp/files.el (directory-name-p): Move from here ...
* src/fileio.c (Fdirectory_name_p): ... to here.
(directory_like, cp_like_target): New static functions.
(Fcopy_file, Frename_file, Fadd_name_to_file)
(Fmake_symbolic_link):
Use them, to avoid directory-testing syscalls on file names that
must be directories if they exist.  Omit unnecessary
initializations and CHECK_STRING calls.
(Frename_file): Don't call file_name_case_insensitive_p
twice on the same file.  Compare both file names expanded, instead
of the old name expanded and the new one unexpanded.
2017-08-11 01:07:31 -07:00
Noam Postavsky
179499cde9 Respect buffer-local value of tags-table-list (Bug#27772)
* lisp/progmodes/etags.el (visit-tags-table-buffer): Save the current
buffer around the `tags-table-including' calls so as to get buffer
local variables from the right buffer later.
* test/lisp/progmodes/etags-tests.el (etags-visit-tags-table-buffer):
New test.
* test/lisp/progmodes/etags-tests.el (etags-tests--test-dir): New
constant.
(etags-bug-158, etags-bug-23164): Use it so that when running the test
interactively, setting EMACS_TEST_DIRECTORY is not needed.
2017-08-10 21:30:37 -04:00
Tom Tromey
81656add81 Fix auto-filling regression
Bug#28003
* lisp/newcomment.el (comment-indent-new-line): Check
comment-auto-fill-only-comments.  Reverts earlier change.
* lisp/simple.el (internal-auto-fill): Call auto-fill-function, not
do-auto-fill.
2017-08-09 16:06:23 -06:00
Paul Eggert
904be8c4cf Merge from gnulib
This incorporates:
2017-08-09 tempname: do not depend on secure_getenv
2017-08-08 extensions: add _OPENBSD_SOURCE
2017-08-06 manywarnings: Add support for C++
2017-08-06 warnings, manywarnings: Add support for multiple languages
* admin/merge-gnulib: Don't use m4/manywarnings-c++.m4.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/secure_getenv.c, m4/secure_getenv.m4: Remove.
* lib/tempname.c, m4/extensions.m4, m4/manywarnings.m4, m4/warnings.m4:
Copy from gnulib.
2017-08-09 11:46:06 -07:00
Eli Zaretskii
7fc27ea70b Fix crashing emacs-module tests on MS-Windows
* src/w32fns.c (syms_of_w32fns) <w32-disable-abort-dialog>: New
variable.
(emacs_abort): If w32-disable-abort-dialog is non-nil, abort right
away, without displaying the Abort dialog, which waits for the user.

* test/src/emacs-module-tests.el (module--test-assertion): Run the
inferior Emacs with the w32 abort dialog disabled.  Expect the
status of the aborted Emacs sub-process to be 3 on MS-Windows and
2 on MS-DOS.
2017-08-09 20:15:46 +03:00
Tino Calancha
da4438e14f dired-delete-file: Dont't ask for empty dirs
* lisp/dired.el (dired--yes-no-all-quit-help): New defun.
(dired-delete-file): Use it.  Dont't ask for empty dirs (Bug#27940).

* test/lisp/dired-tests.el (dired-test-with-temp-dirs):
New auxiliar macro.
(dired-test-bug27940): Add new test.
2017-08-09 14:48:49 +09:00
Tino Calancha
9ecbdeeaa8 Ask files for deletion in buffer order: top first, botton later
* lisp/dired.el (dired-do-flagged-delete, dired-do-delete):
Call `nreverse' t invert the output of `dired-map-over-marks'.
2017-08-09 14:37:21 +09:00
Alexander Gramiak
9723782161 Use help-mode xrefs in describe-font
* lisp/international/mule-diag.el (describe-font): Use help-setup-xref
(Bug#27890).
2017-08-08 19:57:24 -04:00
Katsumi Yamaoka
2ef880cc75 Don't try to jump to non-existent part (bug#28013)
* lisp/gnus/gnus-art.el (gnus-article-edit-part): Don't try to jump to
the next part if there is the only one part in the article (bug#28013).
2017-08-08 23:40:27 +00:00
Mark Oteiza
63b5a4a65e Replace some uses of eval
There are a number of places where eval is used unnecessarily to get
or set the value of a symbol.
* lisp/calendar/calendar.el (diary-date-forms): Use default-value in
custom setter.
* lisp/desktop.el (desktop-clear): Use set-default instead.
* lisp/international/ogonek.el (ogonek-read-encoding): Use
symbol-value.
2017-08-08 15:10:49 -04:00