Skip to content
Browse files

Merge pull request #20 from p3r7/master

Conditionally replace deprecated macro `flet` with `noflet`
  • Loading branch information...
2 parents 7719e1a + 053cbbf commit a6e78cafc193050a493d16d07eae107a2436c293 @sjbach committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 lusty-explorer.el
View
9 lusty-explorer.el
@@ -85,6 +85,11 @@
;; Used only for its faces (for color-theme).
(require 'dired)
+;; Backward compatibility: use noflet if present, fallback to (deprecated since 24.3) flet otherwise
+(defalias 'lusty--flet 'flet)
+(when (require 'noflet nil 'noerror)
+ (defalias 'lusty--flet 'noflet))
+
(declaim (optimize (speed 3) (safety 0)))
@@ -621,7 +626,7 @@ does not begin with '.'."
;; already split frame is not a living window.
(defun lusty-lowest-window ()
"Return the lowest window on the frame."
- (flet ((iterate-non-dedicated-window (start-win direction)
+ (lusty--flet ((iterate-non-dedicated-window (start-win direction)
;; Skip dedicated windows when iterating.
(let ((iterating-p t)
(next start-win))
@@ -723,7 +728,7 @@ does not begin with '.'."
(defun lusty-buffer-list ()
"Return a list of buffers ordered with those currently visible at the end."
(let ((visible-buffers '()))
- (flet ((add-buffer-maybe (window)
+ (lusty--flet ((add-buffer-maybe (window)
(let ((b (window-buffer window)))
(unless (memq b visible-buffers)
(push b visible-buffers)))))

0 comments on commit a6e78ca

Please sign in to comment.
Something went wrong with that request. Please try again.