Thread: [cedet-semantic] Problems with folding mode
Brought to you by:
zappo
From: Andrei S. <lis...@gm...> - 2012-08-23 14:47:31
|
Hi I am using Emacs GNU Emacs 23.1.50.1 (i386-mingw-nt6.1.7600) of 2009-11-03 on LENNART-69DE564 (patched) with the latest cedet 1.0.1 I have problems with the folding mode using C/C++ language. I can only fold the most upper level blocks at function definition level but I can't fold/unfold inner nested {} blocks like for(){} if(){} etc. I wonder if it's the intended behavior or something goes wrong in my environment. I got following settings in my .emacs file: (load-file "D:/GNU/cl-systems/cedet-1.0.1/common/cedet.el") (global-ede-mode nil) (semantic-load-enable-excessive-code-helpers) (global-semantic-tag-folding-mode 1) (require 'semantic-ia) ; names completion and display of tags (require 'semantic-gcc) ; auto locate system include files (require 'semanticdb) (global-semanticdb-minor-mode 1) ;; if you want to enable support for gnu global (require 'semanticdb-global) (semanticdb-enable-gnu-global-databases 'c-mode) (semanticdb-enable-gnu-global-databases 'c++-mode) Thank you, |
From: Eric M. L. <eri...@gm...> - 2012-08-29 00:33:27
|
Hi Andrei, I went to experiment, and it appears that in our bzr repository, semantic-tag-folding-mode is broken due to changes in the API it depends on. In particular (for those reading the list who might know the answer) semantic-add-minor-mode now takes only 2 arguments, but folding mode was passing in a keymap as a third arg. Does anyone know why the 3rd argument has been removed? This has also revealed the entire contrib directory fails to compile and is currently untested in the build system. I will have a bit of work to do before I can dig into details on this since I'll need to figure out how to get that building again. Perhaps someone on the list using the released version of CEDET knows the answer to this question? Thanks Eric On 08/23/2012 10:47 AM, Andrei Stebakov wrote: > Hi > > I am using Emacs GNU Emacs 23.1.50.1 (i386-mingw-nt6.1.7600) of > 2009-11-03 on LENNART-69DE564 (patched) with the latest cedet 1.0.1 > > I have problems with the folding mode using C/C++ language. I can only > fold the most upper level blocks at function definition level but I > can't fold/unfold inner nested {} blocks like for(){} if(){} etc. > I wonder if it's the intended behavior or something goes wrong in my > environment. > > I got following settings in my .emacs file: > > (load-file "D:/GNU/cl-systems/cedet-1.0.1/common/cedet.el") > (global-ede-mode nil) > (semantic-load-enable-excessive-code-helpers) > (global-semantic-tag-folding-mode 1) > (require 'semantic-ia) ; names completion and display of tags > (require 'semantic-gcc) ; auto locate system include files > (require 'semanticdb) > (global-semanticdb-minor-mode 1) > > > ;; if you want to enable support for gnu global > (require 'semanticdb-global) > (semanticdb-enable-gnu-global-databases 'c-mode) > (semanticdb-enable-gnu-global-databases 'c++-mode) > > Thank you, > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > cedet-semantic mailing list > ced...@li... > https://lists.sourceforge.net/lists/listinfo/cedet-semantic |
From: Balaji V. <bal...@gm...> - 2013-01-05 06:19:36
|
On Fri, Jan 4, 2013 at 7:26 PM, Eric M. Ludlam <er...@si...>wrote: As such, instead of fiddling with your load path, just do: > (load-file "~/path/to/cedet/contrib/cedet-contrib-load.el") > Hi Eric - thanks. I had already done that and things are working fine now. See below regarding tag-folding. > > Eric M. Ludlam writes: >> >> I went to experiment, and it appears that in our bzr repository, >>> semantic-tag-folding-mode is broken due to changes in the API it depends >>> on. >>> >> >> In particular (for those reading the list who might know the answer) >>> semantic-add-minor-mode now takes only 2 arguments, but folding mode was >>> passing in a keymap as a third arg. Does anyone know why the 3rd >>> argument has been removed? >>> >> I'm definitely not an elisp or cedet expert but I wanted to get semantic tag folding working. I'm sure there is a cleaner/better way to do get there but I made the edits below - to get it to a point where it loads and tag folding works (albeit partially - via keymaps but not with the mouse). === modified file 'contrib/semantic-tag-folding.el' *** contrib/semantic-tag-folding.el 2010-09-15 14:21:50 +0000 --- contrib/semantic-tag-folding.el 2013-01-05 01:48:56 +0000 *************** *** 243,248 **** --- 243,249 ---- minor mode can be turned on only if semantic feature is available and the current buffer was set up for parsing. Return non-nil if the minor mode is enabled." + :keymap semantic-tag-folding-mode-map (interactive (list (or current-prefix-arg (if semantic-tag-folding-mode 0 1)))) *************** *** 259,265 **** (if semantic-tag-folding-mode "en" "dis"))) semantic-tag-folding-mode) ! (semantic-add-minor-mode 'semantic-tag-folding-mode "" semantic-tag-folding-mode-map) (define-semantic-decoration-style semantic-tag-folding "Enables folding of tags.") --- 260,266 ---- (if semantic-tag-folding-mode "en" "dis"))) semantic-tag-folding-mode) ! (semantic-add-minor-mode 'semantic-tag-folding-mode "" ) (define-semantic-decoration-style semantic-tag-folding "Enables folding of tags.") Balaji |
From: Eric M. L. <er...@si...> - 2013-01-05 14:48:26
|
Hi Balaji, Thanks for the patch. That was a good start. There were several changes made during the integration w/ Emacs that changed how minor modes work elsewhere, and this mode didn't catch up. I've updated this mode to be more in line with the other semantic modes, and it now works for me, complete with mouse clicking on the little icons, etc. At least for my brief test it does. ;) Enjoy Eric On 01/05/2013 01:19 AM, Balaji Venkataraman wrote: > On Fri, Jan 4, 2013 at 7:26 PM, Eric M. Ludlam <er...@si... > <mailto:er...@si...>> wrote: > > As such, instead of fiddling with your load path, just do: > (load-file "~/path/to/cedet/contrib/cedet-contrib-load.el") > > > Hi Eric - thanks. I had already done that and things are working fine > now. See below regarding tag-folding. > > > Eric M. Ludlam writes: > > I went to experiment, and it appears that in our bzr repository, > semantic-tag-folding-mode is broken due to changes in the > API it depends on. > > > In particular (for those reading the list who might know the > answer) > semantic-add-minor-mode now takes only 2 arguments, but > folding mode was > passing in a keymap as a third arg. Does anyone know why > the 3rd > argument has been removed? > > > I'm definitely not an elisp or cedet expert but I wanted to get semantic > tag folding working. I'm sure there is a cleaner/better way to do get > there but I made the edits below - to get it to a point where it loads > and tag folding works (albeit partially - via keymaps but not with the > mouse). > > === modified file 'contrib/semantic-tag-folding.el' > *** contrib/semantic-tag-folding.el 2010-09-15 14:21:50 +0000 > --- contrib/semantic-tag-folding.el 2013-01-05 01:48:56 +0000 > *************** > *** 243,248 **** > --- 243,249 ---- > minor mode can be turned on only if semantic feature is available and > the current buffer was set up for parsing. Return non-nil if the > minor mode is enabled." > + :keymap semantic-tag-folding-mode-map > (interactive > (list (or current-prefix-arg > (if semantic-tag-folding-mode 0 1)))) > *************** > *** 259,265 **** > (if semantic-tag-folding-mode "en" "dis"))) > semantic-tag-folding-mode) > > ! (semantic-add-minor-mode 'semantic-tag-folding-mode "" > semantic-tag-folding-mode-map) > > > (define-semantic-decoration-style semantic-tag-folding "Enables > folding of tags.") > --- 260,266 ---- > (if semantic-tag-folding-mode "en" "dis"))) > semantic-tag-folding-mode) > > ! (semantic-add-minor-mode 'semantic-tag-folding-mode "" ) > > > (define-semantic-decoration-style semantic-tag-folding "Enables > folding of tags.") > > Balaji > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122912 > > > > _______________________________________________ > cedet-semantic mailing list > ced...@li... > https://lists.sourceforge.net/lists/listinfo/cedet-semantic |