Приветствую,
Сделал себе новый шаблон приветствия при ответе, подскажите
начинающему elisp'еру, нет ли тут ошибок?
(pushnew '(sc-header-hello-attributed-writes) sc-rewrite-header-list)
(defun sc-header-hello-attributed-writes ()
(let ((sc-mumble "??")
(from-name (eval '(get-name-from-address (sc-whofrom))))
(to-name (eval '(get-name-from-address (sc-mail-field "to"))))
(from-attrib (eval '(sc-hdr "(" (sc-mail-field "sc-attribution")
")"))))
(insert "On " (sc-mail-field "date") ",\n " from-name
from-attrib " wrote")
(if to-name
(if (string-match user-full-name to-name)
(insert " to me"))
(insert " to " to-name))
(insert ":\n")
)
)
(defun get-name-from-address (from)
(if (string-match " *<.*> *" from)
(concat (substring from 0 (match-beginning 0)) (substring from
(match-end 0)))
(if (string-match "\(.*\)" from)
(substring from (+ (match-beginning 0) 1) (- (match-end 0) 1))
from
nil
)
)
)
И еще вопрос как проверить что значения 2х переменных равны, в данном
случае я пробовал использовать функцию eq и equal, но почему-то она
сообщается об ошибке Wrong type argument: char-or-string-p, nil
--
Denis.
Обнаружен драйвер. Вставьте устройство.
Show replies by date