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

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

elisp problem


From: hans nieuwenhuizen
Subject: elisp problem
Date: Mon, 18 Mar 2002 19:28:14 +0100

Dear Sirs,

I have a simple problem for which I find no solution in
elisp-manual-20-2.5, nor in O'Reilly's:


I want to do simple arithmatics on variables, read from the emacs buffer. 

Since elisps `setq` does not accept a string for input, I need to convert
it to a number seperately.

The elisp-manual-20.2.5 does mention codes for such a conversion in
elisp-5.gz, but no more than that. I use Cameron ( Learning GNU Emacs ) and
Glickstein ( Writing GNU Emacs Extensions). The only reference in these 2
is in Cameron's example calculator mode, pp 383 ( number-to-string ) and
384 ( string-to-number ) but my Emacs 20.7 from SuSE Linux professional 7.0
does not contain it.  I have 'grepped' all .el files and found a few uses
of string-to-number and its counterpart number-to-string in directory
site-lisp, but no `(defun ... )`. Also a `define-function` for conversion
of the functions to ( or from ? ) `string-to-int`, which the manual flags
as obsolete. 

Building my own is relatively simple, but I don't like to run a private
version of a function which should be, and apparently is, part of the
release. Moreover I do not understand why the makers of Emacs do so
mysterious about such basic and very simple functions. Even (
define-function f1 f2 ) is not included in my version of 20.7. 

Can you please explain why they do that and advise me how to obtain the
official version of int-to|from-string routine?

Thanks very much.

Nieuwenhuizen
2002-03-18
    
-----------------------------------------------------------------------
Prof. ir. J.K. Nieuwenhuizen            email: j.k.nieuwenhuizen@tue.nl

dom Paul Bellotweg 8                             5624 KZ Eindhoven - NL
          Tel: [{ xx31 | 0 } 40 ] { 2442226 | 2960052 | 2962076 }
-----------------------------------------------------------------------

         



reply via email to

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