diff --git a/contrapunctus/cp.el b/contrapunctus/cp.el deleted file mode 100644 index 248d317..0000000 --- a/contrapunctus/cp.el +++ /dev/null @@ -1,48 +0,0 @@ -(defun cp-get-buffer-regexp (regexp &optional all) - "Returns the name of the first buffer in the buffer list which matches REGEXP. - -If ALL is non-nil, multiple matches will be returned as a list." - (let ((results (cl-remove-if-not (lambda (a) - (string-match regexp a)) - (mapcar #'buffer-name (buffer-list))))) - (if all results (car results)))) - -(cl-defun cp-buffer-name-match-p (regexp &optional (string (buffer-name))) - "Checks if STRING matches REGEXP. -If STRING is not provided, uses the current buffer name." - (if (string-match regexp string) t nil)) - -(defun cp/random-elt (list) - "Retun a random element from LIST." - (nth (random (length list)) list)) - -(defun cp/map-two (fn list) - "Apply FN to the first two elements of LIST, then the second two, and so on." - (let ((newlist '())) - (while (not (= 0 (- (length list) 1))) - (setq newlist - (append - newlist (list - (funcall fn (car list) (cadr list))))) - (pop list)) - newlist)) - -(defun cp/average (numbers) - (/ (-reduce '+ numbers) - (length numbers))) - -(defun cp/pastebinit () - (interactive) - (-> (shell-command-on-region - (if (region-active-p) (region-beginning) (point-min)) - (if (region-active-p) (region-end) (point-max)) - "pastebinit") - (kill-new))) - -(defun ^ (base pwr) - (while (not (zerop pwr)) - (setq base (* base base) - pwr (- pwr 1))) - base) - -(provide 'cp) diff --git a/init.org b/init.org index 205f02d..f502dd8 100644 --- a/init.org +++ b/init.org @@ -591,7 +591,6 @@ ARGS are ignored." ** #+BEGIN_SRC emacs-lisp (add-to-list 'load-path "~/.emacs.d/contrapunctus/") -(load "cp") ;; (if (not (server-running-p)) (server-start)) (server-start)