[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 125/287: Added documentation and always respect file in ergoemacs
From: |
Matthew Fidler |
Subject: |
[elpa] 125/287: Added documentation and always respect file in ergoemacs-open-in-external-app |
Date: |
Wed, 02 Jul 2014 14:45:15 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 2aab252e6d524972f298335129ce3160e7dac7f9
Author: Matthew L. Fidler <address@hidden>
Date: Wed Jun 18 07:06:16 2014 -0500
Added documentation and always respect file in
ergoemacs-open-in-external-app
---
ergoemacs-functions.el | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 0fcb84f..0c5e915 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -1224,14 +1224,19 @@ Emacs buffers are those whose name starts with *."
(declare-function dired-get-marked-files "dired.el")
(declare-function w32-shell-execute "w32fns.c")
(defun ergoemacs-open-in-external-app (&optional file)
- "Open the current file or dired marked files in external app."
+ "Open the current file or dired marked files in external app.
+FILE can be a list of files, or a single file.
+If FILE is not specified, it will be:
+- `dired-get-marked-files' for `dired-mode' or `locate-mode'
+- `buffer-file-name' for other files."
(interactive)
(let* ((my-file-list
(cond
- ((string-equal major-mode "dired-mode") (dired-get-marked-files))
- ((string-equal major-mode "locate-mode") (dired-get-marked-files))
- ((not file) (list (buffer-file-name)))
- (file (list file))))
+ ((listp file) file)
+ (file (list file))
+ ((eq major-mode 'dired-mode) (dired-get-marked-files))
+ ((eq major-mode 'locate-mode) (dired-get-marked-files))
+ ((not file) (list (buffer-file-name)))))
(do-it (or (<= (length my-file-list)
ergoemacs-maximum-number-of-file-to-open)
(>= 0 ergoemacs-maximum-number-of-file-to-open)
(y-or-n-p (format "Open more than %s files? "
ergoemacs-maximum-number-of-file-to-open)))))
- [elpa] 121/287: Remove cl dependence for ergoemacs-theme-engine.el, (continued)
- [elpa] 121/287: Remove cl dependence for ergoemacs-theme-engine.el, Matthew Fidler, 2014/07/02
- [elpa] 107/287: Remove save-variable-state, Matthew Fidler, 2014/07/02
- [elpa] 197/287: Merge branch 'master' of github.com:ergoemacs/ergoemacs-mode, Matthew Fidler, 2014/07/02
- [elpa] 106/287: Fix many byte-compile warnings in ergoemacs-extras.el, Matthew Fidler, 2014/07/02
- [elpa] 95/287: Revert "Fixed shortcut keys.", Matthew Fidler, 2014/07/02
- [elpa] 90/287: Allow unset keys to work too, Matthew Fidler, 2014/07/02
- [elpa] 115/287: Take away warnings from ergoemacs-mode.el, Matthew Fidler, 2014/07/02
- [elpa] 192/287: Add ergoemacs-test-layout, Matthew Fidler, 2014/07/02
- [elpa] 114/287: condition-case->ignore-errors ergoemacs-translate.el, Matthew Fidler, 2014/07/02
- [elpa] 92/287: Fix keys, Matthew Fidler, 2014/07/02
- [elpa] 125/287: Added documentation and always respect file in ergoemacs-open-in-external-app,
Matthew Fidler <=
- [elpa] 195/287: Merge pull request #240 from akfoss/master, Matthew Fidler, 2014/07/02
- [elpa] 130/287: Advice key-binding to look at global keys without ergoemacs-mode, Matthew Fidler, 2014/07/02
- [elpa] 142/287: Makefile fixes, Matthew Fidler, 2014/07/02
- [elpa] 194/287: Fix Issue #238, Matthew Fidler, 2014/07/02
- [elpa] 201/287: Modify apps-copy test to use ert should instead of shoud ret, Matthew Fidler, 2014/07/02
- [elpa] 122/287: Fix byte-compile files, Matthew Fidler, 2014/07/02
- [elpa] 123/287: Add w32-shell-execute for ignoring linux byte-compile errors, Matthew Fidler, 2014/07/02
- [elpa] 99/287: Remove ergoemacs-test.el, Matthew Fidler, 2014/07/02
- [elpa] 110/287: Fix Byte Compiler issues for ergoemacs-functions.el, Matthew Fidler, 2014/07/02
- [elpa] 120/287: Removed some of the issues with ergoemacs-theme-engine.el, Matthew Fidler, 2014/07/02