Remove old library

This commit is contained in:
contrapunctus 2022-01-15 10:31:07 +05:30
parent 0564bde343
commit bfc5ca2b5a
2 changed files with 0 additions and 49 deletions

View File

@ -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)

View File

@ -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)