Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update various faces when a theme is disabled #1988

Merged
merged 1 commit into from
May 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

### Bugs Fixed

* [#1987](https://github.com/clojure-emacs/cider/issues/1987): Fix: Update faces when disabling a theme
* [#1962](https://github.com/clojure-emacs/cider/issues/1962): Fix performance in fringe overlay placement.
* [#1947](https://github.com/clojure-emacs/cider/issues/1947): Fix error on `cider-jack-in` when `enlighten-mode` is enabled.
* [#1588](https://github.com/clojure-emacs/cider/issues/1588): Redirect `*err*`, `java.lang.System/out`, and `java.lang.System/err` to REPL buffer on all attached sessions.
Expand Down
5 changes: 5 additions & 0 deletions cider-doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@
"When theme is changed, update `cider-docview-code-background-color'."
(setq cider-docview-code-background-color (cider-scale-background-color)))


(defadvice disable-theme (after cider-docview-adapt-to-theme activate)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use advice-add from nadvice.el? It's the recommended way for newer versions of Emacs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thought crossed my mind as well, but we'd have to update the existing code for consistency as well. We can always do this down the road.

"When theme is disabled, update `cider-docview-code-background-color'."
(setq cider-docview-code-background-color (cider-scale-background-color)))


;; Mode & key bindings

Expand Down
5 changes: 5 additions & 0 deletions cider-stacktrace.el
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ The error types are represented as strings."
(setq cider-stacktrace-frames-background-color (cider-scale-background-color)))


(defadvice disable-theme (after cider-stacktrace-adapt-to-theme activate)
"When theme is disabled, update `cider-stacktrace-frames-background-color'."
(setq cider-stacktrace-frames-background-color (cider-scale-background-color)))


;; Mode & key bindings

(defvar cider-stacktrace-mode-map
Expand Down
5 changes: 5 additions & 0 deletions cider-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ Add to this list to have CIDER recognize additional test defining macros."
(setq cider-test-items-background-color (cider-scale-background-color)))


(defadvice disable-theme (after cider-test-adapt-to-theme activate)
"When theme is disabled, update `cider-test-items-background-color'."
(setq cider-test-items-background-color (cider-scale-background-color)))


;;; Report mode & key bindings
;; The primary mode of interacting with test results is the report buffer, which
;; allows navigation among tests, jumping to test definitions, expected/actual
Expand Down