Calc with Emacs: Too few elements on stack...

2005-09-01 Thread luca . spinacci
I've installed Calc by Dave Gillespie version 2.02f on my GNU Emacs 21.3.1 I launch Calc using M-# c but I can't insert any operand on the stack: so any calculation give sthe error "Too few elements on the stack" Any ideas? Thanks in advance. Luca. _

Argument-list in function with variable number of arguments...

2005-05-20 Thread luca . spinacci
Is there a way to have a variable number of arguments in a function argument-list? I know how to write a function in which a fixed number of arguments is expected for ex. ( defun my-function ( first second ) (interactive "sFirst : \nsSecond : ") (insert ""first"\n" ""second"

Replacing ocurrences of a string...

2005-05-13 Thread luca . spinacci
I generate a C function template in a buffer running a command. I would like to replace every occurence of the string on direct request. Let's say: M-x my-template-generator generates in my - C - buffer a template like /* ** * ** void () { } // I wou

Different behaviour between M-x replace-regexp in function and in echo window

2005-04-21 Thread luca . spinacci
If I use M-x replace-regexp followed by "\(//\)[[:space:]] *" "\1 " the behaviour is correct - replacing any space between '//' ed comment text Ex. //___Text... => //_Text... where '_' is a space If I use the same replace-regexp "\(//\)[[:space:]] *" "\1 " in a function no replacing is done - R

Formatting comment lines (C code)

2005-04-20 Thread luca . spinacci
I would like to format my comment lines replacing all spaces and tabs between '//' and the comment text with only one space. Ex. //Text => //_Text where '_' is a space. I use replace-regexp "[^ a-zA-Z0-9/\.]" " " on a selection of my code but it doesn't work very well because replaces ch

Inserting spaces after/before braces...

2005-04-19 Thread luca . spinacci
I wrote a function to insert a space after an open brace and before a close brace in a selection. I would like it to work better skipping those occurences where I already have a space before or after the brace. (defun brace-and-space(start end) (interactive "*r") (save-excursion (save-rest

Substiotution of tabs with spaces...

2005-04-15 Thread luca . spinacci
Hi, is there a smart way to replace all tabs with 3 spaces in a buffer edited in c-mode (both comments and code lines) Thank you very much. ___ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Setting comment-indent-function value

2005-04-13 Thread luca . spinacci
I'm using Emacs 21.3.1 (i386-mingw-nt5.0.2195) of 2004-03-10 on NYAUMO. I would like to set the value c++-comment-indent for comment-indent-function in c++-mode but opening a c/c++ file/buffer the above value is c-comment-indent locally to that buffer and globally c++-comment-indent (...used (set

(no subject)

2005-04-12 Thread luca . spinacci
I'm using Emacs 21.3.1 (i386-mingw-nt5.0.2195) of 2004-03-10 on NYAUMO. I would like to set the value c++-comment-indent for comment-indent-function in c++-mode but opening a c/c++ file/buffer the above value is c-comment-indent locally to that buffer and globally c++-comment-indent (...used (set