Re: XEmacs - how to automate mark-search-cut
* Tyler Smith <tyler.smith@mail.mcgill.ca> [070527 00:00]:
...
> One note - I had to turn off transient-mark-mode to get this to
> work. I don't know why. If you like to use transient mark mode you'll
> have to turn it back on afterwards.
>
> Here's the code, hope it helps!
>
> Tyler
>
> (defun extract-footnotes ()
> "Copy all footnotes to a separate *FOOTNOTES* buffer"
> (interactive)
> (let ((active-buffer (current-buffer)))
> (save-excursion
> (if (memq (get-buffer "*FOOTNOTES*") (buffer-list))
> (kill-buffer "*FOOTNOTES*"))
> (transient-mark-mode -1)
> (goto-char (point-min))
> (while (search-forward "\\footnote" nil t)
> (goto-char (match-beginning 0))
> (push-mark)
> (search-forward "e" nil t)
> (forward-list)
> (append-to-buffer (get-buffer-create "*FOOTNOTES*")
> (mark) (point))
> (set-buffer "*FOOTNOTES*")
> (goto-char (point-max))
> (insert "\n")
> (set-buffer active-buffer)))))
>
The function produces the error message:
Symbol's function definition is void: transient-mark-mode
Perhaps I should use Emacs rather than in XEmacs for this task.
RLH
Reply to: