Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
23010255
Commit
23010255
authored
Aug 31, 2000
by
Ulrik Haugen
Browse files
lyskom-trim-buffer seems to work now.
parent
331ca4db
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
23010255
2000-08-31 Ulrik Haugen <qha@lysator.liu.se>
* lyskom-rest.el (lyskom-trim-buffer): saves point and mark and
resets point, mark and lyskom-last-viewed after taking into
consideration lyskom-trim-buffer-delete-to.
Thu Aug 31 14:38:34 2000 David Byers <davby@sen2.ida.liu.se>
* Release av 0.46-BETA-Q
...
...
src/lyskom-rest.el
View file @
23010255
...
...
@@ -774,19 +774,28 @@ found in lyskom-membership, a blocking call to the server is made."
(
defvar
lyskom-trim-buffer-delete-to
)
(
defun
lyskom-trim-buffer
()
"Trim the size of a lyskom buffer to lyskom-max-buffer-size"
"Trim the size of a lyskom buffer to lyskom-max-buffer-size
returns t if it trimmed the buffer, nil otherwise."
(
when
(
and
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
))
(
old-point
(
point
))
(
old-mark
(
mark
))
(
inhibit-read-only
t
))
(
goto-char
(
point-min
))
(
while
(
<
(
point
)
lyskom-trim-buffer-delete-to
)
(
forward-line
1
))
(
setq
lyskom-trim-buffer-delete-to
(
point
))
(
run-hooks
'lyskom-trim-buffer-hook
)
(
delete-region
(
point-min
)
lyskom-trim-buffer-delete-to
)))))
(
delete-region
(
point-min
)
lyskom-trim-buffer-delete-to
)
(
setq
lyskom-last-viewed
(
-
(
+
lyskom-last-viewed
1
)
lyskom-trim-buffer-delete-to
))
(
set-mark
(
-
(
+
old-mark
1
)
lyskom-trim-buffer-delete-to
))
(
goto-char
(
-
(
+
old-point
1
)
lyskom-trim-buffer-delete-to
))))
t
))
(
defun
lyskom-garb-lyskom-buffer-to-file
()
"Appends the deleted initial portions of the buffer to a file.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment