From 59173ba0c048ead287dd1171a5a52ce53fd9a0cb Mon Sep 17 00:00:00 2001 From: Jason Blevins Date: Fri, 10 Jun 2016 20:39:27 -0400 Subject: [PATCH] Avoid fringe-columns for backwards compatibility It is not defined in Emacs 24.5. Fixes GH-32. --- deft.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deft.el b/deft.el index 8c91763..e429286 100644 --- a/deft.el +++ b/deft.el @@ -1155,7 +1155,8 @@ Case is ignored." If the frame has a fringe, it will absorb the newline. Otherwise, we reduce the line length by a one-character offset." (let* ((window (get-buffer-window deft-buffer)) - (offset (if (> (fringe-columns 'right) 0) 0 1))) + (fringe-right (ceiling (or (cadr (window-fringes)) 0))) + (offset (if (> fringe-right 0) 0 1))) (when window (- (window-text-width window) offset))))