changeset 122:78a60cd6e6cb

update fill-column-indicator
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 18 May 2015 00:32:07 -0400
parents 0296487fa83c
children 0534384df30b
files packages/fill-column-indicator.el
diffstat 1 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/packages/fill-column-indicator.el
+++ b/packages/fill-column-indicator.el
@@ -1,9 +1,9 @@
 ;;; fill-column-indicator.el --- Graphically indicate the fill column
 
-;; Copyright (c) 2011-2012 Alp Aker
+;; Copyright (c) 2011-2014 Alp Aker
 
 ;; Author: Alp Aker <alp.tekin.aker@gmail.com>
-;; Version: 1.84
+;; Version: 1.86
 ;; Keywords: convenience
 
 ;; This program is free software; you can redistribute it and/or
@@ -27,6 +27,13 @@
 ;; length of the editing window.  Fill-column-indicator implements this
 ;; facility in Emacs.
 
+;; PLEASE NOTE: There is a small incompatibility between this package and the
+;; current stable Emacs relase (v24.3).  A bug in Emacs's internal display
+;; routine that was introduced shortly before that release can cause vertical
+;; motion commands to skip blank lines when fci-mode is active.  This has
+;; been fixed in Emacs trunk.  See github.com/alpaker/Fill-Column-Indicator/issues/31
+;; for further discussion.
+
 ;; Installation and Usage
 ;; ======================
 
@@ -48,8 +55,7 @@
 ;; fill comments at, for example, column 70, but want a vertical rule at
 ;; column 80 or 100 to indicate the maximum line length for code.)  The
 ;; default behavior (showing the indicator at the fill column) is specified
-;; by setting fci-rule-column to nil.  Note that this variable becomes buffer
-;; local when set.
+;; by setting fci-rule-column to nil.
 
 ;; On graphical displays the fill-column rule is drawn using a bitmap
 ;; image.  Its color is controlled by the variable `fci-rule-color', whose
@@ -208,8 +214,6 @@
                  (integer :tag "Use a custom column"
                           :match (lambda (w val) (fci-posint-p val)))))
 
-(make-variable-buffer-local 'fci-rule-column)
-
 (defcustom fci-rule-color "#cccccc"
   "Color used to draw the fill-column rule.
 
@@ -608,7 +612,7 @@
 
 If the selected frame cannot display images, use the character
 height and width of the first graphic frame in the frame list
-displaying the current buffer.  (This fallback behavior is a
+displaying the current buffer.  (This fallback behavior is just a
 rough heuristic.)"
   (let ((frame (catch 'found-graphic
                  (if (display-images-p)
@@ -797,14 +801,16 @@
         (goto-char end)
         (setq end (line-beginning-position 2))
         (fci-delete-overlays-region start end)
-        (fci-put-overlays-region start end))))) 
+        (when (> (+ (window-width) (window-hscroll))
+                 fci-limit)
+          (fci-put-overlays-region start end))))))
 
 (defun fci-redraw-window (win &optional start)
   "Redraw the fill-column rule in WIN starting from START."
   (fci-redraw-region (or start (window-start win)) (window-end win t) 'ignored))
 
 ;; This doesn't determine the strictly minimum amount by which the rule needs
-;; to be extended, but the amount used is always sufficient, and determining
+;; to be extended, but the amount used is always sufficient, and determininga
 ;; the genuine minimum is more expensive than doing the extra drawing.
 (defun fci-extend-rule-for-deletion (start end)
   "Extend the fill-column rule after a deletion that spans newlines."