summaryrefslogtreecommitdiff
path: root/test/lisp/files-tests.el
Commit message (Collapse)AuthorAge
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Fix copy-directory bug when dest dir existsPaul Eggert2022-12-17
| | | | | | | | | | * lisp/files.el (copy-directory): Set ‘follow’ depending on whether we made the directory, not based on a guess that is sometimes wrong. When NEWNAME is a directory name and COPY-CONTENTS is nil, do not object merely because the adjusted NEWNAME is already a directory. (Bug#58919). * test/lisp/files-tests.el (files-tests-copy-directory): Test for the bug.
* make-directory now returns t if dir already existsPaul Eggert2022-12-17
| | | | | | | | | | | | | | | This new feature will help fix a copy-directory bug (Bug#58919). Its implementation does not rely on make-directory handlers supporting the new feature, as it no longer uses a make-directory handler H in any way other than (funcall H DIR), thus using only the intersection of the old and new behavior for handlers. This will give us time to fix handlers at our leisure. * lisp/files.el (files--ensure-directory): New arg MKDIR. All uses changed. (files--ensure-directory, make-directory): Return non-nil if DIR is already a directory. All uses changed. * test/lisp/files-tests.el (files-tests-make-directory): Test new return-value convention.
* Use make-directory handlers uniformlyPaul Eggert2022-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formerly, the code supported both make-directory and make-directory-internal handlers. This led to confusion and meant than in a few cases (nnmaildir, ido) remote directories could not be used in some cases. Fix this by using only make-directory handlers. Perhaps there used to be a reason for why there were both make-directory and make-directory-internal handlers, but whatever that reason was, it seems to have vanished even before now. There is no longer any need for make-directory-internal handlers, as the few remaining callers that use make-directory-internal do so only when there are no handlers. However, this change keeps the existing make-directory-internal handlers for now, in case this code is ever used in older Emacs versions that still call those handlers. * lisp/gnus/nnmaildir.el (nnmaildir--mkdir): * lisp/ido.el (ido-file-internal): * lisp/net/tramp-smb.el (tramp-smb-handle-make-directory): Use make-directory, not make-directory-internal. * lisp/net/tramp-smb.el (tramp-smb-handle-make-directory-internal): Now obsolete. * src/fileio.c (Fmake_directory_internal): Do not look for or use a make-directory-internal handler. * test/lisp/files-tests.el: (files-tests-file-name-non-special-make-directory-internal): Remove, as this test incorrectly assumes that make-directory-internal must support handlers.
* Fix data for files-tests-bug-21454 on CygwinKen Brown2022-08-28
| | | | | * test/lisp/files-tests.el (files-tests-bug-21454): Fix test data to reflect the fact that Cygwin supports UNC paths.
* Fix handling of UNCs in 'parse-colon-pathEli Zaretskii2022-08-24
| | | | | | | | | * lisp/files.el (parse-colon-path): Don't remove the second leading slash on systems that support UNCs. (Bug#57353) * test/lisp/files-tests.el (files-tests-bug-21454): Update expected results. (files-colon-path): Add a new test pattern.
* Reinstate the Qload file name handlerLars Ingebrigtsen2022-06-02
| | | | | * src/lread.c (Fload): Reinstate the Qload file name handler (bug#12598). This makes loading non-ASCII elc.gz files work.
* Make files-tests.el more robustMichael Albinus2022-06-01
| | | | | | * test/lisp/files-tests.el (files-tests--with-temp-non-special) (files-tests--with-temp-non-special-and-file-name-handler): Make it more robust wrt parallel test jobs. (Bug#55706)
* ; Fix typosStefan Kangas2022-05-15
|
* Fix elc.gz loading test some moreLars Ingebrigtsen2022-04-23
|
* Add a failing test case for bug#12598Lars Ingebrigtsen2022-04-23
| | | | Author:
* ; Fix repeated lambda argnames in files-tests.el.Basil L. Contovounesios2022-04-20
|
* Fix regression with multiple mode: entries in the prop lineLars Ingebrigtsen2022-04-19
| | | | | | * lisp/files.el (hack-local-variables--find-variables): Use the final mode: line (which is the same as having several mode: bits in the header line.
* Allow several mode: elements in the local variable sectionLars Ingebrigtsen2022-04-19
| | | | | | | * etc/NEWS (mode): Fall back on outline-mode in older Emacsen. * lisp/files.el (hack-local-variables--find-variables): Use the final mode: line (which is the same as having several mode: bits in the header line.
* Fix major-mode setting regression when there's a mode: cookieLars Ingebrigtsen2022-04-18
| | | | | * lisp/files.el (hack-local-variables): Fix regression in setting the major mode when there are mode: cookies in the file (bug#54993).
* Add a new command `restart-emacs'Lars Ingebrigtsen2022-04-17
| | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Killing Emacs): Document it. * lisp/files.el (save-buffers-kill-emacs): Add new RESTART parameter. (restart-emacs): New function. * src/emacs.c (terminate_due_to_signal, Fkill_emacs): Take an optional RESTART parameter. * test/lisp/files-tests.el (files-tests-save-buffers-kill-emacs--confirm-kill-processes): * src/xterm.c (x_connection_closed): * src/xsmfns.c (Fhandle_save_session): * src/keyboard.c (Fcommand_error_default_function, command_loop) (command_loop_1, read_menu_command, read_event_from_main_queue) (read_key_sequence, quit_throw_to_read_char): * src/eval.c (process_quit_flag): Adjust Fkill_emacs callers.
* Fix files-tests on MS-WindowsEli Zaretskii2022-02-17
| | | | | | | | | | * test/lisp/files-tests.el (files-tests-zzdont-rewrite-precious-files): Renamed from 'files-tests-dont-rewrite-precious-files', to fix a subtle problem that breaks 2 tests on MS-Windows. (files-tests-revert-buffer) (files-tests-revert-buffer-with-fine-grain): No need to disable file locking anymore.
* Adjust files-test-file-size-human-readable testLars Ingebrigtsen2022-02-15
| | | | | * test/lisp/files-tests.el (files-test-file-size-human-readable): Fix test after recent change.
* (files-tests--with-buffer-offer-save): Turn it into a functionStefan Monnier2022-01-10
| | | | | | | * test/lisp/files-tests.el (files-tests--with-buffer-offer-save): Turn it into a function. (files-tests-save-buffers-kill-emacs--asks-to-save-buffers) (files-tests-buffer-offer-save): Adjust calls accordingly
* Merge remote-tracking branch 'origin/emacs-28' into trunkStefan Monnier2022-01-10
|\
| * (save-some-buffers): Simplify the fix for bug#46374Stefan Monnier2022-01-09
| | | | | | | | | | | | | | | | | | | | | | * lisp/files.el (save-some-buffers): Only check the `save-some-buffers-function` property on functions from `save-some-buffers-default-predicate` since callers which provide a `pred` argument can arrange to compute `pred` themselves if needed. * test/lisp/files-tests.el (files-tests-buffer-offer-save): Don't test with `pred` set to `save-some-buffers-root` since it's not an appropriate function for that any more.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
* | Change how Dired displays available spaceLars Ingebrigtsen2021-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/dired.texi (Misc Dired Features): Document it (bug#23812). * lisp/dired.el (dired-free-space): New user option. (dired-insert-directory): Use it from here. (dired--insert-disk-space): New function that uses the user option. * lisp/files.el (insert-directory): Don't transform "total" here. * lisp/ls-lisp.el (ls-lisp--insert-directory): Or here. Instead just leave the "total <num>" bit alone, and let Dired transform it. * test/lisp/files-tests.el (files-tests): Move "available" tests to dired-tests. * test/lisp/dired-tests.el (data-dir): Moved here.
* | Make 'eval' use lexical scoping in most testsStefan Kangas2021-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/electric-tests.el (electric-pair-define-test-form) (define-electric-pair-test): * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--uncompiled-functions): * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet): * test/lisp/emacs-lisp/let-alist-tests.el (let-alist-list-to-sexp): * test/lisp/emacs-lisp/lisp-tests.el (elisp-tests-with-temp-buffer, core-elisp-tests-3-backquote): * test/lisp/emacs-lisp/testcover-resources/testcases.el (testcover-testcase-nth-case): * test/lisp/ffap-tests.el (ffap-ido-mode): * test/lisp/files-tests.el (file-test--do-local-variables-test): * test/lisp/net/tramp-tests.el (tramp--test-utf8): * test/lisp/progmodes/elisp-mode-tests.el (find-defs-defgeneric-eval, find-defs-defun-eval) (find-defs-defvar-eval, find-defs-face-eval) (find-defs-feature-eval): Give 'eval' non-nil LEXICAL argument. * test/lisp/subr-tests.el (subr-tests--dolist--wrong-number-of-args): * test/src/eval-tests.el (eval-tests--if-dot-string) (eval-tests--mutating-cond) (eval-tests-19790-backquote-comma-dot-substitution): Test 'eval' using LEXICAL as both nil and non-nil. (eval-tests--let-with-circular-defs): Give explicit nil to 'eval'.
* | Add another 'abbreviate-file-name' testJim Porter2021-11-15
| | | | | | | | | | * test/lisp/files-tests.el (files-tests-file-name-non-special-abbreviate-file-name): New test.
* | Fix problem with non-absolute namesLars Ingebrigtsen2021-11-11
| | | | | | | | | | * lisp/files.el (file-name-split): Fix problem with non-absolute names.
* | Fix files-tests on MS-WindowsEli Zaretskii2021-11-11
| | | | | | | | | | | | | | | | | | * lisp/ls-lisp.el (ls-lisp--insert-directory): Fix free disk space calculation. (Bug#50630) * test/lisp/files-tests.el (files-tests-revert-buffer) (files-tests-revert-buffer-with-fine-grain): Disable locking files.
* | Add tests for 'insert-directory'John Cummings2021-11-11
| | | | | | | | | | | | | | | | | | | | * test/lisp/files-tests.el: Add 'insert-directory' tests. * test/lisp/files-resources/insert-directory/: Create directories and files to use for testing 'insert-directory'. Add tests for 'insert-directory' base functionality and regression tests for the issue where free space was reported for the current directory instead of the target of 'list-directory' (Bug#50630).
* | Add new function 'file-name-split'Lars Ingebrigtsen2021-11-10
| | | | | | | | | | | | | | * doc/lispref/files.texi (File Name Components): Document it. * lisp/files.el (file-name-split): New function (bug#50572). * lisp/emacs-lisp/shortdoc.el (file-name): Mention it.
* | ; Fix duplicate temporary file creationStefan Kangas2021-11-08
| | | | | | | | | | * test/lisp/files-tests.el (files-tests-executable-find): Fix creating duplicate temporary file after recent change.
* | Merge from origin/emacs-28Michael Albinus2021-11-07
|\| | | | | | | | | | | | | | | | | 7fdb2ae412 Add some unit tests for 'abbreviate-file-name' 21de5e7b2e Fix compilation MinGW warnings 54b726c815 ; * etc/PROBLEMS: More specific recipe for WebKit-related ... d85cf33e49 Escape '%' in filenames to fix flymake warnings 6243a43ac2 Fix search string generation in nnimap-make-thread-query f05b8a939b Update to Org 9.5-68-g77e2ec
| * Add some unit tests for 'abbreviate-file-name'Jim Porter2021-11-07
| | | | | | | | | | * test/lisp/files-tests.el (files-tests-abbreviate-file-name-homedir) (files-tests-abbreviate-file-name-directory-abbrev-alist): New tests.
* | Prefer ert-with-temp-(directory|file)Stefan Kangas2021-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/abbrev-tests.el (read-write-abbrev-file-test) (read-write-abbrev-file-test-with-props) (abbrev-edit-save-to-file-test): * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret) (auth-source-delete): * test/lisp/autoinsert-tests.el (autoinsert-tests-auto-insert-file): * test/lisp/bookmark-tests.el (with-bookmark-test-save-load): * test/lisp/buff-menu-tests.el (buff-menu-24962): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-export): * test/lisp/calendar/todo-mode-tests.el (with-todo-test): * test/lisp/dired-tests.el (dired-test-bug27243-01, dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27631) (dired-test-bug27968, dired-test-with-temp-dirs): * test/lisp/dired-x-tests.el (dired-test-bug25942): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-scan) (check-declare-tests-verify-mismatch): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env): * test/lisp/emacs-lisp/package-tests.el (with-package-test) (package-test-signed): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-markup-region) (testcover-tests-run-test-case): * test/lisp/emulation/viper-tests.el (viper-test-undo-kmacro): * test/lisp/epg-tests.el (with-epg-tests): * test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history): * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631): * test/lisp/ffap-tests.el (ffap-tests-25243): * test/lisp/files-tests.el (files-tests-bug-18141) (files-tests-read-file-in-~, files-tests-make-directory) (files-tests-copy-directory, files-tests-executable-find) (files-tests-dont-rewrite-precious-files) (files-tests--save-some-buffers): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27631): * test/lisp/mail/uudecode-tests.el (uudecode-tests-decode-region-internal) (uudecode-tests-decode-region-external): * test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file): * test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive): * test/lisp/progmodes/etags-tests.el (etags-buffer-local-tags-table-list): * test/lisp/progmodes/flymake-tests.el (ruby-backend): * test/lisp/progmodes/python-tests.el (python-tests-with-temp-file): * test/lisp/progmodes/sql-tests.el (with-sql-test-connect-harness): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/file) (saveplace-test-forget-unreadable-files) (saveplace-test-place-alist-to-file): * test/lisp/so-long-tests/spelling-tests.el: * test/lisp/textmodes/reftex-tests.el (reftex-locate-bibliography-files) (reftex-parse-from-file-test): * test/lisp/thumbs-tests.el (thumbs-tests-thumbsdir/create-if-missing): * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-bug32173-02, wdired-test-symlink-name) (wdired-test-unfinished-edit-01, wdired-test-bug34915) (wdired-test-bug39280): * test/src/buffer-tests.el (test-kill-buffer-auto-save-default): * test/src/filelock-tests.el (filelock-tests--fixture): * test/src/inotify-tests.el (inotify-file-watch-simple): * test/src/undo-tests.el (undo-test-file-modified): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly. In some cases, this is just cleanup, but in several cases this fixes bugs where an error would have lead to us not cleaning up.
* | Replace some macros with ert-with-temp-(file|directory)Stefan Kangas2021-11-06
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/custom-tests.el (custom-tests--with-temp-dir): * test/lisp/files-tests.el (files-tests--with-temp-file): * test/lisp/progmodes/project-tests.el (project-tests--with-temporary-directory): * test/src/emacs-module-tests.el (module--with-temp-directory): * test/src/emacs-tests.el (emacs-tests--with-temp-file): * test/src/lread-tests.el (lread-tests--with-temp-file): * test/src/process-tests.el (process-tests--with-temp-directory): Replace macros with 'ert-with-temp-(file|directory)'. Update callers.
* | ; * test/lisp/files-tests.el: Fix last commit.Stefan Kangas2021-10-27
| |
* | Add test for file-name-baseStefan Kangas2021-10-27
|/ | | | * test/lisp/files-tests.el (files-tests-file-name-base): New test.
* Don't rely on lexical-binding being nil in testsMattias Engdegård2021-09-22
| | | | | | | * test/lisp/button-tests.el (button--help-echo-form): * test/lisp/files-tests.el (files-tests-permanent-local-variables): Remove assumption that `with-temp-buffer` creates a buffer where `lexical-binding` is nil.
* Fix failures in recent files testsLars Ingebrigtsen2021-08-21
| | | | | | * test/lisp/files-tests.el (files-tests-buffer-offer-save) (files-tests-save-buffers-kill-emacs--asks-to-save-buffers): `read-event' is called with arguments.
* Fix documentation of recently-added tests for files.elEli Zaretskii2021-08-21
| | | | | | | * test/lisp/files-tests.el (files-tests--save-some-buffers) (files-tests-save-some-buffers) (files-tests--with-buffer-offer-save) (files-tests-buffer-offer-save): Doc fixes.
* ; * test/lisp/files-tests.el: Add tests for save-some-buffers (Bug#46374)Tino Calancha2021-08-20
|
* Use string-search instead of string-match[-p]Mattias Engdegård2021-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `string-search` is easier to understand, less error-prone, much faster, does not pollute the regexp cache, and does not mutate global state. Use it where applicable and obviously safe (erring on the conservative side). * admin/authors.el (authors-canonical-file-name) (authors-scan-change-log): * lisp/apropos.el (apropos-command) (apropos-documentation-property, apropos-symbols-internal): * lisp/arc-mode.el (archive-arc-summarize) (archive-zoo-summarize): * lisp/calc/calc-aent.el (math-read-factor): * lisp/calc/calc-ext.el (math-read-big-expr) (math-format-nice-expr, math-format-number-fancy): * lisp/calc/calc-forms.el (math-read-angle-brackets): * lisp/calc/calc-graph.el (calc-graph-set-range): * lisp/calc/calc-keypd.el (calc-keypad-press): * lisp/calc/calc-lang.el (tex, latex, math-read-big-rec): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-user-define-permanent, math-define-exp): * lisp/calc/calc.el (calc-record, calcDigit-key) (calc-count-lines): * lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots) (math-do-integral): * lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum) (calc-get-fit-variables): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/java.el (semantic-java-expand-tag): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/cedet/semantic/wisent/python.el (semantic-python-instance-variable-p): * lisp/cus-edit.el (get): * lisp/descr-text.el (describe-text-sexp): * lisp/dired-aux.el (dired-compress-file): * lisp/dired-x.el (dired-make-relative-symlink): * lisp/dired.el (dired-glob-regexp): * lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename): * lisp/edmacro.el (edmacro-format-keys): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/emulation/viper-ex.el (viper-ex-read-file-name) (ex-print-display-lines): * lisp/env.el (read-envvar-name, setenv): * lisp/epa-mail.el (epa-mail-encrypt): * lisp/epg.el (epg--start): * lisp/erc/erc-backend.el (erc-parse-server-response): * lisp/erc/erc-dcc.el (erc-dcc-member): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-server) (erc-speedbar-expand-channel, erc-speedbar-expand-user): * lisp/erc/erc.el (erc-send-input): * lisp/eshell/em-glob.el (eshell-glob-entries): * lisp/eshell/esh-proc.el (eshell-needs-pipe-p): * lisp/eshell/esh-util.el (eshell-convert): * lisp/eshell/esh-var.el (eshell-envvar-names): * lisp/faces.el (x-resolve-font-name): * lisp/ffap.el (ffap-file-at-point): * lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern): * lisp/forms.el (forms--update): * lisp/frameset.el (frameset-filter-unshelve-param): * lisp/gnus/gnus-art.el (article-decode-charset): * lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file): * lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy): * lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc) (gnus-inews-insert-gcc): * lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body): * lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output) (gnus-search--complete-key-data): * lisp/gnus/gnus-spec.el (gnus-parse-simple-format): * lisp/gnus/gnus-sum.el (gnus-summary-refer-article): * lisp/gnus/gnus-util.el (gnus-extract-address-components) (gnus-newsgroup-directory-form): * lisp/gnus/gnus-uu.el (gnus-uu-grab-view): * lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name): * lisp/gnus/message.el (message-check-news-header-syntax) (message-make-message-id, message-user-mail-address) (message-make-fqdn, message-get-reply-headers, message-followup): * lisp/gnus/mm-decode.el (mm-dissect-buffer): * lisp/gnus/nnheader.el (nnheader-insert): * lisp/gnus/nnimap.el (nnimap-process-quirk) (nnimap-imap-ranges-to-gnus-ranges): * lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix): * lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path): * lisp/gnus/nnrss.el (nnrss-match-macro): * lisp/gnus/nntp.el (nntp-find-group-and-number): * lisp/help-fns.el (help--symbol-completion-table-affixation): * lisp/help.el (help-function-arglist): * lisp/hippie-exp.el (he-concat-directory-file-name): * lisp/htmlfontify.el (hfy-relstub): * lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word) (ido-exhibit): * lisp/image/image-converter.el (image-convert-p): * lisp/info-xref.el (info-xref-docstrings): * lisp/info.el (Info-toc-build, Info-follow-reference) (Info-backward-node, Info-finder-find-node) (Info-speedbar-expand-node): * lisp/international/mule-diag.el (print-fontset-element): * lisp/language/korea-util.el (default-korean-keyboard): * lisp/linum.el (linum-after-change): * lisp/mail/ietf-drums.el (ietf-drums-parse-address): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rmailkwd.el (rmail-set-label): * lisp/mail/rmailsum.el (rmail-header-summary): * lisp/mail/smtpmail.el (smtpmail-maybe-append-domain) (smtpmail-user-mail-address): * lisp/mail/uce.el (uce-reply-to-uce): * lisp/man.el (Man-default-man-entry): * lisp/mh-e/mh-alias.el (mh-alias-gecos-name) (mh-alias-minibuffer-confirm-address): * lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): * lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output): * lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter) (mh-folder-completion-function): * lisp/minibuffer.el (completion--make-envvar-table) (completion-file-name-table, completion-flex-try-completion) (completion-flex-all-completions): * lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p) (mpc-constraints-tag-lookup): * lisp/net/ange-ftp.el (ange-ftp-send-cmd) (ange-ftp-allow-child-lookup): * lisp/net/mailcap.el (mailcap-mime-types): * lisp/net/mairix.el (mairix-search-thread-this-article): * lisp/net/pop3.el (pop3-open-server): * lisp/net/soap-client.el (soap-decode-xs-complex-type): * lisp/net/socks.el (socks-filter): * lisp/nxml/nxml-outln.el (nxml-highlighted-qname): * lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype): * lisp/nxml/rng-uri.el (rng-uri-file-name-1): * lisp/obsolete/complete.el (partial-completion-mode) (PC-do-completion): * lisp/obsolete/longlines.el (longlines-encode-string): * lisp/obsolete/nnir.el (nnir-compose-result): * lisp/obsolete/terminal.el (te-quote-arg-for-sh): * lisp/obsolete/tpu-edt.el (tpu-check-search-case): * lisp/obsolete/url-ns.el (isPlainHostName): * lisp/pcmpl-unix.el (pcomplete/scp): * lisp/play/dunnet.el (dun-listify-string2, dun-get-path) (dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface): * lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment): * lisp/progmodes/gdb-mi.el (gdb-var-delete) (gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result): * lisp/progmodes/gud.el (gud-find-expr): * lisp/progmodes/idlw-help.el (idlwave-do-context-help1): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-filter-hidden-output, idlwave-shell-filter): * lisp/progmodes/idlwave.el (idlwave-skip-label-or-case) (idlwave-routine-info): * lisp/progmodes/octave.el (inferior-octave-completion-at-point): * lisp/progmodes/sh-script.el (sh-add-completer): * lisp/progmodes/sql.el (defun): * lisp/progmodes/xscheme.el (xscheme-process-filter): * lisp/replace.el (query-replace-compile-replacement) (map-query-replace-regexp): * lisp/shell.el (shell--command-completion-data) (shell-environment-variable-completion): * lisp/simple.el (display-message-or-buffer): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/subr.el (split-string-and-unquote): * lisp/tar-mode.el (tar-extract): * lisp/term.el (term-command-hook, serial-read-name): * lisp/textmodes/bibtex.el (bibtex-print-help-message): * lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter) (ispell-parse-output, ispell-buffer-local-parsing): * lisp/textmodes/reftex-cite.el (reftex-do-citation): * lisp/textmodes/reftex-parse.el (reftex-notice-new): * lisp/textmodes/reftex-ref.el (reftex-show-entry): * lisp/textmodes/reftex.el (reftex-compile-variables): * lisp/textmodes/tex-mode.el (tex-send-command) (tex-start-tex, tex-append): * lisp/thingatpt.el (thing-at-point-url-at-point): * lisp/tmm.el (tmm-add-one-shortcut): * lisp/transient.el (transient-format-key): * lisp/url/url-auth.el (url-basic-auth) (url-digest-auth-directory-id-assoc): * lisp/url/url-news.el (url-news): * lisp/url/url-util.el (url-parse-query-string): * lisp/vc/vc-cvs.el (vc-cvs-parse-entry): * lisp/wid-browse.el (widget-browse-sexp): * lisp/woman.el (woman-parse-colon-path, woman-mini-help) (WoMan-getpage-in-background, woman-negative-vertical-space): * lisp/xml.el: * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-warn): * test/lisp/files-tests.el (files-tests-file-name-non-special-dired-compress-handler): * test/lisp/net/network-stream-tests.el (server-process-filter): * test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode): Use `string-search` instead of `string-match` and `string-match-p`.
* Another fix for parse-colon-pathEli Zaretskii2021-08-08
| | | | | | | | | * test/lisp/files-tests.el (files-tests-bug-21454, files-colon-path): Adapt to change in behavior of 'parse-colon-path'. * lisp/files.el (parse-colon-path): Don't expand the directory names: that changes the names in ways this function is not supposed to. (Bug#49918)
* Fix files-tests broken on MS-Windows by a recent changeEli Zaretskii2021-08-07
| | | | | * test/lisp/files-tests.el (files-colon-path): Use path-separator, and account for drive letters in absolute file names on MS-Windows. (Bug#49918)
* Fix problem with relative directories in CDPATHLars Ingebrigtsen2021-08-07
| | | | | * lisp/files.el (parse-colon-path): Allow relative directories (like ".") in CDPATH (bug#49918).
* Fix files-tests on non-Posix systemsEli Zaretskii2021-08-05
| | | | | | | | | | | * test/lisp/files-tests.el (files-test-auto-save-name-default) (files-test-auto-save-name-transform) (files-test-auto-save-name-unique, files-test-lock-name-default) (files-test-lock-name-unique): Skip the drive letter in absolute file names on MS-Windows/MS-DOS when comparing file names against the expected ones. (files-tests-file-name-non-special--subprocess): Skip test on MS-Windows/MS-DOS.
* Make the test for auto-mode-alist from .dir-local.el stricterLars Ingebrigtsen2021-07-24
| | | | | * lisp/files.el (set-auto-mode--dir-local-valid-p): New function. (set-auto-mode--apply-alist): Use it as a stricter test.
* Add auto-mode-alist functionality to .dir-locals.elTom Tromey2021-07-23
| | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Directory Variables): Document auto-mode-alist in .dir-locals.el (Bug#18721) * doc/emacs/modes.texi (Choosing Modes): Update. * lisp/files.el (set-auto-mode--apply-alist): New function, from set-auto-mode. (set-auto-mode): Check directory locals for auto-mode-alist. (dir-locals-collect-variables): Add "predicate" parameter. (hack-dir-local--get-variables): New function, from hack-dir-local-variables. (hack-dir-local-variables): Call hack-dir-local--get-variables. * test/lisp/files-resources/.dir-locals.el: New file. * test/lisp/files-resources/whatever.quux: New file. * test/lisp/files-tests.el (files-tests-data-dir): New variable. (files-test-dir-locals-auto-mode-alist): New test.
* Add new user option lock-file-name-transformsLars Ingebrigtsen2021-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/files.texi (Interlocking): Mention lock-file-name-transforms. * doc/lispref/files.texi (File Locks): Document lock-file-name-transforms. * doc/misc/efaq.texi (Not writing files to the current directory): Mention all the three variables needed to not having Emacs writing files to the current directory in one place. * lisp/files.el (lock-file-name-transforms): New user option (bug#49261). (make-auto-save-file-name): Factor out the main logic... (auto-save--transform-file-name): ... to this new function. (make-lock-file-name): New function that also calls the factored-out function. * src/filelock.c: Remove MAKE_LOCK_NAME and fill_in_lock_file_name. (make_lock_file_name): New utility function that calls out to Lisp to heed `lock-file-name-transforms'. (lock_file): Use it. Also remove likely buggy call to dostounix_filename. (unlock_file_body, Ffile_locked_p): Also use make_lock_file_name.
* Add new function file-name-with-extensionColin Woodbury2021-06-30
| | | | | | | * doc/lispref/files.texi (File Name Components): Document it. * lisp/emacs-lisp/shortdoc.el (file-name): Ditto. * lisp/files.el (file-name-with-extension): New function.