Initial commit

This commit is contained in:
Némunaire 2012-10-13 21:35:28 +02:00
commit 99e3df82b7
28 changed files with 2639 additions and 0 deletions

48
stuff/my-elisp.el Executable file
View file

@ -0,0 +1,48 @@
;; ------ ;;
;; String ;;
;; ------ ;;
(defun remove-prefix-from-string (prefix string)
(let ((rg (concat "^" prefix)))
(replace-regexp-in-string rg "" path)))
;; ----- ;;
;; Emacs ;;
;; ----- ;;
(defun buffer-empty-p ()
(equal (point-min) (point-max)))
(defun current-file-name ()
(buffer-file-name (current-buffer)))
(defun cwd ()
(replace-regexp-in-string "Directory " "" (pwd)))
(defun rbegin ()
(min (point) (mark)))
(defun rend ()
(max (point) (mark)))
;; ---- ;;
;; Lisp ;;
;; ---- ;;
(defun filter (condp l)
(if l
(let ((head (car l))
(tail (filter condp (cdr l))))
(if (funcall condp head)
(cons head tail)
tail))
()))
;; ------- ;;
;; Provide ;;
;; ------- ;;
(provide 'my-elisp)