Mercurial > hg > dotemacs
comparison elpa/yasnippet-0.9.1/snippets/emacs-lisp-mode/x-dired.process_marked.yasnippet @ 141:ee4b6191b61e
packages: update yasnippet and deps
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 20 Apr 2016 13:40:19 -0400 |
parents | elpa/yasnippet-0.8.0/snippets/emacs-lisp-mode/x-dired.process_marked.yasnippet@156cbb54f344 |
children |
comparison
equal
deleted
inserted
replaced
140:817e74b09115 | 141:ee4b6191b61e |
---|---|
1 # contributor: Xah Lee (XahLee.org) | |
2 # name: process marked files in dired | |
3 # key: x-dired | |
4 # -- | |
5 ;; idiom for processing a list of files in dired's marked files | |
6 | |
7 ;; suppose myProcessFile is your function that takes a file path | |
8 ;; and do some processing on the file | |
9 | |
10 (defun dired-myProcessFile () | |
11 "apply myProcessFile function to marked files in dired." | |
12 (interactive) | |
13 (require 'dired) | |
14 (mapc 'myProcessFile (dired-get-marked-files)) | |
15 ) | |
16 | |
17 ;; to use it, type M-x dired-myProcessFile |