comparison .elisp/settings/50.localfuncs.el @ 207:c965d5dbd868

emacs localfuncs: add list rotation and string-joining functions I sometimes use
author Augie Fackler <durin42@gmail.com>
date Tue, 11 May 2010 15:32:19 -0500
parents e77c01b7b0f4
children b9f4d059eb69
comparison
equal deleted inserted replaced
206:5599a864b888 207:c965d5dbd868
28 (setq diff (not (= (point-min) (point-max)))) 28 (setq diff (not (= (point-min) (point-max))))
29 (font-lock-fontify-buffer) 29 (font-lock-fontify-buffer)
30 (cd root)))) 30 (cd root))))
31 (global-set-key [(control c)(t)(=)] 'af-generic-diff-repo) 31 (global-set-key [(control c)(t)(=)] 'af-generic-diff-repo)
32 (global-set-key [(control c)(d)] 'af-generic-diff-repo) 32 (global-set-key [(control c)(d)] 'af-generic-diff-repo)
33
34 (defun af-rotate-list (l)
35 "Move the head of l to the end of the list."
36 (append (cdr l) (list (car l))))
37
38 (defun af-spacejoin (l)
39 "Given list of strings l, join them with spaces and return.
40
41 Returns the empty string if l is nil."
42 (if l
43 (reduce '(lambda (x &optional y) (concat x " " (if y y))) l)
44 ""))
33 45
34 (defun pyflakes-this-buffer () 46 (defun pyflakes-this-buffer ()
35 (interactive) 47 (interactive)
36 (compilation-start (concat "cd " 48 (compilation-start (concat "cd "
37 (file-name-directory buffer-file-name) 49 (file-name-directory buffer-file-name)