Skip to content

Instantly share code, notes, and snippets.

@vwood
Created August 28, 2012 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vwood/3494347 to your computer and use it in GitHub Desktop.
Save vwood/3494347 to your computer and use it in GitHub Desktop.
Censorship in emacs
;;
;; Censor text temporarily in emacs
;;
;; (Using this for screen shots mostly)
(defvar censor-face
'(:foreground "black" :background "black")
"Face to use for censoring")
(defun censor ()
"Censor the current region"
(interactive)
(let ((overlay (make-overlay (region-beginning) (region-end))))
(overlay-put overlay 'face censor-face)))
(defun censor-remove ()
"Uncensor the current region"
(interactive)
(remove-overlays (region-beginning) (region-end) 'face censor-face))
@vwood
Copy link
Author

vwood commented Sep 4, 2012

Of course this does nothing to remove the actual text. I'm just looking for that [REDACTED] look in screen shots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment