mirror of https://github.com/djcb/mu.git
* mm updates
This commit is contained in:
parent
39c126b51b
commit
19e93a52f1
|
@ -182,8 +182,11 @@ after the end of the search results."
|
|||
(insert (propertize
|
||||
(case count
|
||||
(0 "No matching messages found")
|
||||
(1 "Found 1 message")
|
||||
(otherwise (format "Found %d messages" count)))
|
||||
;; note, don't show the number so we don't have to update it
|
||||
;; when we delete messsages...
|
||||
(otherwise "End of search results"))
|
||||
;; (1 "Found 1 message")
|
||||
;; (otherwise (format "Found %d messages" count)))
|
||||
'face 'mm/system-face 'intangible t))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -133,7 +133,7 @@ process."
|
|||
;; register a function for (:info ...) sexps
|
||||
(setq mm/proc-info-func 'mm/proc-info-handler)
|
||||
(when mm/mu-proc
|
||||
(set-process-coding-system mm/mu-proc 'utf-8-unix 'utf-8-unix)
|
||||
(set-process-coding-system mm/mu-proc 'binary 'utf-8-unix)
|
||||
(set-process-filter mm/mu-proc 'mm/proc-filter)
|
||||
(set-process-sentinel mm/mu-proc 'mm/proc-sentinel))))
|
||||
|
||||
|
@ -163,11 +163,16 @@ updated as well, with all processed sexp data removed."
|
|||
(let* ((b (string-match "\376\\([0-9]+\\)\376" mm/buf))
|
||||
(sexp-len
|
||||
(when b (string-to-number (match-string 1 mm/buf)))))
|
||||
|
||||
;; does mm/buf contain the full sexp?
|
||||
(when (and b (>= (length mm/buf) (+ sexp-len (match-end 0))))
|
||||
;; clear-up start
|
||||
(setq mm/buf (substring mm/buf (match-end 0)))
|
||||
(let ((objcons (read-from-string mm/buf)))
|
||||
;; note: we read the input in binary mode -- here, we take the part that
|
||||
;; is the sexp, and convert that to utf-8, before we interpret it.
|
||||
(let ((objcons
|
||||
(read-from-string
|
||||
(decode-coding-string (substring mm/buf 0 sexp-len) 'utf-8))))
|
||||
(setq mm/buf (substring mm/buf sexp-len))
|
||||
(car objcons))))))
|
||||
|
||||
|
|
|
@ -319,8 +319,8 @@ removing '^M' etc."
|
|||
(save-excursion
|
||||
;; remove the stupid CRs
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "[
]" nil t)
|
||||
(replace-match "" nil t))
|
||||
(while (re-search-forward "[\r\240]" nil t)
|
||||
(replace-match " " nil t))
|
||||
;; give the footer a different color...
|
||||
(goto-char (point-min))
|
||||
(let ((p (search-forward "\n-- \n" nil t)))
|
||||
|
@ -328,7 +328,7 @@ removing '^M' etc."
|
|||
(add-text-properties p (point-max) '(face mm/view-footer-face))))
|
||||
;; this is fairly simplistic...
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\(https?://.*\\)\\>" nil t)
|
||||
(while (re-search-forward "\\(https?://[-a-zA-Z0-9?_.$%/=+&#@!]*\\)\\>" nil t)
|
||||
(let ((subst (propertize (match-string-no-properties 0)
|
||||
'face 'mm/view-link-face)))
|
||||
(incf num)
|
||||
|
|
Loading…
Reference in New Issue