1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

244 Commits

Author SHA1 Message Date
Chong Yidong
42ee526b1a Rename file-subdir-of-p to file-in-directory-p.
* lisp/files.el (file-in-directory-p): Rename from file-subdir-of-p.
Handle root directory properly.
(copy-directory): Caller changed.

* lisp/dired-aux.el (dired-copy-file-recursive, dired-create-files):
* lisp/net/tramp.el (tramp-file-name-for-operation): Callers changed.

* doc/lispref/files.texi (Kinds of Files): file-subdir-of-p renamed to
file-in-directory-p.
2012-04-01 10:44:24 +08:00
Chong Yidong
7d0c323f58 Remove debug code. 2012-03-31 00:52:52 +08:00
Thierry Volpiatto
40311efcba Fix copying of symlinks.
* dired-aux.el (dired-copy-file-recursive, dired-create-files):
Check if file is a symlink (Bug#10489).

* files.el (copy-directory): Likewise.
2012-03-31 00:49:29 +08:00
thierry volpiatto
25b2e303b0 Fix bug#10489: 24.0.92 `dired-do-copy' may create infinite directory hierarchy.
* lisp/files.el (files-equal-p): New, simple equality check between two filename.
(file-subdir-of-p): New, Check if dir1 is subdir of dir2.
(copy-directory): Return error when trying to copy a directory on itself.
Add missing copy-contents arg to tramp handler.

* lisp/dired-aux.el (dired-copy-file-recursive): Same.
(dired-create-files): Modify destination when source is equal to dest when copying files.
Return also when dest is a subdir of source.
2012-02-24 19:04:03 +01:00
Glenn Morris
090446227f * lisp/dired-aux.el (dired-do-shell-command): Doc fix.
(Inspired by the Emacs manual.)
2012-01-10 21:37:31 -05:00
Glenn Morris
e52c37fad0 * lisp/dired-aux.el (dired-do-shell-command): Fix */? logic. (Bug#6561) 2012-01-10 21:24:02 -05:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Stefan Monnier
6131ba7f18 * lisp/dired-aux.el (dired-query): Don't assume help-char is modifier-free.
Fixes: debbugs:10191
2011-12-02 09:18:18 -05:00
Paul Eggert
4c36be58ca Spelling fixes. 2011-11-17 01:09:20 -08:00
Chong Yidong
a0bf2bcd93 * lisp/dired-aux.el (dired-do-chmod): Don't provide initial input. 2011-09-14 11:06:28 -04:00
Chong Yidong
64b5194776 * dired-aux.el (dired-mark-read-string): Don't use default value on empty input.
(dired-do-chxxx): Treat empty input for "touch" as no -t option.
Omit initial minibuffer contents.
(dired-do-chmod): Signal an error on empty input.
(dired-mark-read-string): Don't return default on empty input.

* files.el (file-modes-symbolic-to-number): Doc fix.

Fixes: debbugs:9361
2011-09-12 16:45:56 -04:00
Juri Linkov
2cc8e51a1f * lisp/dired-aux.el (dired-touch-initial): Remove function.
(dired-do-chxxx): For op-symbol `touch', set `initial' to the
current time, and `default' to the last modification time of the
current marked file.

Fixes: debbugs:6887
2011-07-30 12:14:58 +03:00
Chong Yidong
f69fd0d2fb Minor Dired doc fixes.
* lisp/dired.el (dired-mark-prompt):
* lisp/dired-aux.el (dired-read-shell-command): Doc fix.
2011-07-11 22:54:26 -04:00
Lars Magne Ingebrigtsen
d67f7e1fbf * dired-aux.el (dired-kill-line): Add a doc string.
Fixes: debbugs:957
2011-07-06 20:26:29 +02:00
Juanma Barranquero
9173deecd8 Fix typos. 2011-07-05 11:51:56 +02:00
Lars Magne Ingebrigtsen
26bde865f6 (dired-show-file-type): Doc fixup (bug#8818). 2011-07-01 15:37:00 +02:00
Lars Magne Ingebrigtsen
ace6c69c02 * dired-aux.el (dired-diff): Doc fixup (bug#8816). 2011-07-01 14:48:02 +02:00
Glenn Morris
973d955b4d * dired-aux.el (dired-touch-initial): Just use current-time. (Bug#6887) 2011-05-20 19:07:25 -07:00
Juanma Barranquero
06b605171f lisp/*.el: Lexical-binding cleanup. 2011-04-19 15:44:55 +02:00
Chong Yidong
0d9e9a12ca * lisp/dired-aux.el (dired-create-files): Add docstring (Bug#7970). 2011-04-03 17:23:23 -04:00
Chong Yidong
ff854b0bde Add error for dired-create-directory on existing file (Bug#8246).
* lisp/dired-aux.el (dired-create-directory): Signal an error if the
directory already exists.
2011-03-19 18:07:41 -04:00
Stephen Berman
edb574802f dired-aux fix for bug#8131.
* lisp/dired-aux.el (dired-update-file-line): Fix 2010-11-09 change.
2011-02-27 17:31:20 -08:00
Glenn Morris
d6e96966e8 Merge dired-x's dired-read-shell-command into dired-aux's version.
* lisp/dired-x.el (dired-read-shell-command): Merge into dired-aux's version.

* lisp/dired-aux.el (dired-read-shell-command): Merge dired-x's version.

* doc/misc/dired-x.texi (Technical Details):
No longer redefines dired-read-shell-command.
2011-02-19 11:20:38 -08:00
Glenn Morris
30abce25f2 Merge dired-x's dired-add-entry modifications into the main definition.
* lisp/dired-aux.el (dired-add-entry): Give it a doc-string.
Merge dired-x's dired-omit handling here.
(dired-omit-mode, dired-omit-regexp, dired-omit-localp): Declare.

* lisp/dired-x.el (dired-omit-new-add-entry): Merge into dired-add-entry.

* doc/misc/dired-x.texi (Technical Details): No longer redefines
dired-add-entry.
2011-02-18 19:53:35 -08:00
Thierry Volpiatto
9de31df2dd Adapt dired-create-files to copy-directory changes.
* dired-aux.el (dired-create-files): Adapt destination name to
match the new behavior of copy-directory.
2011-02-12 17:55:28 -05:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Chong Yidong
9aea757bb0 Revert changes adding format args to yes-or-no-p and y-or-n-p.
See discussion on emacs-devel at
http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00388.html

* src/fns.c (Fyes_or_no_p): Revert 2011-01-07 change, removing ARGS.

* lisp/subr.el (y-or-n-p): Revert 2011-01-07 change, removing ARGS.

* lisp/files.el (find-alternate-file, basic-save-buffer)
(basic-save-buffer-2, revert-buffer, recover-file)
(kill-buffer-ask, abort-if-file-too-large)
(set-visited-file-name, write-file, backup-buffer)
(basic-save-buffer, save-some-buffers):
* lisp/dired-aux.el (dired-compress-file): Callers changed.
2011-01-19 21:55:36 -05:00
Glenn Morris
e9bffc61f2 Refill some copyright headers. 2011-01-15 18:21:30 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Chong Yidong
3ef01959de New function read-char-choice for reading a restricted set of chars.
* lisp/subr.el (read-char-choice): New function, factored out from
dired-query and hack-local-variables-confirm.

* lisp/dired-aux.el (dired-query):
* lisp/files.el (hack-local-variables-confirm): Use it.
2011-01-08 14:17:23 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Stefan Monnier
f49d1f52b2 Merge from emacs-23 2010-12-13 10:27:36 -05:00
Leo Liu
86a6e8e02c * dired-aux.el (dired-do-redisplay): Postphone dired-after-readin-hook while mapping over marks (Bug#6810). 2010-12-06 14:55:21 -05:00
Glenn Morris
9b026d9f13 Replace still more end-of-line etc with line-end-position, etc.
* lisp/gnus/nnbabyl.el (nnbabyl-request-move-article, nnbabyl-delete-mail)
(nnbabyl-check-mbox): Use point-at-bol.

* lisp/cedet/semantic/lex.el (semantic-lex-ignore-comments, semantic-flex):
* lisp/cedet/semantic/grammar.el (semantic-grammar-epilogue):
* lisp/cedet/ede/speedbar.el (ede-find-nearest-file-line):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/ede/autoconf-edit.el (autoconf-delete-parameter):
Use point-at-bol and point-at-eol.

* lisp/vc/emerge.el (emerge-line-number-in-buf):
* lisp/textmodes/ispell.el (ispell-region):
* lisp/textmodes/fill.el (current-fill-column):
* lisp/progmodes/xscheme.el (xscheme-send-current-line):
* lisp/progmodes/vhdl-mode.el (vhdl-current-line, vhdl-line-copy):
* lisp/progmodes/tcl.el (tcl-hairy-scan-for-comment):
* lisp/progmodes/sh-script.el (sh-handle-prev-do):
* lisp/progmodes/meta-mode.el (meta-indent-line):
* lisp/progmodes/idlwave.el (idlwave-goto-comment, idlwave-fill-paragraph)
(idlwave-in-quote):
* lisp/progmodes/idlw-shell.el (idlwave-shell-current-frame)
(idlwave-shell-update-bp-overlays, idlwave-shell-sources-filter):
* lisp/progmodes/fortran.el (fortran-looking-at-if-then):
* lisp/progmodes/etags.el (find-tag-in-order, etags-snarf-tag):
* lisp/progmodes/cperl-mode.el (cperl-sniff-for-indent)
(cperl-find-pods-heres):
* lisp/progmodes/ada-mode.el (ada-get-current-indent, ada-narrow-to-defun):
* lisp/net/quickurl.el (quickurl-list-insert):
* lisp/net/ldap.el (ldap-search-internal):
* lisp/net/eudc.el (eudc-expand-inline):
* lisp/mail/sendmail.el (sendmail-send-it):
* lisp/mail/mspools.el (mspools-visit-spool, mspools-get-spool-name):
* lisp/emulation/viper-cmd.el (viper-paren-match, viper-backward-indent)
(viper-brac-function):
* lisp/calc/calc-yank.el (calc-do-grab-region):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/term.el (term-move-columns, term-insert-spaces):
* lisp/speedbar.el (speedbar-highlight-one-tag-line):
* lisp/simple.el (current-word):
* lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
* lisp/info.el (Info-find-node-in-buffer-1, Info-follow-reference)
(Info-scroll-down):
* lisp/hippie-exp.el (he-line-beg):
* lisp/epa.el (epa--marked-keys):
* lisp/dired-aux.el (dired-kill-line, dired-do-kill-lines)
(dired-update-file-line, dired-add-entry, dired-remove-entry)
(dired-relist-entry):
* lisp/buff-menu.el (Buffer-menu-buffer):
* lisp/array.el (current-line):
* lisp/allout.el (allout-resolve-xref)
(allout-latex-verbatim-quote-curr-line):
Replace yet more uses of end-of-line etc with line-end-position.
2010-11-08 21:33:07 -08:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Chong Yidong
8ae41cbce2 * lisp/dired-aux.el (dired-hide-all): Make unused arg optional. Update md5sum. 2010-01-20 11:42:50 -05:00
Chong Yidong
d3d8944e13 * lisp/dired-aux.el (dired-hide-all): Mark arg as ignored. 2010-01-20 11:40:47 -05:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Juri Linkov
ad974e9e13 Make `dired-diff' more safe. (Bug#5225)
* dired-aux.el (dired-diff): Signal an error when `file' equals to
`current' or when `file' is a directory of the `current' file.
2009-12-17 01:16:15 +00:00
Juri Linkov
72b5756030 Revert to old 23.1 logic of using the file at the mark as default.
* dired-aux.el (dired-diff): Use the file at the mark as default
if it's not the same as the current file, and the target dir is
the current dir or the mark is active.  Add the current file
as the arg of `dired-dwim-target-defaults'.  Use the default file
in the prompt.  (Bug#5225)
2009-12-16 09:52:42 +00:00
Juri Linkov
e237085f03 Provide additional default values (directories at other Dired
windows) via M-n in the minibuffer of some Dired commands.

* dired-aux.el (dired-diff, dired-compare-directories)
(dired-do-create-files): Use `dired-dwim-target-defaults' to set
`minibuffer-default' in `minibuffer-with-setup-hook'.
(dired-dwim-target-directory): Find a window that displays Dired
buffer instead of failing when the next window is not Dired.
Use `get-window-with-predicate' to find for the next Dired window.
(dired-dwim-target-defaults): New function.

* ediff-util.el (ediff-read-file-name):
Use `dired-dwim-target-defaults' to set `minibuffer-default'
in `minibuffer-with-setup-hook'.
2009-11-25 17:15:19 +00:00
Glenn Morris
470bce7d54 (dired-compress-file-suffixes): Add ".xz". (Bug#4953) 2009-11-19 07:42:20 +00:00
Stefan Monnier
7fdbcd8387 * x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
Chong Yidong
bedd8a58d8 * dired-aux.el (dired-query): Place cursor in echo area and allow
C-g.

* dired.el (dired-mode-map): Disable dired-maybe-insert-subdir
menu item if not on a directory (Bug#4701).
2009-11-08 00:32:18 +00:00
Michael Albinus
b4583b8c21 * dired-aux.el (dired-copy-file-recursive): Use it. 2009-10-04 12:16:36 +00:00
Juanma Barranquero
5a0c3f568d Fix typos.
* allout.el
* dired-aux.el
* dired-x.el
* epa-file.el
* ps-print.el
* shell.el
* vc-hooks.el
* vc-rcs.el
* vc-sccs.el
* vc.el
* view.el
* wdired.el
* emacs-lisp/authors.el
* net/dig.el
* net/socks.el
* net/zeroconf.el
* obsolete/vc-mcvs.el
* progmodes/gdb-mi.el
* progmodes/grep.el
* progmodes/idlw-help.el
* progmodes/idlw-shell.el
* progmodes/idlwave.el
* progmodes/inf-lisp.el
* textmodes/bibtex.el
* textmodes/ispell.el
* textmodes/reftex-toc.el
2009-09-24 01:37:14 +00:00
Stefan Monnier
35a3f9a4b4 (dired-query-alist): Remove spurious backslash.
(dired-query): Use read-key.
2009-09-18 15:35:23 +00:00
Glenn Morris
276f1d00e2 Put autoloads in dired.el rather than loaddefs.el. 2009-09-11 06:50:14 +00:00
Michael Albinus
b967bd1914 * dired-aux.el (dired-show-file-type): Let-bind
`process-file-side-effects' with nil.
2009-08-25 08:47:39 +00:00
Michael Albinus
d6ceb380aa * dired-aux.el (dired-show-file-type): Handle remote files. 2009-07-05 08:32:26 +00:00