Re: Determine object passed as argument

[email protected]
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
Heime <[email protected]> writes:

> ----------------------------------------------------------------
> Can a function determine the object being passed as argument and 
> print its name.  For instance that I passed if I pass fpln when
> calling (lana-du-fpln 'fpln).
>
> (defun lana-du-fpln (datenstruk &optional bname)
>

  (defun lana-du-fpln (datenstruk &optional bname)
    (symbol-name datenstruk))

  (lana-du-fpln 'fpln)
  => "fpln"

Or,

  (defun lana-du-fpln (datenstruk &optional bname)
    (format "Name of symbol: %s" (symbol-name datenstruk)))

  (lana-du-fpln 'fpln)
  => "Name of symbol: fpln"

-- 
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.