[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ada-mode list references prefix arg (to append references) broken
From: |
Philippe Waroquiers |
Subject: |
ada-mode list references prefix arg (to append references) broken |
Date: |
Thu, 9 Aug 2007 12:35:05 +0200 (METDST) |
How to reproduce:
compile an Ada file with gcc gnat compiler
open this Ada file
position on an identifier
C-c l (list local references)
position on another identifier
C-u C-c l (list local references, but asking to add to the ref list
by using the C-u prefix argument)
with emacs 21: the second list of references is appended
with emacs 22: the second list of references replaces instead of appending
To fix the bug:
Add the below function in front of ada-find-any-references:
***********************************************************
(defun gnatfind-buffer-name (mode)
"Returns the name of the buffer to list Ada references"
"*gnatfind*")
Replace the end of ada-find-any-references by:
**********************************************
(let ((compilation-error "reference"))
(compilation-start command 'compilation-mode 'gnatfind-buffer-name))
;; Hide the "Compilation" menu
(save-excursion
(set-buffer "*gnatfind*")
(local-unset-key [menu-bar compilation-menu])
(if old-contents
(progn
(goto-char 1)
(set 'buffer-read-only nil)
(insert old-contents)
(set 'buffer-read-only t)
(goto-char (point-max)))))
)
)
In GNU Emacs 22.1.1 (hppa1.1-hp-hpux11.11, Motif Version 2.1.0)
of 2007-08-04 on bobcat
Windowing system distributor `Hewlett-Packard Company', version 11.0.600000
configured using `configure 'hppa1.1-hp-hpux11.11'
'--prefix=/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated'
'--exec-prefix=/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/libexec/emacs-22.1'
'--mandir=/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/man'
'--with-gcc=no' '--with-xpm' '--with-x11r6' '--with-x-toolkit=motif'
'--x-libraries=/usr/lib/X11R6:/usr/contrib/X11R6/lib'
'build_alias=hppa1.1-hp-hpux11.11' 'host_alias=hppa1.1-hp-hpux11.11'
'target_alias=hppa1.1-hp-hpux11.11' 'CFLAGS=-g -Ae +O0 +DA1.1' 'LDFLAGS=
-L/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/work/emacs-22.1/xpm-3.4k/lib'
'CPPFLAGS=-I/cm/ot/TOOL/GNU!12.43/build_G!67.IP.11/generated/work/emacs-22.1/xpm-3.4k
''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: C
locale-coding-system: nil
default-enable-multibyte-characters: nil
Major mode: Text
Minor modes in effect:
iswitchb-mode: t
show-paren-mode: t
which-function-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
Recent input:
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> + SPC
t h e SPC e n d SPC o f SPC a d a - f i n d - a n y
- r e f e r e n c e s SPC m u s t SPC b e : <return>
<return> C-y <down-mouse-1> <mouse-movement> <mouse-movement>
<drag-mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement>
<drag-mouse-1> <down-mouse-1> <mouse-movement> <drag-mouse-1>
<down-mouse-1> <mouse-1> <backspace> SPC ( I SPC w
i l l , SPC l i k e SPC t h e SPC c o r e SPC d u m
p SPC o n <backspace> <backspace> w i t h SPC u n s
e t SPC D I S P L A Y ) <return> r e p o r t SPC i
t SPC i t <backspace> <backspace> <backspace> <backspace>
<backspace> t h e SPC b u g SPC t o SPC t h e SPC e
m a c s SPC m a i n t a i n e r . <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> C-a C-SPC <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> M-w C-x b C-g C-x
C-f ~ / n o <tab> b r o l / a d a - m o d e - b u g
. t x t <return> C-y C-x b <return> C-x # y <help-echo>
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <report-emacs-bug>
Recent messages:
Auto-saving...done
Mark set
Auto-saving...
Mark set
Quit
(New file)
Mark set
Save file /tmp/snd.24993? (y or n)
Wrote /tmp/snd.24993
Loading emacsbug...done
--
Philippe WAROQUIERS Eurocontrol - Central Flow Management Unit
philippe.waroquiers@eurocontrol.int Rue de la fusee, 96
Tel: +32 2 729 97 35 1130 Brussels
Fax: +32 2 729 90 22 Belgium
____
This message and any files transmitted with it are legally privileged and
intended for the sole use of the individual(s) or entity to whom they are
addressed. If you are not the intended recipient, please notify the sender by
reply and delete the message and any attachments from your system. Any
unauthorised use or disclosure of the content of this message is strictly
prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on
the part of EUROCONTROL, unless it is confirmed by appropriately signed hard
copy.
Any views expressed in this message are those of the sender.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ada-mode list references prefix arg (to append references) broken,
Philippe Waroquiers <=