mirror of
https://github.com/joaotavora/yasnippet.git
synced 2026-02-04 14:32:26 +00:00
restructuring classic snippets dir to conform to new parenting specs
This commit is contained in:
16
snippets/emacs-lisp-mode/dired.process_marked
Normal file
16
snippets/emacs-lisp-mode/dired.process_marked
Normal file
@@ -0,0 +1,16 @@
|
||||
#name : process marked files in dired
|
||||
#contributor : Xah Lee
|
||||
# --
|
||||
;; idiom for processing a list of files in dired's marked files
|
||||
|
||||
;; suppose myProcessFile is your function that takes a file path
|
||||
;; and do some processing on the file
|
||||
|
||||
(defun dired-myProcessFile ()
|
||||
"apply myProcessFile function to marked files in dired."
|
||||
(interactive)
|
||||
(require 'dired)
|
||||
(mapc 'myProcessFile (dired-get-marked-files))
|
||||
)
|
||||
|
||||
;; to use it, type M-x dired-myProcessFile
|
||||
Reference in New Issue
Block a user