Function: gnus-search-imap-handle-string

gnus-search-imap-handle-string is a byte-compiled function defined in gnus-search.el.gz.

Signature

(gnus-search-imap-handle-string ARG0 ARG &rest ARGS)

Implementations

((engine gnus-search-imap) (str string)) in `gnus-search.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-search.el.gz
(cl-defmethod gnus-search-imap-handle-string ((engine gnus-search-imap)
					      (str string))
  (with-slots (literal-plus) engine
    (if (multibyte-string-p str)
	;; If LITERAL+ is available, use it and encode string as
	;; UTF-8.
	(if literal-plus
	    (format "{%d+}\n%s"
		    (string-bytes str)
		    (encode-coding-string str 'utf-8))
	  ;; Otherwise, if the user hasn't already quoted the string,
	  ;; quote it for them.
	  (if (string-prefix-p "\"" str)
	      str
	    (format "\"%s\"" str)))
      str)))