branch: externals/ergoemacs-mode
commit 543bc9829c6896751e73628a633fa85517a9d95a
Author: Matthew Fidler <[email protected]>
Commit: Matthew Fidler <[email protected]>
Silence ergoemacs-functions byte compile warnings
---
ergoemacs-functions.el | 12 +++++-------
ergoemacs-macros.el | 14 ++++++++++++++
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 257148a..30994db 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -1593,9 +1593,7 @@ by `ergoemacs-maximum-number-of-files-to-open'.
(when do-it
(cond
((eq system-type 'windows-nt)
- (dolist (f-path my-file-list)
- (w32-shell-execute
- "open" (replace-regexp-in-string "/" "\\" f-path t t))))
+ (ergoemacs :w32-shell-open-files my-file-list))
((eq system-type 'darwin)
(dolist (f-path my-file-list)
(shell-command (format "open \"%s\"" f-path))))
@@ -1609,7 +1607,7 @@ by `ergoemacs-maximum-number-of-files-to-open'.
(interactive)
(cond
((eq system-type 'windows-nt)
- (w32-shell-execute "explore" (replace-regexp-in-string "/" "\\"
default-directory t t)))
+ (ergoemacs :w32-shell-execute "explore" (replace-regexp-in-string "/" "\\"
default-directory t t)))
((eq system-type 'darwin) (shell-command "open ."))
((eq system-type 'gnu/linux)
(let ((process-connection-type nil))
@@ -2434,7 +2432,7 @@ Guillemet -> quote, degree -> @, s-zed -> ss, upside-down
?! -> ?!."
((eq major-mode 'eshell-mode) "*eshell@")
(t (replace-regexp-in-string "\\([*][^@]*[@]\\).*" "\\1"
(buffer-name) t)))
(if (eq system-type 'windows-nt)
- (w32-long-file-name (abbreviate-file-name
default-directory)) ;; Fix case issues
+ (ergoemacs :w32-long-file-name (abbreviate-file-name
default-directory)) ;; Fix case issues
(abbreviate-file-name default-directory)) "*")))
(unless (string= nbn (buffer-name))
(setq nbn (generate-new-buffer-name nbn))
@@ -2475,7 +2473,7 @@ Sends shell prompt string to process, then turns on
(let* ((shell (or shell-program 'shell))
(buf-prefix (or buffer-prefix (symbol-name shell)))
(name (concat "*" buf-prefix "@" (if (eq system-type 'windows-nt)
- (w32-long-file-name
(abbreviate-file-name default-directory)) ;; Fix case issues
+ (ergoemacs :w32-long-file-name
(abbreviate-file-name default-directory)) ;; Fix case issues
(abbreviate-file-name
default-directory)) "*")))
(set-buffer (get-buffer-create name))
(funcall shell name)))
@@ -2499,7 +2497,7 @@ Sends shell prompt string to process, then turns on
(interactive)
(let* ((eshell-buffer-name
(concat "*eshell@" (if (eq system-type 'windows-nt)
- (w32-long-file-name (abbreviate-file-name
default-directory)) ;; Fix case issues
+ (ergoemacs :w32-long-file-name
(abbreviate-file-name default-directory)) ;; Fix case issues
(abbreviate-file-name default-directory)) "*"))
(eshell-exists-p (get-buffer eshell-buffer-name)))
(if eshell-exists-p
diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el
index b2f9d4a..5c82e7b 100644
--- a/ergoemacs-macros.el
+++ b/ergoemacs-macros.el
@@ -852,6 +852,20 @@ When arg1 can be a property. The following properties are
supported:
(arg3 (nth 2 args))
(arg4 (nth 3 args)))
(cond
+ ((and arg1 (symbolp arg1) (eq arg1 :w32-long-file-name))
+ (if (fboundp 'w32-long-file-name)
+ `(w32-long-file-name ,@(cdr args))
+ `nil))
+ ((and arg1 (symbolp arg1) (eq arg1 :w32-shell-open-files))
+ (if (fboundp 'w32-shell-execute)
+ `(dolist (f-path ,@(cdr args))
+ (w32-shell-execute
+ "open" (replace-regexp-in-string "/" "\\" f-path t t)))
+ `nil))
+ ((and arg1 (symbolp arg1) (eq arg1 :w32-shell-execute))
+ (if (fboundp 'w32-shell-execute)
+ `(w32-shell-execute ,@(cdr args))
+ `nil))
((and arg1 (symbolp arg1) (eq arg1 :reset-prefix))
(if (<= 25 emacs-major-version)
`(prefix-command-preserve-state)