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
0f157ad5
Commit
0f157ad5
authored
Nov 18, 2005
by
Chong Yidong
Browse files
Add hacks for citation in mail-mode and message-mode.
parent
0d876a14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/longlines.el
lisp/longlines.el
+20
-3
No files found.
lisp/ChangeLog
View file @
0f157ad5
2005-11-18 Chong Yidong <cyd@stupidchicken.com>
* longlines.el (longlines-mode): Add hacks for mail-mode and
message-mode.
2005-11-18 Carsten Dominik <dominik@science.uva.nl>
* textmodes/org.el: (org-table-sort-lines): New command.
...
...
lisp/longlines.el
View file @
0f157ad5
...
...
@@ -137,7 +137,21 @@ are indicated with a symbol."
(
add-hook
'after-change-functions
'longlines-after-change-function
nil
t
)
(
add-hook
'post-command-hook
'longlines-post-command-function
nil
t
)))
'longlines-post-command-function
nil
t
))
;; Hacks to make longlines play nice with various modes.
(
cond
((
eq
major-mode
'mail-mode
)
(
or
mail-citation-hook
(
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
)
(
make-local-variable
'message-indent-citation-function
)
(
if
(
not
(
listp
message-indent-citation-function
))
(
setq
message-indent-citation-function
(
list
message-indent-citation-function
)))
(
add-to-list
'message-indent-citation-function
'longlines-decode-region
t
)))
)
;; Turn off longlines mode
(
setq
buffer-file-format
(
delete
'longlines
buffer-file-format
))
(
if
longlines-showing
...
...
@@ -298,8 +312,11 @@ Otherwise, return nil. Text cannot be moved across hard newlines."
(
1+
(
current-column
)))
space
))))))
(
defun
longlines-decode-region
(
beg
end
)
"Turn all newlines between BEG and END into hard newlines."
(
defun
longlines-decode-region
(
&optional
beg
end
)
"Turn all newlines between BEG and END into hard newlines.
If BEG and END are nil, the point and mark are used."
(
if
(
null
beg
)
(
setq
beg
(
point
)))
(
if
(
null
end
)
(
setq
end
(
mark
t
)))
(
save-excursion
(
goto-char
(
min
beg
end
))
(
while
(
search-forward
"\n"
(
max
beg
end
)
t
)
...
...
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