From daff304468efeab8ad32da338fcdc063b909a89b Mon Sep 17 00:00:00 2001 From: Bryan Cuneo Date: Tue, 11 Mar 2014 00:54:48 -0500 Subject: [PATCH] Use cl-flet instead of flet in Emacs version >= 24.3 --- solarized-definitions.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/solarized-definitions.el b/solarized-definitions.el index 2f588ed..de89022 100644 --- a/solarized-definitions.el +++ b/solarized-definitions.el @@ -76,8 +76,15 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." column is a different set, one of which will be chosen based on term capabilities, etc.") +(defvar which-flet + "This variable will store either flet or cl-flet depending on the Emacs + version. flet was deprecated in in 24.3") +(if (and (> emacs-major-version 24) (> emacs-minor-version 2)) + (fset 'which-flet 'cl-flet) + (fset 'which-flet 'flet)) + (defun solarized-color-definitions (mode) - (flet ((find-color (name) + (which-flet ((find-color (name) (let* ((index (if window-system (if solarized-degrade 3 @@ -143,7 +150,7 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." (bg-violet `(:background ,violet)) (bg-blue `(:background ,blue)) (bg-cyan `(:background ,cyan)) - + (fg-base03 `(:foreground ,base03)) (fg-base02 `(:foreground ,base02)) (fg-base01 `(:foreground ,base01))