* Re: Task reschedule [not found] ` <aiqipm$jre$1@rdel.co.uk> @ 2002-08-14 3:19 ` Randy Brukardt 2002-08-14 3:40 ` Emacs new Ada mode refuses to highlight comments Eric Merritt 0 siblings, 1 reply; 9+ messages in thread From: Randy Brukardt @ 2002-08-14 3:19 UTC (permalink / raw) Gruntfuggly wrote in message ... >tmoran@acm.org wrote: >> The "delay 0.0;" may mean "This task is in a cyclic or polling loop >> that doesn't need short latency, so I'd like to give other tasks in the >> system a chance to run". Given that you don't know what other tasks may >> exist, how can you code that with a rendezvous? >> IIRC, a couple of years ago I measured Apex/W2k and found that >> "delay 0.0;" took 10 ms (1 clock tick). I'd be curious about your >> results compiling and running the timetest program at >> www.adapower.com/reuse/tt.html >If I read that correctly, it does look like the delay 0.0 is ignored... Yes, you read that correctly. What Tom didn't tell you is that the reason that he wrote Timetest was because of a Claw customer whose program ran unreasonably slow. We traced the problem to the delays in the Claw server task (which unfortunately has to poll Windows for messages). The "solution" to the problem in Claw was a Rational-specific patch: use a Windows "Sleep(0)" API call instead of delay 0.0;. This provided correct performance. Perhaps a similar solution would work on Solaris?? (The Claw server task uses a "ladder" of delays to provide quick response when messages are coming in rapidly, yet avoid hogging the CPU when nothing is happening. It's possible to write a program which gets lousy GUI performance by causing operations to occur at just under the frequency of the first real delay, but that rarely happens in practice. Note that a GUI is certainly not a real-time application, but you don't want any single task to hog all of the CPU - especially as that might hog the GUI locks as well.) Randy. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Emacs new Ada mode refuses to highlight comments 2002-08-14 3:19 ` Task reschedule Randy Brukardt @ 2002-08-14 3:40 ` Eric Merritt 2002-08-14 9:18 ` John McCabe 0 siblings, 1 reply; 9+ messages in thread From: Eric Merritt @ 2002-08-14 3:40 UTC (permalink / raw) Hello All, I recently installed adamode 3.6 (the newest version) and now suddenly comments are no longer highlighted. In fact, keywords are highlighted within the comments. This is very, very annoying to me. Have any of you encountered a similar problem? I am running emacs 21.2.1 on linux (redhat 7.3). Version 3.5 of the ada-mode ran just fine so this is a bit wierd. I am no emacs wizard so I have not been able to figure it out. Also there do not seem to be any references to the problem in this group or the net in general so I really hope one of you guys have an idea as to what this is. Thanks for you time, Eric __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs new Ada mode refuses to highlight comments 2002-08-14 3:40 ` Emacs new Ada mode refuses to highlight comments Eric Merritt @ 2002-08-14 9:18 ` John McCabe 2002-08-14 14:02 ` Eric Merritt 0 siblings, 1 reply; 9+ messages in thread From: John McCabe @ 2002-08-14 9:18 UTC (permalink / raw) On Tue, 13 Aug 2002 20:40:31 -0700 (PDT), Eric Merritt <cyberlync@yahoo.com> wrote: >Hello All, > > I recently installed adamode 3.6 (the newest version) >and now suddenly comments are no longer highlighted. >In fact, keywords are highlighted within the comments. >This is very, very annoying to me. Have any of you >encountered a similar problem? No. In response to your message I have just added the latest version of ada-mode to my Windows system, and comments look fine to me. Can you supply a piece of source (Ada) code where this problem is apparent? It may also be worth supplying your .emacs file. Thanks ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs new Ada mode refuses to highlight comments 2002-08-14 9:18 ` John McCabe @ 2002-08-14 14:02 ` Eric Merritt 2002-08-14 15:58 ` John McCabe 0 siblings, 1 reply; 9+ messages in thread From: Eric Merritt @ 2002-08-14 14:02 UTC (permalink / raw) John, See inline, and thanks for your help. --- John McCabe <john.nospam@nospamassen.nospamdemon.co.uk> wrote: > On Tue, 13 Aug 2002 20:40:31 -0700 (PDT), Eric > Merritt > <cyberlync@yahoo.com> wrote: > > >Hello All, > > > > I recently installed adamode 3.6 (the newest > version) > >and now suddenly comments are no longer > highlighted. > >In fact, keywords are highlighted within the > comments. > >This is very, very annoying to me. Have any of you > >encountered a similar problem? > > No. In response to your message I have just added > the latest version > of ada-mode to my Windows system, and comments look > fine to me. > > Can you supply a piece of source (Ada) code where > this problem is > apparent? sure its really any code. be here is a small snippit that doesnt work -- -- Test comment, with keywords like and or if then -- end use package. -- package Test is end Test; > It may also be worth supplying your .emacs file. > ------------------------------------------------------ .emacs file ------------------------------------------------------ ;; Red Hat Linux default .emacs initialization file ;; Are we running XEmacs or Emacs? (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) ;; Set up the keyboard so the delete key on ;; both the regular keyboard ;; and the keypad delete the character under the ;; cursor and to the right ;; under X, instead of the default, backspace ;; behavior. (global-set-key [delete] 'delete-char) (global-set-key [kp-delete] 'delete-char) ;; Turn on font-lock mode for Emacs (cond ((not running-xemacs) (global-font-lock-mode t) )) ;; Always end a file with a newline (setq require-final-newline t) ;; Stop at the end of the file, not just add lines (setq next-line-add-newlines nil) ;; Enable wheelmouse support by default (if (not running-xemacs) (require 'mwheel) ; Emacs (mwheel-install) ; XEmacs ) (require 'ada-mode) (add-hook 'find-file-hooks 'turn-on-font-lock-if-enabled) __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs new Ada mode refuses to highlight comments 2002-08-14 14:02 ` Eric Merritt @ 2002-08-14 15:58 ` John McCabe 2002-08-14 16:51 ` Eric Merritt 0 siblings, 1 reply; 9+ messages in thread From: John McCabe @ 2002-08-14 15:58 UTC (permalink / raw) On Wed, 14 Aug 2002 07:02:52 -0700 (PDT), Eric Merritt <cyberlync@yahoo.com> wrote: > See inline Thanks. >and thanks for your help. We'll see :-) Now a question, in your message buffer do you see: "File mode specification error: (void-variable which-func-modes)" ? Using your .emacs, that is what I get in my modeline (you might see it in your modeline as well, but it should be copied into the Messages buffer too), and the comments are as you describe. To cure it you need to do: M-x customize-option<ret> which-function-mode<ret> Click on the "Toggle" button to make it "on (non-nil)" and then on the "Save for future sessions" button. I think that should work. Hope it does. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs new Ada mode refuses to highlight comments 2002-08-14 15:58 ` John McCabe @ 2002-08-14 16:51 ` Eric Merritt 2002-08-14 23:40 ` John McCabe 0 siblings, 1 reply; 9+ messages in thread From: Eric Merritt @ 2002-08-14 16:51 UTC (permalink / raw) John, Thanks so much, I must be an idiot for missing that one. That fixed the problem. If you have the time could you explain what the actual problem was? I am afraid that although I am fairly proficient at using emacs, I am not so proficient at admining it. Thanks again! Eric --- John McCabe <john.nospam@nospamassen.nospamdemon.co.uk> wrote: > On Wed, 14 Aug 2002 07:02:52 -0700 (PDT), Eric > Merritt > <cyberlync@yahoo.com> wrote: > > > See inline > > Thanks. > > >and thanks for your help. > > We'll see :-) > > Now a question, in your message buffer do you see: > > "File mode specification error: (void-variable > which-func-modes)" > ? > > Using your .emacs, that is what I get in my modeline > (you might see it > in your modeline as well, but it should be copied > into the Messages > buffer too), and the comments are as you describe. > > To cure it you need to do: > > M-x customize-option<ret> > which-function-mode<ret> > > Click on the "Toggle" button to make it "on > (non-nil)" and then on the > "Save for future sessions" button. > > I think that should work. > > Hope it does. > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs new Ada mode refuses to highlight comments 2002-08-14 16:51 ` Eric Merritt @ 2002-08-14 23:40 ` John McCabe 2002-08-15 19:08 ` Simon Wright 0 siblings, 1 reply; 9+ messages in thread From: John McCabe @ 2002-08-14 23:40 UTC (permalink / raw) Eric Merritt <cyberlync@yahoo.com> wrote: >Thanks so much, I must be an idiot for missing that >one. I'd rather not say :-) The thing is, if you don't look at the minibuffer when you're loading files you would probably never notice it - I've just got into the habit of it I think because I mess around a bit with ELisp stuff now and again. In fact, the first time I loaded one of my Ada files I spotted that problem and didn't notice anything bing screwy with the highlighting! > That fixed the problem. If you have the time >could you explain what the actual problem was? I am >afraid that although I am fairly proficient at using >emacs, I am not so proficient at admining it. The problem appears to be in the line (line 1326): (if (listp which-func-modes) (add-to-list 'which-func-modes 'ada-mode)) in ada-mode.el. Despite the earlier comment: ;; This function do not require that we load which-func now. ;; This can be done by the user if he decides to use which-func-mode this doesn't seem to be the case! Having looked a bit closer, putting: (require 'which-func) before any ada-mode stuff in your .emacs would be adequate without switching on which-function-mode (you'd obviously lose that nice feature, but as you never had it anyway...), but switching which-function-mode on probably does that job anyway. However I would suggest this is a bug, as changing the above line from: (if (listp which-func-modes) (add-to-list 'which-func-modes 'ada-mode)) to: (if (boundp 'which-func-modes) (if (listp which-func-modes) (add-to-list 'which-func-modes 'ada-mode))) Appears to work. Best Regards John McCabe <john@assen.demon.co.uk> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs new Ada mode refuses to highlight comments 2002-08-14 23:40 ` John McCabe @ 2002-08-15 19:08 ` Simon Wright 2002-08-16 8:09 ` John McCabe 0 siblings, 1 reply; 9+ messages in thread From: Simon Wright @ 2002-08-15 19:08 UTC (permalink / raw) john@nospam.assen.demon.co.uk.nospam (John McCabe) writes: > However I would suggest this is a bug, as changing the above line > from: > > (if (listp which-func-modes) > (add-to-list 'which-func-modes 'ada-mode)) > > to: > > (if (boundp 'which-func-modes) > (if (listp which-func-modes) > (add-to-list 'which-func-modes 'ada-mode))) This is very like the fix in the supported version (3.15a here): (if (and (boundp 'which-func-modes) (listp which-func-modes)) (add-to-list 'which-func-modes 'ada-mode)) ) ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs new Ada mode refuses to highlight comments 2002-08-15 19:08 ` Simon Wright @ 2002-08-16 8:09 ` John McCabe 0 siblings, 0 replies; 9+ messages in thread From: John McCabe @ 2002-08-16 8:09 UTC (permalink / raw) On 15 Aug 2002 20:08:13 +0100, Simon Wright <simon@pushface.org> wrote: >john@nospam.assen.demon.co.uk.nospam (John McCabe) writes: > >> However I would suggest this is a bug, as changing the above line >> from: >> >> (if (listp which-func-modes) >> (add-to-list 'which-func-modes 'ada-mode)) >> >> to: >> >> (if (boundp 'which-func-modes) >> (if (listp which-func-modes) >> (add-to-list 'which-func-modes 'ada-mode))) > >This is very like the fix in the supported version (3.15a here): > > (if (and (boundp 'which-func-modes) > (listp which-func-modes)) > (add-to-list 'which-func-modes 'ada-mode)) > ) Pity I didn't think to use the "and" function instead of nested "if"s. It's been a long time since I did any elisp programming :-) ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-08-16 8:09 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <ur8hcdl53.fsf@gsfc.nasa.gov> [not found] ` <YlT39.326$_R5.28416290@newssvr13.news.prodigy.com> [not found] ` <aiqipm$jre$1@rdel.co.uk> 2002-08-14 3:19 ` Task reschedule Randy Brukardt 2002-08-14 3:40 ` Emacs new Ada mode refuses to highlight comments Eric Merritt 2002-08-14 9:18 ` John McCabe 2002-08-14 14:02 ` Eric Merritt 2002-08-14 15:58 ` John McCabe 2002-08-14 16:51 ` Eric Merritt 2002-08-14 23:40 ` John McCabe 2002-08-15 19:08 ` Simon Wright 2002-08-16 8:09 ` John McCabe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox