Picon

customize-save-variable-save not present in emacs 21.3 -- what is it?

Hi,

Just for the heck of it I wanted to lisp some ecb options, even though
they're not (the ones I was mostly interested in) on the list of
don't-use-setq, I wanted to use the customize-save-variable-save
feature, mentioned in the docs.  But it isn't part of emacs 21.2 or
21.3 so I'm wondering where it comes from (I'm guessing xemacs) and if
I use the defun in the docs, whether it'll be compatible with both of
'em?

In hope it isn't of of them faqs,

Johann

--

-- 
Microsoft? Never heard of 'em.

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Berndl, Klaus | 2 Feb 2004 09:20
Picon

RE: customize-save-variable-save not present in emacs 21.3 -- what is it?

Johann "Myrkraverk" Oskarsson wrote:
> Hi,
> 
> Just for the heck of it I wanted to lisp some ecb options, even though
> they're not (the ones I was mostly interested in) on the list of
> don't-use-setq, I wanted to use the customize-save-variable-save
> feature, mentioned in the docs.  But it isn't part of emacs 21.2 or
> 21.3 so I'm wondering where it comes from (I'm guessing xemacs) and if
> I use the defun in the docs, whether it'll be compatible with both of
> 'em?
> 
> In hope it isn't of of them faqs,

Not in the faqs but in the manual - and if i remember right at the place you
looked already ;-)

Here is the code:

   (defun customize-option-get-value (option type)
     "Return the value of a customizable option OPTION with TYPE, where TYPE
   can either be 'standard-value \(the default-value of the defcustom) or
   'saved-value \(the value stored durable by the user via customize)."
     (let ((val (car (get option type))))
       (cond ((not (listp val)) val)
             ((equal 'quote (car val)) (car (cdr val)))
             (t (car val)))))

   (defun customize-save-variable-save (option value &optional override)
     "Calls `customize-save-variable' with OPTION and VALUE if OPTION is a
   custom-type and if OPTION has no saved-value until now.
(Continue reading)

Picon

RE: customize-save-variable-save not present in emacs 21.3 -- what is it?

Hi,

Berndl, Klaus writes:

[...]

 > And this code is completely copied from the manual of current
 > ECB. The manual says that you need this functions - this means you
 > have to code them, which means copy the code from the manual to the
 > .emacs or site-lisp.el. maybe i should describe what exactly to do
 > in more detail?!

Yes, it would have been a little clearer that way, I eventually did
just that, copied the stuff to my dot emacs, like so:

(if (not (fboundp 'customize-save-variable-save))
   (defun customize-save-variable-save (option value &optional
					       override)
     ...

(if (not (fboundp 'customize-option-get-value))
   (defun customize-option-get-value (option type)
     ...

Now, just a little Q:

I have the following in my .emacs:

(cond
 (window-system
(Continue reading)

Berndl, Klaus | 2 Feb 2004 13:27
Picon

ECB 2.20 released!

                              ECB 2.20 is released!

********************************************************************************
There is no restriction to max. 2 edit-windows. Now you can split the
edit-area in as many edit-windows as you like and need! Neither the ecb-windows
nor the compile-window will be deleted when you call C-x 1 in an edit-window!
The split-state of the edit-area will be fully preserved when hidding or showing
the ecb-windows!
********************************************************************************


What's new in the new release:
------------------------------

* Changes for ECB version 2.20

** New customization group "ecb-most-important"
   This group centralizes the most important options of ECB in one group which
   is also offered by the "Preferences" submenu ob the ECB-menu. These are
   options you should at least know that they exist.

** The keybinding for the online-help has changed from [C-c . o] to [C-c . h]
   This has been done because the key [C-c . o] is needed for the new command
   `ecb-toggle-scroll-other-window-scrolls-compile'.

** The options `ecb-major-modes-activate' and `ecb-majors-mode-deactivate' have
   been replaced by one new option `ecb-major-modes-show-or-hide'. The purpose
   of the old option is now quite out-of-date because:
   - ECB supports window-managers like winring.el or escreen.el very well,
   - as of version 2.20 ECB has no restrictions about the number of
(Continue reading)

Berndl, Klaus | 2 Feb 2004 14:08
Picon

ECB 2.20 released!

                              ECB 2.20 is released!

********************************************************************************
There is no restriction to max. 2 edit-windows. Now you can split the
edit-area in as many edit-windows as you like and need! Neither the ecb-windows
nor the compile-window will be deleted when you call C-x 1 in an edit-window!
The split-state of the edit-area will be fully preserved when hidding or showing
the ecb-windows!
********************************************************************************


What's new in the new release:
------------------------------

* Changes for ECB version 2.20

** New customization group "ecb-most-important"
   This group centralizes the most important options of ECB in one group which
   is also offered by the "Preferences" submenu ob the ECB-menu. These are
   options you should at least know that they exist.

** The keybinding for the online-help has changed from [C-c . o] to [C-c . h]
   This has been done because the key [C-c . o] is needed for the new command
   `ecb-toggle-scroll-other-window-scrolls-compile'.

** The options `ecb-major-modes-activate' and `ecb-majors-mode-deactivate' have
   been replaced by one new option `ecb-major-modes-show-or-hide'. The purpose
   of the old option is now quite out-of-date because:
   - ECB supports window-managers like winring.el or escreen.el very well,
   - as of version 2.20 ECB has no restrictions about the number of
(Continue reading)

Berndl, Klaus | 2 Feb 2004 16:18
Picon

RE: customize-save-variable-save not present in emacs 21.3 -- what is it?

Johann "Myrkraverk" Oskarsson wrote:
> Hi,
> 
> Berndl, Klaus writes:
> 
> [...]
> 
>  > And this code is completely copied from the manual of current
>  > ECB. The manual says that you need this functions - this means you
>  > have to code them, which means copy the code from the manual to the
>  > .emacs or site-lisp.el. maybe i should describe what exactly to do
>  > in more detail?!
> 
> Yes, it would have been a little clearer that way,

Done - at least i hope so ;-)

>I eventually did
> just that, copied the stuff to my dot emacs, like so:
> 
> (if (not (fboundp 'customize-save-variable-save))
>    (defun customize-save-variable-save (option value &optional
> 					       override)
>      ...
> 
> (if (not (fboundp 'customize-option-get-value))
>    (defun customize-option-get-value (option type)
>      ...
> 
> Now, just a little Q:
(Continue reading)

Berndl, Klaus | 2 Feb 2004 16:28
Picon

RE: customize-save-variable-save not present in emacs 21.3 -- what is it?

Berndl, Klaus wrote:
> Johann "Myrkraverk" Oskarsson wrote:
>> Hi,
>> 
>> Berndl, Klaus writes:
>> 
>> [...]
>> 
>> some funky stuff to happen.
> 
> You can do the following:
> 
> Put that into your site-start.el - at the beginning i would suggest:
> 
>  (cond
>   (window-system
>    (setq custom-file "~/.x-custom.el"))
> 
>   ((not window-system)
>    (setq custom-file "~/.c-custom.el")))
> 
> Then put that into your .emacs:
> 
>  (cond
>   (window-system
>    (load-library "~/.x-custom"))
> 
>   ((not window-system)
>    (load-library "~/.c-custom")))

(Continue reading)

Eric M. Ludlam | 2 Feb 2004 19:21
Gravatar

ECB-2.20 --


Howdy,

  After starting a new ECB, I've found a curious behavior in C++ code.
With the cursor in the method, it will highlight the right method in
the methods buffer.  If I move the cursor onto the text of a method
argument, the re centering goes to the beginning of the methods buffer.

  This is because the arguments have a tag overlay.  ECB should be
smart enough to get the parent tag, and highlight that one.

Enjoy
Eric

Emacs  : GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2004-01-22 on projectile
Package: ECB: 2.20, semantic: 2.0beta1, eieio: 0.18beta1, speedbar: 0.15beta1, JDEE: No JDEE

current state:
==============
(setq
 after-save-hook '(ecb-update-methods-after-saving)
 auto-mode-alist '(("Makefile\\.[a-zA-Z0-9]+$" . makefile-mode)
		   ("\\.fvwm2?rc$" \.fvwm-mode)
		   ("\\.Xdefaults$\\|/app-defaults/" \.xdefaults-mode)
		   ("\\.m$" . matlab-mode) ("\\.wy$" . wisent-grammar-mode)
		   ("\\.by$" . bovine-grammar-mode)
		   ("Project\\.ede" . emacs-lisp-mode)
		   ("\\.mixal\\'" . mixal-mode) ("\\.lds" . ld-script-mode)
		   ("/\\.gdbinit" . gdb-script-mode)
(Continue reading)

Berndl, Klaus | 3 Feb 2004 08:22
Picon

RE: ECB-2.20 --

Hi Eric,

Eric M. Ludlam wrote:
> Howdy,
> 
>   After starting a new ECB, I've found a curious behavior in C++ code.
> With the cursor in the method, it will highlight the right method in
> the methods buffer.  If I move the cursor onto the text of a method
> argument, the re centering goes to the beginning of the methods
> buffer. 
> 
>   This is because the arguments have a tag overlay.  ECB should be
> smart enough to get the parent tag, and highlight that one.

Of course should ECB smart enough ;-)
Thanks for reporting this - i have already tested it and i can reproduce
it (i had no doubt that you are right ;-)...

Ok, one question:
This is what (semantic-current-nonterminal) returns when point
stays on an argument of a function:

("arg1" variable (:type "int") (reparse-symbol arg-sub-list)
 #<overlay from 851 to 860 in klaus.cc>)

This is what is returned when point stays on a normal variable:

("intVariable" variable (:type "int") nil
 #<overlay from 890 to 906 in klaus.cc>)

(Continue reading)

Eric M. Ludlam | 3 Feb 2004 13:16
Gravatar

Re[2]: [Ecb-list] ECB-2.20 --

Hi Klaus,

  If you use `semantic-find-tag-by-overlay', you get a stack of tags,
with the function argument last.  (Also
semantic-find-nonterminal-by-overlay)

  You probably want code like this:

 (let* ((tagstack (reverse (semantic-find-nonterminal-by-overlay (point))))
        (current (car tagstack))
        (next (car (cdr tagstack)))
       )
    (if (and (semantic-tag-of-class-p current 'variable)
    	     (semantic-tag-of-class-p next 'function)
	     (member current (semantic-tag-function-arguments next)))
        (setq current next))
    current)

  You can probably use this tag stack for other heuristics as well.

Eric

>>> "Berndl, Klaus" <klaus.berndl <at> sdm.de> seems to think that:
>Hi Eric,
>
>Eric M. Ludlam wrote:
>> Howdy,
>> 
>>   After starting a new ECB, I've found a curious behavior in C++ code.
>> With the cursor in the method, it will highlight the right method in
(Continue reading)


Gmane