Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2c127d45
Commit
2c127d45
authored
Nov 20, 2005
by
Chong Yidong
Browse files
(longlines-mode): Add a message-setup-hook.
(longlines-decode-buffer): New function.
parent
f129a4df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/longlines.el
lisp/longlines.el
+6
-1
No files found.
lisp/ChangeLog
View file @
2c127d45
...
...
@@ -3,6 +3,8 @@
* longlines.el (longlines-before-revert-hook)
(longlines-after-revert-hook): New functions.
(longlines-mode): Turn off longlines temporarily when reverting.
Add a message-setup-hook.
(longlines-decode-buffer): New function.
2005-11-19 Andreas Schwab <schwab@suse.de>
...
...
lisp/longlines.el
View file @
2c127d45
...
...
@@ -127,7 +127,7 @@ are indicated with a symbol."
;; longlines-wrap-lines that we'll never encounter from here
(
save-restriction
(
widen
)
(
longlines-decode-
region
(
point-min
)
(
point-max
)
))
(
longlines-decode-
buffer
))
(
longlines-wrap-region
(
point-min
)
(
point-max
))
(
set-buffer-modified-p
mod
))
(
when
(
and
longlines-show-hard-newlines
...
...
@@ -140,6 +140,7 @@ are indicated with a symbol."
(
add-hook
'mail-citation-hook
'mail-indent-citation
nil
t
))
(
add-hook
'mail-citation-hook
'longlines-decode-region
nil
t
))
((
eq
major-mode
'message-mode
)
(
add-hook
'message-setup-hook
'longlines-decode-buffer
nil
t
)
(
make-local-variable
'message-indent-citation-function
)
(
if
(
not
(
listp
message-indent-citation-function
))
(
setq
message-indent-citation-function
...
...
@@ -325,6 +326,10 @@ If BEG and END are nil, the point and mark are used."
(
set-hard-newline-properties
(
match-beginning
0
)
(
match-end
0
)))))
(
defun
longlines-decode-buffer
()
"Turn all newlines in the buffer into hard newlines."
(
longlines-decode-region
(
point-min
)
(
point-max
)))
(
defun
longlines-encode-region
(
beg
end
&optional
buffer
)
"Replace each soft newline between BEG and END with exactly one space.
Hard newlines are left intact. The optional argument BUFFER exists for
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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