Created
August 28, 2012 02:18
-
-
Save vwood/3494347 to your computer and use it in GitHub Desktop.
Censorship in emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; 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)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Of course this does nothing to remove the actual text. I'm just looking for that [REDACTED] look in screen shots.