- (defun define-word ()
- ;; TODO: needs refinement
- (interactive)
- (let ((myword (word-at-point)))
- ;; (message (shell-command-to-string (concat "mw " myword)))))
- (with-current-buffer (current-buffer)
- (save-excursion
- (set-buffer "worddef")
- (erase-buffer)))
- (call-process "mw" nil "worddef" nil myword)
- (with-current-buffer (current-buffer)
- (save-excursion
- (set-buffer "worddef")
- (ansi-color-apply-on-region (point-min) (point-max))))
- (display-buffer-pop-up-window (get-buffer "worddef") '())))
|