Emacs23 This should be simple for many of you. I am trying to develop a function that searches a word definition stored in a dict file. As you can see, when reading a text, you might need to look for additional information about the encountered word. The following function searches the information for the word in the region. (defvar sfl-dictionary-directory "~/Dropbox/ElmLab/dict") (defvar sfl-base-dict-file "test5.txt") (defun sfl-search-word-meaning () (interactive) (let ((word (buffer-substring (region-beginning) (region-end))) (result)) (with-current-buffer (find-file (concat sfl-dictionary-directory "/" sfl-base-dict-file)) (goto-char (point-min)) (search-forward word) (set-marker (make-marker) (beginning-of-line)) (goto-char (end-of-line)) (setq result (buffer-substring (region-beginning) (region-end))) (message result)))) But this gives an error save-current-buffer: Wrong type argument: integer-or-marker-p, nil It looks like (set-marker ... part is doing something wrong. Could anyone point out the mistake I am making? soichi