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
f92f70bc
Commit
f92f70bc
authored
Mar 16, 1998
by
Richard M. Stallman
Browse files
(rmail-clear-headers): Make sure an empty line
still separates the headers from the body.
parent
1fa01bcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
lisp/mail/rmail.el
lisp/mail/rmail.el
+30
-29
No files found.
lisp/mail/rmail.el
View file @
f92f70bc
...
...
@@ -1657,35 +1657,36 @@ delete all header fields whose names match that regexp.
Otherwise,
if
`
rmail-displayed-headers
'
is
non-nil,
delete
all
header
fields
*except*
those
whose
names
match
that
regexp.
Otherwise,
delete
all
header
fields
whose
names
match
`
rmail-ignored-headers
'.
"
(if (search-forward "
\n\n
" nil t)
(let ((case-fold-search t)
(buffer-read-only nil))
(if (and rmail-displayed-headers (null ignored-headers))
(save-restriction
(narrow-to-region (point-min) (point))
(let (lim next)
(goto-char (point-min))
(while (and (not (eobp))
(save-excursion
(if (re-search-forward "
\n[^
\t]
" nil t)
(setq lim (match-beginning 0)
next (1+ lim))
(setq lim nil next (point-max)))))
(if (save-excursion
(re-search-forward rmail-displayed-headers lim t))
(goto-char next)
(delete-region (point) next))))
(goto-char (point-min)))
(or ignored-headers (setq ignored-headers rmail-ignored-headers))
(save-restriction
(narrow-to-region (point-min) (point))
(while (progn
(goto-char (point-min))
(re-search-forward ignored-headers nil t))
(beginning-of-line)
(delete-region (point)
(progn (re-search-forward "
\n[^
\t]
")
(1- (point))))))))))
(when (search-forward "
\n\n
" nil t)
(forward-char -1)
(let ((case-fold-search t)
(buffer-read-only nil))
(if (and rmail-displayed-headers (null ignored-headers))
(save-restriction
(narrow-to-region (point-min) (point))
(let (lim next)
(goto-char (point-min))
(while (and (not (eobp))
(save-excursion
(if (re-search-forward "
\n[^
\t]
" nil t)
(setq lim (match-beginning 0)
next (1+ lim))
(setq lim nil next (point-max)))))
(if (save-excursion
(re-search-forward rmail-displayed-headers lim t))
(goto-char next)
(delete-region (point) next))))
(goto-char (point-min)))
(or ignored-headers (setq ignored-headers rmail-ignored-headers))
(save-restriction
(narrow-to-region (point-min) (point))
(while (progn
(goto-char (point-min))
(re-search-forward ignored-headers nil t))
(beginning-of-line)
(delete-region (point)
(progn (re-search-forward "
\n[^
\t]
")
(1- (point))))))))))
(defun rmail-msg-is-pruned ()
(rmail-maybe-set-message-counters)
...
...
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