* mm updates
This commit is contained in:
@ -182,8 +182,11 @@ after the end of the search results."
|
|||||||
(insert (propertize
|
(insert (propertize
|
||||||
(case count
|
(case count
|
||||||
(0 "No matching messages found")
|
(0 "No matching messages found")
|
||||||
(1 "Found 1 message")
|
;; note, don't show the number so we don't have to update it
|
||||||
(otherwise (format "Found %d messages" count)))
|
;; 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))))))
|
'face 'mm/system-face 'intangible t))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
@ -133,7 +133,7 @@ process."
|
|||||||
;; register a function for (:info ...) sexps
|
;; register a function for (:info ...) sexps
|
||||||
(setq mm/proc-info-func 'mm/proc-info-handler)
|
(setq mm/proc-info-func 'mm/proc-info-handler)
|
||||||
(when mm/mu-proc
|
(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-filter mm/mu-proc 'mm/proc-filter)
|
||||||
(set-process-sentinel mm/mu-proc 'mm/proc-sentinel))))
|
(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))
|
(let* ((b (string-match "\376\\([0-9]+\\)\376" mm/buf))
|
||||||
(sexp-len
|
(sexp-len
|
||||||
(when b (string-to-number (match-string 1 mm/buf)))))
|
(when b (string-to-number (match-string 1 mm/buf)))))
|
||||||
|
|
||||||
;; does mm/buf contain the full sexp?
|
;; does mm/buf contain the full sexp?
|
||||||
(when (and b (>= (length mm/buf) (+ sexp-len (match-end 0))))
|
(when (and b (>= (length mm/buf) (+ sexp-len (match-end 0))))
|
||||||
;; clear-up start
|
;; clear-up start
|
||||||
(setq mm/buf (substring mm/buf (match-end 0)))
|
(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))
|
(setq mm/buf (substring mm/buf sexp-len))
|
||||||
(car objcons))))))
|
(car objcons))))))
|
||||||
|
|
||||||
|
|||||||
@ -319,8 +319,8 @@ removing '^M' etc."
|
|||||||
(save-excursion
|
(save-excursion
|
||||||
;; remove the stupid CRs
|
;; remove the stupid CRs
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "[
|
(while (re-search-forward "[\r\240]" nil t)
|
||||||
]" nil t)
|
(replace-match " " nil t))
|
||||||
;; give the footer a different color...
|
;; give the footer a different color...
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(let ((p (search-forward "\n-- \n" nil t)))
|
(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))))
|
(add-text-properties p (point-max) '(face mm/view-footer-face))))
|
||||||
;; this is fairly simplistic...
|
;; this is fairly simplistic...
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(goto-char (point-min))
|
(while (re-search-forward "\\(https?://[-a-zA-Z0-9?_.$%/=+&#@!]*\\)\\>" nil t)
|
||||||
(let ((subst (propertize (match-string-no-properties 0)
|
(let ((subst (propertize (match-string-no-properties 0)
|
||||||
'face 'mm/view-link-face)))
|
'face 'mm/view-link-face)))
|
||||||
(incf num)
|
(incf num)
|
||||||
|
|||||||
Reference in New Issue
Block a user