Ar an t-aonú lá déag de mí Deireadh Fómhair, scríobh Aidan Kehoe:
[...]
(defun protein-weight-region (start end &optional buffer)
[...]
Actually, here’s a version of that last function that’s much closer to what
you asked for:
(defun protein-weight-region (start end &optional buffer)
(interactive "r")
(let ((weight
(protein-weight-string (replace-in-string
(buffer-substring start end buffer)
"[^A-Z]" ""))))
(delete-region start end buffer)
(goto-char start)
(insert (format "%S\n" weight))
(message "Protein weight is %S" weight)
weight))
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta