summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge null and without-null regexp alists (Bug#27840, Bug#27873)Noam Postavsky2017-08-063-51/+43
| | | | | | | | | | | | | * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Allow for NUL characters following filename in grep context lines. (grep--regexp-alist-column, grep--regexp-alist-bin-matcher) (grep-with-null-regexp-alist, grep-fallback-regexp-alist): Remove. (grep-regexp-alist): Recombine their contents here. (grep-mode): * lisp/cedet/semantic/symref/grep.el (semantic-symref-parse-tool-output-one-line): * lisp/progmodes/xref.el (xref-collect-matches): Use the variable `grep-regexp-alist' rather than the function.
* Fix some crashes on self-modifying Elisp codePaul Eggert2017-08-062-61/+87
| | | | | | | | | | | | | | | | | | | | | | | | Prompted by a problem report by Alex in: http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00143.html * src/eval.c (For, Fprogn, Fsetq, FletX, eval_sub): Compute XCDR (x) near XCAR (x); although this doesn't fix any bugs, it is likely to run a bit faster with typical hardware caches. (Fif): Use Fcdr instead of XCDR, to avoid crashing on self-modifying S-expressions. (Fsetq, Flet, eval_sub): Count the number of arguments as we go instead of trusting an Flength prepass, to avoid problems when the code is self-modifying. (Fquote, Ffunction, Fdefvar, Fdefconst): Prefer !NILP to CONSP where either will do. This is mostly to document the fact that the value must be a proper list. It's also a tiny bit faster on typical machines nowadays. (Fdefconst, FletX): Prefer XCAR+XCDR to Fcar+Fcdr when either will do. (eval_sub): Check that the args are a list as opposed to some other object that has a length. This prevents e.g. (if . "string") from making Emacs dump core in some cases. * test/src/eval-tests.el (eval-tests--if-dot-string) (eval-tests--let-with-circular-defs, eval-tests--mutating-cond): New tests.
* * etc/tutorials/TUTORIAL.he: Update to match recent changes to TUTORIAL.Eli Zaretskii2017-08-061-3/+9
|
* ; Fix previous commitMark Oteiza2017-08-061-2/+4
| | | | | | | The mailcap minibuffer completion used dynamic binding. Locally set a dynamic variable. * lisp/dired-aux.el: Store list of files in `minibuffer-completion-table'.
* Minor tweak in a dired testTino Calancha2017-08-061-2/+6
| | | | | * test/lisp/dired-tests.el (dired-test-bug27968): Ensure the new header has different length than the original one.
* dired-delete-file: Do not TAB complete the user answerTino Calancha2017-08-061-16/+21
| | | | | | | | | This action might delete directories containing valuable information. Before previous commit, we prompted users with `yes-or-no-p' which doesn't TAB complete the user answer. Let's play safe and keep requiring full answers. * emacs-master/lisp/dired.el (dired-delete-file): Use `read-string' instead of `completing-read' to read the user answers.
* dired-do-delete: Allow to delete dirs recursively without promptsTino Calancha2017-08-063-18/+60
| | | | | | | | | | | | | | * lisp/dired.el (dired-delete-file): Accept 2 additional answers: 'all', to delete all directories recursively and no prompt anymore. 'quit', to cancel directory deletions (Bug#27940). Show help message when user inputs 'help'. (dired-do-flagged-delete): Bind locally dired-recursive-deletes so that we can overwrite its global value. Wrapp the loop within a catch '--delete-cancel to catch when the user abort the directtry deletion. * doc/emacs/dired.texi (Dired Deletion): Update manual. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.1): Announce this change.
* Fix a couple of make-temp-file racesPaul Eggert2017-08-052-24/+26
| | | | | | | | | * lisp/emacs-lisp/autoload.el (autoload--save-buffer): * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Use make-temp-file, not make-temp-name, to avoid an unlikely race that could lose data. Remove the deletion hook as quickly as possible after the file is renamed; though a race still remains here, it is smaller than before.
* Dired w/ eshell-ls: Handle shell wildcards in file nameTino Calancha2017-08-062-8/+37
| | | | | | * lisp/eshell/em-ls.el (eshell-ls--insert-directory): Use eshell-extended-glob (Bug#27844). * test/lisp/dired-tests.el (dired-test-bug27844): Add test.
* dired-revert: save line numbers instead of positionsTino Calancha2017-08-062-9/+61
| | | | | | | | | | | | Positions might change if the length of one dired header line changes; this happen, for instance, if we add new files. Instead, line numbers are invariant under shrinks/enlargements of the file header. https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html * lisp/dired.el (dired-save-positions): Save the line numbers at point. (dired-restore-positions): Use forward-line to restore the original position (Bug#27968). * test/lisp/dired-tests.el (dired-test-bug27968): Add test.
* Respect comment-auto-fill-only-commentsTom Tromey2017-08-053-7/+16
| | | | | | | | | | | | Respect comment-auto-fill-only-comments when auto-filling and a comment syntax is defined. * lisp/newcomment.el (comment-indent-new-line): Do not check comment-auto-fill-only-comments. * lisp/simple.el (internal-auto-fill): New defun. * src/cmds.c (internal_self_insert): Call Qinternal_auto_fill, not auto_fill_function. (syms_of_cmds): Define Qinternal_auto_fill.
* * etc/tutorials/TUTORIAL: Update.Richard Stallman2017-08-051-6/+10
|
* Unify CNS11643-15 in a way that avoids segfaultsEli Zaretskii2017-08-051-3/+3
| | | | | | * lisp/international/mule-conf.el: Redo unification of cns11643-15. (Bug#27964) (chinese-cns11643-15): Add the missing :unify-map attribute.
* Avoid segfaults while producing Punct.elEli Zaretskii2017-08-051-1/+2
| | | | | | * lisp/international/mule-conf.el: Undo unification of cns11643-15, as that causes segfaults during bootstrap. (Bug#27964)
* Make header line in some modes be sensitive to display-line-numbersEli Zaretskii2017-08-052-3/+18
| | | | | | | * lisp/ruler-mode.el (ruler-mode-ruler, ruler-mode-window-col): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header) (tabulated-list-print-entry): Account for the width taken by line-number display. (Bug#27895)
* Fix a bug in 'generate-new-buffer-name'Eli Zaretskii2017-08-052-1/+7
| | | | | | | | | * src/buffer.c (Fgenerate_new_buffer_name): Test IGNORE for being nil before calling string-equal, since the latter will compare "nil and 'nil' as equal. (Bug#27966) * test/src/buffer-tests.el (test-generate-new-buffer-name-bug27966): New test.
* Unify CNS11643-15Eli Zaretskii2017-08-051-0/+1
| | | | | * lisp/international/mule-conf.el (chinese-cns11643-15): Add a unify-charset form for it. (Bug#27964)
* Improve test of error message when Emacs cannot be suspendedEli Zaretskii2017-08-052-2/+2
| | | | | | * lisp/term/x-win.el (x-win-suspend-error): * lisp/term/ns-win.el (ns-suspend-error): Improve the error message. (Bug#27901)
* Make "C-h o" show faces as well as variablesAlexander Gramiak2017-08-052-3/+3
| | | | | | * lisp/faces.el (describe-face): Return (buffer-string). Reorder the placement of variables/faces in describe-symbol, to put more emphasis on the variable entry rather than the face. (Bug#24543)
* Fix files-tests.el for MS-WindowsEli Zaretskii2017-08-051-4/+5
| | | | | | * test/lisp/files-tests.el (files-tests--file-name-non-special--subprocess): Fix this test for MS-Windows.
* Improve documentation of 'region-extract-function'Eli Zaretskii2017-08-051-11/+12
| | | | | * lisp/simple.el (region-extract-function): Rename the argument to METHOD. Doc fix. (Bug#27927)
* Merge from gnulibPaul Eggert2017-08-042-6/+15
| | | | | | | | This incorporates: 2017-08-04 manywarnings: port to 64-bit GCC builds of Emacs 2017-08-01 manywarnings: port to 32-bit GCC bug * lib/gnulib.mk.in: Regenerate. * m4/manywarnings.m4: Copy from gnulib.
* Port recent rename changes to Ubuntu 14.04Paul Eggert2017-08-041-1/+1
| | | | | * src/sysdep.c (renameat_noreplace) [!RENAME_NOREPLACE]: Don’t use syscall. Problem reported by Tino Calancha (Bug#27946#10).
* insert-directory-wildcard-in-dir-p: Tweak regexpTino Calancha2017-08-052-1/+19
| | | | | | | This function must return non-nil for a wildcard like '/*/*.txt'. * lisp/files.el (insert-directory-wildcard-in-dir-p): Adjust regexp. * test/lisp/files-tests.el (files-tests--insert-directory-wildcard-in-dir-p): Add test.
* ; * lisp/emacs-lisp/re-builder.el: Fix commentary (Bug#27947).Noam Postavsky2017-08-041-2/+2
|
* ; Fix map-tests when compiledNoam Postavsky2017-08-041-6/+10
| | | | | | * test/lisp/emacs-lisp/map-tests.el (test-map-elt-testfn) (test-map-put-testfn-alist): Make sure the lookup key is really non-eq to the map's key, even if the code is compiled.
* Implement iterator generator for avl-trees.Toby S. Cubitt2017-08-041-1/+16
| | | | * lisp/emacs-lisp/avl-tree.el (avl-tree-iter): New iter-defun.
* ls-lisp: Drop eshell dependenciesTino Calancha2017-08-051-9/+1
| | | | | | | | Use 'file-expand-wildcards' instead of 'eshell-extended-glob' to expand the wildcards. Suggested by Fabrice Popineau in: https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00108.html * lisp/ls-lisp.el (ls-lisp--dired): Use file-expand-wildcards.
* ; Improve commentary of Info-default-directory-listEli Zaretskii2017-08-041-1/+5
| | | | | * lisp/info.el (Info-default-directory-list): Describe in the commentary when it is initialized. (Bug#27933)
* Fix dired-test-bug27631 on MS-WindowsTino Calancha2017-08-041-0/+4
| | | | | | | | Skip the test if Dired use 'ls' emulation with lisp. The same bug is tested in their respective test suites: ls-lisp-tests.el and em-ls-tests.el. * test/lisp/dired-tests.el (dired-test-bug27631): Skip test if 'ls-lisp' or 'eshell' features are enabled.
* Fix dired-test-bug25609 on MS-WindowsEli Zaretskii2017-08-041-0/+9
| | | | | | * test/lisp/dired-tests.el (dired-test-bug25609): On MS-Windows, pass temporary files through file-truename, to avoid bogus failures due to file-name comparison as strings.
* Fix 2 tests that fail in MS-WindowsTino Calancha2017-08-042-24/+49
| | | | | | | | | | | | | | | https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): Add comments to explain the test logic. Pass '--binary' option to 'patch' program in windows environments. Check explicitely that a backup is created before compare file contents. * test/lisp/dired-tests.el (dired-test-bug25609): Declare variable 'dired-dwim-target' right before the test. Add comments to explain the test logic. Ensure, before test the bug condition, that we are displaying the 2 dired buffers created in this test, and no other dired buffer is shown.
* * lisp/shell.el (explicit-shell-file-name): Mention shell-file-nameStefan Monnier2017-08-043-6/+6
| | | | | * lisp/files.el (insert-directory): Don't hardcode "-c". * lisp/term.el (term, ansi-term): Use shell-file-name.
* Fix version numbers for some GnuTLS featuresPaul Eggert2017-08-032-215/+171
| | | | | | | | | | | | Problem reported by Glenn Morris (Bug#27708#58). * src/gnutls.c (HAVE_GNUTLS_X509_SYSTEM_TRUST): New macro. Use it instead of low-level version number checks. (HAVE_GNUTLS_AEAD): Move here from gnutls.h, and rename from HAVE_GNUTLS3_AEAD. All uses changed. Indent preprocessor lines. * src/gnutls.h (HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_DIGEST) (HAVE_GNUTLS3_HMAC): Remove, since these were available before GnuTLS 3.0.0 and the code checks them only if HAVE_GNUTLS3 is defined. Remove all uses; this simplifies the code a bit.
* Port recent rename changes to RHEL 7 + NFSPaul Eggert2017-08-031-15/+30
| | | | | | | | | | | Problem reported by Ted Zlatanov in: http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00082.html * src/fileio.c (Frename_file): On RHEL 7 + NFS, renameat2 can fail with errno == EINVAL when it is not supported. So treat that case like errno == ENOSYS. Also, when ok_if_already_exists is neither nil nor an integer, just call plain rename; this avoids an extra syscall to renameat2 when the latter fails with errno == EINVAL or ENOSYS or ENOENT.
* Port GnuTLS usage to Ubuntu 16.04.2 LTSPaul Eggert2017-08-031-1/+10
| | | | | * src/gnutls.h (HAVE_GNUTLS3_AEAD): Define only if GnuTLS 3.5.1 or later, as opposed to the old 3.4.0 or later.
* Simplify configuration of HAVE_GNUTLS3 etc.Paul Eggert2017-08-022-85/+10
| | | | | | | | | | There's only one GnuTLS, so configuring these symbols at 'configure' time is overkill. Simplify things by moving their configuration to src/gnutls.h (Bug#27708). * configure.ac (HAVE_GNUTLS3, HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD) (HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_DIGEST): Move these definitions from here ... * src/gnutls.h: ... to here, and simplify.
* Default to --with-mailutils if it is installedPaul Eggert2017-08-024-17/+25
| | | | | | * configure.ac (with_mailutils): Default to 'yes' if GNU Mailutils is installed. See: http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00054.html
* Clarify when autogen.sh should run only autoconfPaul Eggert2017-08-021-2/+2
| | | | | | * Makefile.in (configure, bootstrap): Run ‘./autogen.sh autoconf’, not plain ‘./autogen.sh’, to make it clear that only autoconf-related tools should be run here.
* .gitlab-ci.yml: Use stretch Debian image instead of unstableToon Claes2017-08-021-1/+1
|
* Add debugging messages to a Dired testStephen Berman2017-08-021-2/+10
| | | | | | * test/lisp/dired-tests.el (dired-test-bug27243-01): Log positions saved and restored by dired-revert to try and find out why the test fails on Hydra.
* ls-lisp: Autoload call instead of cookieTino Calancha2017-08-021-3/+8
| | | | * lisp/ls-lisp.el (eshell-extended-glob): autoload call instead of cookie.
* Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMichael Albinus2017-08-024-70/+100
|\
| * When renaming a file, ask only if EEXIST or ENOSYSPaul Eggert2017-08-024-39/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/fileio.c (Frename_file): Avoid calling Ffile_directory_p more than once on FILE. Use renameat_noreplace, so that we can ask the user (and unlink and retry) only if this fails with errno == EEXIST or ENOSYS. This avoids the need to ask the user for permission to do an operation that will fail anyway. Simplify computation of ok_if_already_exists for subsidiary functions. * src/filelock.c (rename_lock_file): Prefer renameat_noreplace if it works, as this avoids the need to link and unlink. * src/lisp.h (renameat_noreplace): New decl. * src/sysdep.c [HAVE_LINUX_FS_H]: Include linux/fs.h and sys/syscall.h. (renameat_noreplace): New function.
| * When creating a link, ask only if EEXISTPaul Eggert2017-08-021-31/+27
| | | | | | | | | | | | | | * src/fileio.c (Fadd_name_to_file, Fmake_symbolic_link): Ask the user (and unlink and retry) only if link creation fails with errno == EEXIST. This avoids the need to ask the user for permission to do an operation that will fail anyway.
* | ; Extend traces in tramp-test36-asynchronous-requests for hydraMichael Albinus2017-08-021-5/+5
|/
* dired-align-file: Inherit text properties in inserted spacesTino Calancha2017-08-022-1/+16
| | | | | | * lisp/dired.el (dired-align-file): Inherit text properties in inserted spaces (Bug#27899). * test/lisp/dired-tests.el (dired-test-bug27899): Add test.
* Don't assume /bin/sh as the 'sh' location in the local hostTino Calancha2017-08-021-4/+9
| | | | | * lisp/dired.el (dired-insert-directory): Use executable-find in a local host.
* Move dired tests using ls emulation to different filesTino Calancha2017-08-023-92/+140
| | | | | | | | | | | | | | | | | Suggested in: https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html * test/lisp/dired-tests.el (dired-test-bug27693) (dired-test-bug27762, dired-test-bug27817) (dired-test-bug27631, dired-test-bug27843): Delete those parts requiring either ls-lisp or eshell-ls. * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27762) (ls-lisp-test-bug27631, ls-lisp-test-bug27693): Add all dired tests using ls-lisp here. * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631) (em-ls-test-bug27817, em-ls-test-bug27843): New test file. Add all dired tests using eshell-ls here.
* * test/lisp/ls-lisp-tests.el: Rename it from ls-lisp.elTino Calancha2017-08-021-0/+0
|