equal
deleted
inserted
replaced
492 |
492 |
493 (when (>= emacs-major-version 22) |
493 (when (>= emacs-major-version 22) |
494 ;; Enable 'a' command. |
494 ;; Enable 'a' command. |
495 (put 'dired-find-alternate-file 'disabled nil) |
495 (put 'dired-find-alternate-file 'disabled nil) |
496 ) |
496 ) |
|
497 |
|
498 (defun my-file-name-tmp-p (file) |
|
499 (string-match "\\(^#.*#\\|~\\|\\.orig\\|\\.log\\)\\'" (file-name-nondirectory file))) |
|
500 |
|
501 (defun my-dired-flag-tmp-files () |
|
502 "Flag all temporary files for deletion." |
|
503 (interactive) |
|
504 (dired-mark-if |
|
505 ;; (let ( (fn (dired-get-filename)) ) |
|
506 ;; (if fn (backup-file-name-p fn))) |
|
507 (let ( (fn (dired-get-filename 'verbatim t)) ) |
|
508 (and fn (my-file-name-tmp-p fn)) ) |
|
509 "backup file" |
|
510 ) |
|
511 ) |
|
512 |
|
513 (define-key dired-mode-map (kbd "`") 'my-dired-flag-tmp-files) |
497 |
514 |
498 ;;; ---------------------------------------------------------------- |
515 ;;; ---------------------------------------------------------------- |
499 ;;; ls-lisp, dired ls. |
516 ;;; ls-lisp, dired ls. |
500 |
517 |
501 ;; If non-nil - use 'insert-directory-program', which I dislike. |
518 ;; If non-nil - use 'insert-directory-program', which I dislike. |