forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
38 additions
and
132 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
;; Fill column indicator | ||
(when (eval-when-compile (> emacs-major-version 23)) | ||
(require-package 'fill-column-indicator) | ||
(defun sanityinc/prog-mode-fci-settings () | ||
(turn-on-fci-mode) | ||
(when show-trailing-whitespace | ||
(set (make-local-variable 'whitespace-style) '(face trailing)) | ||
(whitespace-mode 1))) | ||
(require-package 'fill-column-indicator) | ||
(defun sanityinc/prog-mode-fci-settings () | ||
(turn-on-fci-mode) | ||
(when show-trailing-whitespace | ||
(set (make-local-variable 'whitespace-style) '(face trailing)) | ||
(whitespace-mode 1))) | ||
|
||
;;(add-hook 'prog-mode-hook 'sanityinc/prog-mode-fci-settings) | ||
;;(add-hook 'prog-mode-hook 'sanityinc/prog-mode-fci-settings) | ||
|
||
(defun sanityinc/fci-enabled-p () | ||
(bound-and-true-p fci-mode)) | ||
(defun sanityinc/fci-enabled-p () | ||
(bound-and-true-p fci-mode)) | ||
|
||
(defvar sanityinc/fci-mode-suppressed nil) | ||
(make-variable-buffer-local 'sanityinc/fci-mode-suppressed) | ||
(defvar sanityinc/fci-mode-suppressed nil) | ||
(make-variable-buffer-local 'sanityinc/fci-mode-suppressed) | ||
|
||
(defadvice popup-create (before suppress-fci-mode activate) | ||
"Suspend fci-mode while popups are visible" | ||
(let ((fci-enabled (sanityinc/fci-enabled-p))) | ||
(when fci-enabled | ||
(setq sanityinc/fci-mode-suppressed fci-enabled) | ||
(turn-off-fci-mode)))) | ||
(defadvice popup-delete (after restore-fci-mode activate) | ||
"Restore fci-mode when all popups have closed" | ||
(when (and sanityinc/fci-mode-suppressed | ||
(null popup-instances)) | ||
(setq sanityinc/fci-mode-suppressed nil) | ||
(turn-on-fci-mode))) | ||
(defadvice popup-create (before suppress-fci-mode activate) | ||
"Suspend fci-mode while popups are visible" | ||
(let ((fci-enabled (sanityinc/fci-enabled-p))) | ||
(when fci-enabled | ||
(setq sanityinc/fci-mode-suppressed fci-enabled) | ||
(turn-off-fci-mode)))) | ||
(defadvice popup-delete (after restore-fci-mode activate) | ||
"Restore fci-mode when all popups have closed" | ||
(when (and sanityinc/fci-mode-suppressed | ||
(null popup-instances)) | ||
(setq sanityinc/fci-mode-suppressed nil) | ||
(turn-on-fci-mode))) | ||
|
||
;; Regenerate fci-mode line images after switching themes | ||
(defadvice enable-theme (after recompute-fci-face activate) | ||
(dolist (buffer (buffer-list)) | ||
(with-current-buffer buffer | ||
(when (sanityinc/fci-enabled-p) | ||
(turn-on-fci-mode)))))) | ||
;; Regenerate fci-mode line images after switching themes | ||
(defadvice enable-theme (after recompute-fci-face activate) | ||
(dolist (buffer (buffer-list)) | ||
(with-current-buffer buffer | ||
(when (sanityinc/fci-enabled-p) | ||
(turn-on-fci-mode))))) | ||
|
||
|
||
(provide 'init-fci) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
This is a place for 3rd party code which isn't available in MELPA or | ||
other package repositories. This directory and its immediate subdirectories | ||
will be added to load-path at start-up time. | ||
|
||
Notably, in Emacs 23.x, a backported package.el is automatically | ||
downloaded and installed here. |