Commit 5b1d02f9 authored by Ulrik Haugen's avatar Ulrik Haugen
Browse files

Lagt till kom-trim-buffer-minumum och dokumentation.

parent dbe89b2e
......@@ -3180,6 +3180,13 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
recipient. When this is off, comments will always be sent to the new
recipient. For most people it is a good idea to leave this on.")
(kom-trim-buffer-minimum-doc . "\
If you have anything in lyskom-trim-buffer-hook this variable determines
with how many characters the lyskom buffer size must excede
kom-max-buffer-size before your hook is run and the buffer is trimmed.
The variable should be an integer, the default is 4096.")
;;
;; Tags for variables
;;
......@@ -3334,6 +3341,7 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-show-unread-in-frame-title-tag . "Show unread indicator in title bar:")
(kom-created-texts-are-saved-tag . "Save created texts:")
(kom-confirm-add-recipients-tag . "Ask if comments shoulw be sent to new recipients:")
(kom-trim-buffer-minimum-tag . "How small parts of the lyskom buffer are trimmed.")
)
)
......
......@@ -770,12 +770,13 @@ found in lyskom-membership, a blocking call to the server is made."
;;;; ================================================================
;;;; Scrolling and text insertion.
(defvar lyskom-trim-buffer-delete-to)
(defun lyskom-trim-buffer ()
"Trim the size of a lyskom buffer to lyskom-max-buffer-size"
(when (and kom-max-buffer-size
(> (buffer-size) kom-max-buffer-size))
(> (- (buffer-size) kom-trim-buffer-minimum) kom-max-buffer-size))
(lyskom-save-excursion
(let ((lyskom-trim-buffer-delete-to (- (buffer-size)
kom-max-buffer-size))
......
......@@ -240,6 +240,7 @@
"\n"
[kom-login-hook]
[kom-do-when-done]
[kom-trim-buffer-minimum]
))
;;; ======================================================================
......@@ -663,6 +664,7 @@ customize buffer but do not save them to the server."
(kom-follow-attachments (toggle (yes no)))
(kom-show-unread-in-frame-title (toggle (yes no)))
(kom-confirm-add-recipients (toggle (yes no)))
(kom-trim-buffer-minimum (number))
))
(defvar lyskom-widget-functions
......
......@@ -3224,6 +3224,12 @@ i servern. Annars sparas det i din .emacs.")
kommer kommentarer alltid att skickas ven till den nya mottagaren.
Det r oftast bra att ha pslaget.")
(kom-trim-buffer-minimum-doc . "\
Om du har ngot i lyskom-trim-buffer-hook bestmmer den hr variabeln
hur mnga tecken strre n kom-max-buffer-size lyskom-bufferten mste
vara innan din hook krs och bufferten trimmas. Variablen ska vara ett
heltal, default r 4096.")
;;
;; Tags for variables
......@@ -3379,6 +3385,7 @@ i servern. Annars sparas det i din .emacs.")
(kom-show-unread-in-frame-title-tag . "Visa olstamarkering i titelraden:")
(kom-created-texts-are-saved-tag . "Spara frfattade inlgg:")
(kom-confirm-add-recipients-tag . "Frga om kommentarer skall sndas till nya mottagare:")
(kom-trim-buffer-minimum-tag . "Hur sm bitar av lyskom-bufferten som trimmas.")
)
)
......
......@@ -1036,6 +1036,10 @@ at random and used. This element may be a string, function or list."
"Keymap for the customize buffer"
local)
(def-kom-var kom-trim-buffer-minimum 4096
"*This number of bytes rounded to a whole line is the ammount of text trimmed
each time." server)
;;; =================================================================
;;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment