Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
450a0d96
Commit
450a0d96
authored
May 30, 2000
by
Johan Sundström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filtering out ugly mail signatures made easy.
parent
40835f51
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
1 deletion
+39
-1
src/ChangeLog
src/ChangeLog
+10
-0
src/english-strings.el
src/english-strings.el
+2
-0
src/swedish-strings.el
src/swedish-strings.el
+3
-1
src/view-text.el
src/view-text.el
+24
-0
No files found.
src/ChangeLog
View file @
450a0d96
2000-05-30 Johan Sundström <jhs@lysator.liu.se>
* view-text.el (lyskom-filter-signature-hook): New function. Would
probably be nice to add as a configuration option too, instead of
being just hookable. :-]
(lyskom-text-is-mail-p): New ad-hoc support function.
* swedish-strings.el, english-strings.el (lyskom-message): Added
the string reformat-signature.
2000-05-29 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-is-loaded): Don't bind
...
...
src/english-strings.el
View file @
450a0d96
...
...
@@ -1237,6 +1237,8 @@ On since %#8s%#9s")
(reformat-truncated . "
truncated
")
(reformat-signature . "
designed
")
(need-library . "
The
\"%#1s\"
package
is
required
for
this
command.\n
")
(calc-expression . "
Expression:
")
...
...
src/swedish-strings.el
View file @
450a0d96
...
...
@@ -1241,7 +1241,9 @@ Uppkopplad sedan %#8s%#9s")
(reformat-filled . "
ombruten
")
(reformat-truncated . "
nedkortad
")
(reformat-signature . "
avsignerad
")
(need-library . "
Paketet
\"%#1s\"
behvs
fr
att
utfra
detta
kommando.\n
")
(calc-expression . "
Uttryck:
")
...
...
src/view-text.el
View file @
450a0d96
...
...
@@ -334,6 +334,30 @@ Note that this function must not be called asynchronously."
todo
))
(
defun
lyskom-text-is-mail-p
(
text-stat
)
"Ad-hoc test to determine whether a text is a mail by peeking at aux-items."
(
lyskom-match-aux-items
(
text-stat->aux-items
text-stat
)
(
lambda
(
aux-item
)
(
let
((
tag
(
aux-item->tag
aux-item
)))
(
or
(
and
(
>
tag
15
)
; 16:mx-author, 17:mx-from, 18:mx-reply-to,
(
<
tag
22
))
; 19:mx-to, 20:mx-cc, 21:mx-date,
(
=
24
tag
))))))
; 24:mx-headers
(
defun
lyskom-filter-signature-hook
()
"Filter out the signature of imported mail messages. Most useful
when put in your `lyskom-view-text-hook'."
(
unless
(
eq
'kom-review-noconversion
lyskom-current-command
)
(
when
(
lyskom-text-is-mail-p
text-stat
)
(
let*
((
body
(
text->text-mass
text
))
(
sign
(
string-match
"^-- $"
body
)))
(
when
sign
(
set-text->text-mass
text
(
substring
body
0
sign
))
(
lyskom-signal-reformatted-text
'reformat-signature
))))))
;(add-hook 'lyskom-view-text-hook 'lyskom-filter-signature-hook)
(
defun
lyskom-follow-comments
(
text-stat
conf-stat
...
...
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