Mercurial > emacs
comparison lisp/dired-x.el @ 105372:bd2966850aac
Use `called-interactively-p' instead of `interactive-p'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 02 Oct 2009 03:48:36 +0000 |
parents | f8ba8d6fd250 |
children | 97b90713fd52 |
comparison
equal
deleted
inserted
replaced
105371:0769a73f1d18 | 105372:bd2966850aac |
---|---|
593 | 593 |
594 This functions works by temporarily binding `dired-marker-char' to | 594 This functions works by temporarily binding `dired-marker-char' to |
595 `dired-omit-marker-char' and calling `dired-do-kill-lines'." | 595 `dired-omit-marker-char' and calling `dired-do-kill-lines'." |
596 (interactive "sOmit files (regexp): ") | 596 (interactive "sOmit files (regexp): ") |
597 (if (and dired-omit-mode | 597 (if (and dired-omit-mode |
598 (or (interactive-p) | 598 (or (called-interactively-p 'interactive) |
599 (not dired-omit-size-limit) | 599 (not dired-omit-size-limit) |
600 (< (buffer-size) dired-omit-size-limit) | 600 (< (buffer-size) dired-omit-size-limit) |
601 (progn | 601 (progn |
602 (message "Not omitting: directory larger than %d characters." | 602 (message "Not omitting: directory larger than %d characters." |
603 dired-omit-size-limit) | 603 dired-omit-size-limit) |
1638 "Bind `dired-x-find-file' in place of `find-file' \(or reverse\). | 1638 "Bind `dired-x-find-file' in place of `find-file' \(or reverse\). |
1639 Similarly for `dired-x-find-file-other-window' and `find-file-other-window'. | 1639 Similarly for `dired-x-find-file-other-window' and `find-file-other-window'. |
1640 Binding direction based on `dired-x-hands-off-my-keys'. | 1640 Binding direction based on `dired-x-hands-off-my-keys'. |
1641 This function is part of `after-init-hook'." | 1641 This function is part of `after-init-hook'." |
1642 (interactive) | 1642 (interactive) |
1643 (if (interactive-p) | 1643 (if (called-interactively-p 'interactive) |
1644 (setq dired-x-hands-off-my-keys | 1644 (setq dired-x-hands-off-my-keys |
1645 (not (y-or-n-p "Bind dired-x-find-file over find-file? ")))) | 1645 (not (y-or-n-p "Bind dired-x-find-file over find-file? ")))) |
1646 (cond ((not dired-x-hands-off-my-keys) | 1646 (cond ((not dired-x-hands-off-my-keys) |
1647 (substitute-key-definition 'find-file | 1647 (substitute-key-definition 'find-file |
1648 'dired-x-find-file | 1648 'dired-x-find-file |