1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-19 10:22:27 +00:00
Commit Graph

269 Commits

Author SHA1 Message Date
Stefan Monnier
7b656e4a55 * lisp/dired-aux.el (dired-file-set-difference): Use lexical-scoping. 2014-04-06 14:15:09 -04:00
Juanma Barranquero
09aba8153a Merge from emacs-24; up to 2014-03-28T01:39:30Z!rgm@gnu.org 2014-04-02 17:14:50 +02:00
Juri Linkov
8778eb5efa * lisp/dired-aux.el (dired-compress-file): Don't use string-match-p
because its match data is used afterwards.
2014-03-29 19:59:36 +02:00
Glenn Morris
5dbc324473 Make dired-read-regexp obsolete
It's not worth having such a trivial wrapper for read-regexp.

* lisp/dired.el (dired-read-regexp): Make obsolete.
(dired-mark-files-regexp, dired-mark-files-containing-regexp)
(dired-flag-files-regexp):
* lisp/dired-aux.el (dired-mark-read-regexp):
* lisp/dired-x.el (dired-mark-unmarked-files): Use read-regexp directly.
2014-03-22 16:56:19 -07:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Lars Ingebrigtsen
c7b92b8816 * dired-aux.el (dired-copy-file-recursive): Remove slighly misleading comment.
Fixes: debbugs:11328
2014-02-08 20:30:00 -08:00
Richard M. Stallman
e831604df6 dired-do-print handles printer-name
* dired-aux.el (dired-do-print): Handle printer-name.
2014-01-02 17:35:00 -05:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Juri Linkov
4cc51eaf09 * lisp/misearch.el (multi-isearch-buffers): Set the value of
`multi-isearch-buffer-list' globally.  Set NO-RECURSIVE-EDIT
arg of isearch-forward to t.
(multi-isearch-buffers-regexp): Set the value of
`multi-isearch-buffer-list' globally.  Set NO-RECURSIVE-EDIT
arg of isearch-forward-regexp to t.
(multi-isearch-files): Set the value of
`multi-isearch-file-list' globally.  Set NO-RECURSIVE-EDIT
arg of isearch-forward to t.
(multi-isearch-files-regexp): Set the value of
`multi-isearch-file-list globally.  Set NO-RECURSIVE-EDIT
arg of isearch-forward-regexp to t. 

* lisp/dired-aux.el (dired-isearch-filenames): Set NO-RECURSIVE-EDIT
arg of isearch-forward to t.
(dired-isearch-filenames-regexp): Set NO-RECURSIVE-EDIT
arg of isearch-forward-regexp to t.
(dired-isearch-filter-filenames): Remove unnecessary check for
`dired-isearch-filenames'.

* lisp/comint.el (comint-history-isearch-backward):
Set NO-RECURSIVE-EDIT arg of isearch-backward to t.
(comint-history-isearch-backward-regexp):
Set NO-RECURSIVE-EDIT arg of isearch-backward-regexp to t.

Fixes: debbugs:16035
2013-12-11 02:11:26 +02:00
Juanma Barranquero
45fdb48240 lisp/*.el: Remove lexical-binding warnings; additional small cleanups.
* calculator.el (calculator): Mark unused argument.
  (calculator-paste, calculator-quit, calculator-integer-p):
  Use ignore-errors.
  (calculator-string-to-number, calculator-decimal, calculator-exp)
  (calculator-op-or-exp): Use string-match-p.

* dired-aux.el (dired-compress): Use ignore-errors.
  (dired-do-chxxx, dired-do-chmod, dired-trample-file-versions)
  (dired-do-async-shell-command, dired-do-shell-command)
  (dired-shell-stuff-it, dired-compress-file, dired-insert-subdir)
  (dired-insert-subdir-validate): Use string-match-p.
  (dired-map-dired-file-lines, dired-subdir-hidden-p): Use looking-at-p.
  (dired-add-entry): Use string-match-p, looking-at-p.
  (dired-insert-subdir-newpos): Remove unused local variable.

* dired.el (dired-buffer-more-recently-used-p): Declare.
  (dired-insert-set-properties, dired-insert-old-subdirs):
  Use ignore-errors.

* filenotify.el (file-notify-callback): Remove unused local variable.

* filesets.el (filesets-error): Mark unused argument.
  (filesets-which-command-p, filesets-filter-dir-names)
  (filesets-directory-files, filesets-get-external-viewer)
  (filesets-ingroup-get-data): Use string-match-p.

* find-file.el (ff-other-file-name, ff-other-file-name)
  (ff-find-the-other-file, ff-cc-hh-converter):
  Remove unused local variables.
  (ff-get-file-name): Use string-match-p.
  (ff-all-dirs-under): Use ignore-errors.

* follow.el (follow-comint-scroll-to-bottom): Mark unused argument.
  (follow-select-if-visible): Remove unused local variable.

* forms.el (read-file-filter): Move declaration.
  (forms--make-format, forms--make-parser, forms-insert-record):
  Quote function with #'.
  (forms--update): Use string-match-p.  Quote function with #'.

* help-mode.el (help-dir-local-var-def): Mark unused argument.
  (help-make-xrefs): Use looking-at-p.
  (help-xref-on-pp): Use looking-at-p, ignore-errors.

* ibuffer.el (ibuffer-ext-visible-p): Declare.
  (ibuffer-confirm-operation-on): Use string-match-p.

* msb.el (msb-item-handler, msb-dired-item-handler):
  Mark unused arguments.

* ses.el (ses-decode-cell-symbol)
  (ses-kill-override): Remove unused local variable.
  (ses-create-cell-variable, ses-relocate-formula): Use string-match-p.
  (ses-load): Use ignore-errors, looking-at-p.
  (ses-jump-safe): Use ignore-errors.
  (ses-export-tsv, ses-export-tsf, ses-unsafe): Mark unused arguments.

* tabify.el (untabify, tabify): Mark unused arguments.

  * thingatpt.el (thing-at-point--bounds-of-well-formed-url):
  Mark unused argument.
  (bounds-of-thing-at-point, thing-at-point-bounds-of-list-at-point)
  (thing-at-point-newsgroup-p, form-at-point): Use ignore-errors.
2013-08-10 17:17:29 +02:00
Stefan Monnier
dc6c0edad7 Revert introduction of isearch-filter-predicates.
Rely on add-function instead.
* lisp/loadup.el: Preload nadvice.
* lisp/isearch.el (isearch-filter-predicates): Rename it back to
isearch-filter-predicate.
(isearch-message-prefix): Use advice-function-mapc and advice
properties to get the isearch-message-prefix.
(isearch-search, isearch-lazy-highlight-search): Revert to funcall
instead of run-hook-with-args-until-failure.
(isearch-filter-visible): Not obsolete any more.
* lisp/replace.el (perform-replace): Revert to funcall
instead of run-hook-with-args-until-failure.
* lisp/wdired.el (wdired-change-to-wdired-mode): Use add-function.
* lisp/dired-aux.el (dired-isearch-filenames-mode): Rename from
dired-isearch-filenames-toggle; make it into a proper minor mode.
Use add/remove-function.
(dired-isearch-filenames-setup, dired-isearch-filenames-end):
Call the minor-mode rather than add/remove-hook.
(dired-isearch-filter-filenames):
Remove isearch-message-prefix property.
* lisp/info.el (Info--search-loop): New function, extracted from Info-search.
Funcall isearch-filter-predicate instead of
run-hook-with-args-until-failure isearch-filter-predicates.
(Info-search): Use it.
(Info-mode): Use isearch-filter-predicate instead of
isearch-filter-predicates.
* src/lisp.mk (lisp): Add nadvice.elc.
* lib-src/makefile.w32-in (lisp2): Add nadvice.elc.

Fixes: debbugs:14714
2013-08-05 14:05:46 -04:00
Juri Linkov
66fc57e3cd * lisp/isearch.el (isearch-filter-predicates): Rename from `isearch-filter-predicate'.
Doc fix. 
(isearch-message-prefix): Display text from the property
`isearch-message-prefix' of the currently active filters.
(isearch-search): Don't compare `isearch-filter-predicate' with
`isearch-filter-visible'.  Call `run-hook-with-args-until-failure'
on `isearch-filter-predicates'.  Also check `search-invisible' for t
or call `isearch-range-invisible'.
(isearch-filter-visible): Make obsolete.
(isearch-lazy-highlight-search):
Call `run-hook-with-args-until-failure' on
`isearch-filter-predicates' and use `isearch-range-invisible'.

* lisp/info.el (Info-search): Call `run-hook-with-args-until-failure' on
`isearch-filter-predicates' instead of `funcall'ing
`isearch-filter-predicate'.
(Info-mode): Set `Info-isearch-filter' to
`isearch-filter-predicates' instead of `isearch-filter-predicate'.

* lisp/dired-aux.el (dired-isearch-filter-predicate-orig): Remove variable.
(dired-isearch-filenames-toggle, dired-isearch-filenames-setup)
(dired-isearch-filenames-end): Add and remove
`dired-isearch-filter-filenames' in `isearch-filter-predicates'
instead of changing the value of `isearch-filter-predicate'.
Rebind `dired-isearch-filenames-toggle' from "\M-sf" to "\M-sff".
(dired-isearch-filter-filenames): Don't use `isearch-filter-visible'.
Put property `isearch-message-prefix' to "filename " on
`dired-isearch-filter-filenames'.

* lisp/wdired.el (wdired-change-to-wdired-mode):
Add `isearch-filter-predicates' to `wdired-isearch-filter-read-only'
locally instead of changing `isearch-filter-predicate'.
(wdired-isearch-filter-read-only): Don't use `isearch-filter-visible'.

Fixes: debbugs:11378
2013-05-28 01:42:11 +03:00
Juri Linkov
9d232fc451 * lisp/dired-aux.el (dired-diff): If file at point is a backup file,
use its original as the default value, and reverse the order
of arguments to the `diff' call.  Doc fix.

Fixes: debbugs:13772
2013-02-28 23:51:11 +02:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Juri Linkov
0876a82d85 * lisp/dired-aux.el (dired-diff): Remove (require 'diff) since
`diff-latest-backup-file' is now autoloaded.
2012-09-20 12:03:51 +03:00
Juri Linkov
127342224e * lisp/dired-aux.el (dired-diff): Add (require 'diff) because
`diff-latest-backup-file' is not autoloaded.
(dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg
of `dired-get-filename' to t to not report error when there is
no default file on the current line.
2012-09-19 23:09:55 +03:00
Juri Linkov
2fd5e67d92 * lisp/dired-aux.el (dired-diff): Restore original functionality of
getting the default value, but keep new feature of using the
latest existing backup file (`diff-latest-backup-file').
2012-09-19 02:40:39 +03:00
Juri Linkov
20f70ede43 * lisp/dired-aux.el (dired-do-chxxx, dired-do-chmod): Default file
attributes for M-n are pulled from the file at point.
(dired-do-chgrp, dired-do-chown, dired-do-touch): Doc fix.
Suggested by Drew Adams.

Fixes: debbugs:10624
2012-09-19 01:57:45 +03:00
Juri Linkov
cb26b7f572 * lisp/dired-aux.el (dired-do-chmod): Use `eq' to detect empty input.
Fixes: debbugs:12399
2012-09-15 01:58:43 +03:00
Juri Linkov
5b68b33315 * lisp/dired-aux.el (dired-do-chxxx): Use `eq' to detect empty input.
Fixes: debbugs:12399
2012-09-14 02:42:39 +03:00
Chong Yidong
35d98877f0 Don't bind M-= in Dired.
* lisp/dired.el (dired-mode-map): Don't bind M-=.

* lisp/dired-aux.el (dired-diff): Use backup file as default.
2012-09-08 22:48:26 +08:00
Juri Linkov
6dafa0d535 * lisp/dired-aux.el (dired-do-async-shell-command): Doc fix.
(dired-do-async-shell-command): Don't add `*' at the end of the
command (Bug#11815).
(dired-do-shell-command): Doc fix.
(dired-shell-stuff-it): Strip the trailing "&" and ";" if any.
Join the individual commands using either "&" or ";" as the
separator depending on the values of these trailing characters.
At the end re-add the trailing "&".  (Bug#10598)

* lisp/simple.el (async-shell-command): Sync the interactive spec with
`shell-command'.  Doc fix.
(shell-command): Doc fix.
2012-07-17 21:40:15 +03:00
Chong Yidong
c5695d1d09 Misc doc fixes for Dired.
* dired-aux.el (dired-do-create-files): Doc fix (Bug#11327).
(dired-create-files): Doc fix (Bug#11329).
(dired-do-copy): Doc fix (Bug#11334).
(dired-mark-read-string): Doc fix (Bug#11553).

* dired.el (dired-recursive-copies, dired-recursive-deletes): Doc
fix (Bug#11326).
(dired-make-relative): Doc fix (Bug#11332).  Remove unused arg.
(dired-dwim-target): Doc fix.

* wdired.el (wdired-mode): Doc fix.
2012-06-22 15:30:33 +08:00
Glenn Morris
12e10e61a5 * lisp/dired-aux.el (dired-mark-read-string): Doc fix. 2012-04-16 21:52:00 -04:00
Dmitry Antipov
30009afd5b Add user, group name completion to dired
Note from committer:

I modified the original patch, by adding the new collection argument
at the end of the argument list rather than in the middle.

* dired-aux.el (dired-mark-read-string): Offer optional completion.
(dired-do-chxxx): Complete chown, chgrp over users, groups.

Fixes: debbugs:7900
2012-04-16 21:49:40 -04:00
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