Skip to content

Instantly share code, notes, and snippets.

@Eskatrem
Eskatrem / comment-prints.el
Last active August 29, 2015 14:05
comment lines matching a regexp
(defun s-trim-left (s)
"Remove whitespace at the beginning of S."
(if (string-match "\\`[ \t\n\r]+" s)
(replace-match "" t t s)
s))
(defun first-word (s)
(let ((s-trim (s-trim-left s)))
(car (split-string s-trim " "))))
;;clojure-code
(:require [compojure.core :refer :all]
[trads.layout :as layout]
[trads.util :as util]
[monger.core :as mg]
[selmer.filters :as selm])
(selm/add-filter! :get-name #((first %) (second %)))
(defun get-back-char ()
(buffer-substring-no-properties (- (point) 6) (point)))
(defun del-backward ()
(interactive)
(let ((text-back (get-back-char)))
(do
(message "test")
(if (string= text-back "lambda")
(delete-backward-char 6)