Created
February 18, 2012 04:08
-
-
Save kyanagi/1857334 to your computer and use it in GitHub Desktop.
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
--- session.el.orig 2012-02-18 12:58:20.000000000 +0900 | |
+++ session.el 2012-02-18 13:07:47.000000000 +0900 | |
@@ -409,6 +409,11 @@ | |
:group 'session-globals | |
:type 'regexp) | |
+(defcustom session-globals-exclude-regexp "\\`anything-" | |
+ "Regexp matching global variables NOT to be saved between sessions." | |
+ :group 'session-globals | |
+ :type 'regexp) | |
+ | |
(defcustom session-globals-exclude | |
'(load-history | |
register-alist vc-comment-ring flyspell-auto-correct-ring | |
@@ -1386,7 +1391,7 @@ | |
(apropos-internal session-globals-regexp | |
'boundp))) | |
(let ((symbol (if (consp incl) (car incl) incl))) | |
- (unless (memq symbol s-excl) | |
+ (unless (or (memq symbol s-excl) (string-match-p session-globals-exclude-regexp (symbol-name symbol))) | |
(push symbol s-excl) | |
(when (default-boundp symbol) | |
(session-save-insert-variable symbol |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment