help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Output in Emacs


From: Barry Margolin
Subject: Re: Output in Emacs
Date: Mon, 03 Nov 2003 22:25:31 GMT

In article <address@hidden>,
Johannes Quint  <address@hidden> wrote:
>and how to READ the contents of a buffer-line and then apply a function 
>to it?

(defun apply-function-to-current-line (func)
  (let ((string
          (save-excursion
            (beginning-of-line)
            (let ((start (point)))
              (end-of-line)
              (buffer-substring start (point))))))
    (funcall func string)))

-- 
Barry Margolin, address@hidden
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]