>>261
こんな感じにしてみました。
ツッコミあったらよろしくお願いします。

(defun dec-to-hex-or-hex-to-dec (num)
"10進数->16進数, 16進数->10進数"
(interactive "sNum?: ")
(if (string-match "0x" num)
;; 16進数->10進数
(message "%s is %d." num (read (concat "?\\x" (car (split-string num "0x")))))
;; 10進数->16進数
(let ((int (string-to-int num)))
(message "%d is 0x%x." int int))))