From bbac2900ce2f6d8d14c5d19e05d51b3b559cde2c Mon Sep 17 00:00:00 2001 From: Joost Kremers Date: Wed, 26 Mar 2008 00:42:15 +0100 Subject: [PATCH] highlight entire line if ebib-index-display-fields is set. if ebib-index-display-fields is set, the highlight in the index buffer now covers the entire line, instead of just the entry key. looks nicer that way. also set truncate-lines to t in the index buffer, which works better when ebib-index-display-fields is set. --- src/ChangeLog | 7 +++++++ src/ebib.el | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9fb2fc5..2cf7bbc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-03-26 Joost Kremers + + * ebib.el (ebib-index-mode): set truncate-lines to t, which works + better if ebib-index-dislay-fields is set. + (ebib-set-index-highlight): changed so that it highlights the + entire line if ebib-index-display-fields is set. + 2008-03-19 Joost Kremers * ebib.el (ebib-display-entry): added set-buffer. diff --git a/src/ebib.el b/src/ebib.el index 8d64c88..1459e07 100644 --- a/src/ebib.el +++ b/src/ebib.el @@ -722,7 +722,9 @@ display the actual filename." (set-buffer ebib-index-buffer) (beginning-of-line) (let ((beg (point))) - (skip-chars-forward "^ ") + (if ebib-index-display-fields + (end-of-line) + (skip-chars-forward "^ ")) (ebib-move-highlight ebib-index-highlight beg (point) ebib-index-buffer))) (defun ebib-set-fields-highlight () @@ -1330,7 +1332,8 @@ killed and the database has been modified." (define-derived-mode ebib-index-mode fundamental-mode "Ebib-index" "Major mode for the Ebib index buffer." - (setq buffer-read-only t)) + (setq buffer-read-only t) + (setq truncate-lines t)) (defun ebib-fill-index-buffer () "Fills the index buffer with the list of keys in EBIB-CUR-DB. -- 2.11.4.GIT