bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

Darren Hoo

C-c , g  then press q on the *Symref buffer should close window as
describe-function does, the behavior should be consistent across
different packages.


=== modified file 'lisp/cedet/semantic/symref/list.el'
--- lisp/cedet/semantic/symref/list.el 2013-09-17 15:50:33 +0000
+++ lisp/cedet/semantic/symref/list.el 2013-11-10 14:12:59 +0000
@@ -192,7 +192,7 @@
 (defun semantic-symref-hide-buffer ()
   "Hide buffer with semantic-symref results."
   (interactive)
-  (bury-buffer))
+  (quit-window))
 
 (defcustom semantic-symref-results-summary-function 'semantic-format-tag-prototype
   "Function to use when creating items in Imenu.


In GNU Emacs 24.3.50.8 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
 of 2013-11-09 on Darren-rMBP.local
Bzr revision: 115046 [hidden email]-20131109023646-nqoo2uv3hfjwoxiw
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'




Reply | Threaded
Open this post in threaded view
|

bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

Stefan Monnier
>  (defun semantic-symref-hide-buffer ()
>    "Hide buffer with semantic-symref results."
>    (interactive)
> -  (bury-buffer))
> +  (quit-window))
 
Aka (defalias 'semantic-symref-hide-buffer 'quit-window)


        Stefan



Reply | Threaded
Open this post in threaded view
|

bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

Darren Hoo
In reply to this post by Darren Hoo
Stefan Monnier <[hidden email]> writes:

>>  (defun semantic-symref-hide-buffer ()
>>    "Hide buffer with semantic-symref results."
>>    (interactive)
>> -  (bury-buffer))
>> +  (quit-window))
>  
> Aka (defalias 'semantic-symref-hide-buffer 'quit-window)
>

or just
    (define-key km "q" 'quit-window)





Reply | Threaded
Open this post in threaded view
|

bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

Stefan Monnier
> or just
>     (define-key km "q" 'quit-window)

Which would code for free if the mode derived from special-mode.


        Stefan



Reply | Threaded
Open this post in threaded view
|

bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

Lars Ingebrigtsen
In reply to this post by Darren Hoo
Darren Hoo <[hidden email]> writes:

> Stefan Monnier <[hidden email]> writes:
>
>>>  (defun semantic-symref-hide-buffer ()
>>>    "Hide buffer with semantic-symref results."
>>>    (interactive)
>>> -  (bury-buffer))
>>> +  (quit-window))
>>  
>> Aka (defalias 'semantic-symref-hide-buffer 'quit-window)
>>
>
> or just
>     (define-key km "q" 'quit-window)

I've now done this in Emacs 27.1.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

martin rudalics
 >>> Aka (defalias 'semantic-symref-hide-buffer 'quit-window)
 >>>
 >>
 >> or just
 >>      (define-key km "q" 'quit-window)
 >
 > I've now done this in Emacs 27.1.

I'm afraid not.

-    (define-key km "q" 'semantic-symref-hide-buffer)
+    (define-key km "q" 'quit-buffer)

The function is called 'quit-window' not 'quit-buffer'.

martin



Reply | Threaded
Open this post in threaded view
|

bug#15857: 24.3.50; semantic-symref-hide-buffer should use quit-window

Lars Ingebrigtsen
martin rudalics <[hidden email]> writes:

>>>> Aka (defalias 'semantic-symref-hide-buffer 'quit-window)
>>>>
>>>
>>> or just
>>>      (define-key km "q" 'quit-window)
>>
>> I've now done this in Emacs 27.1.
>
> I'm afraid not.
>
> -    (define-key km "q" 'semantic-symref-hide-buffer)
> +    (define-key km "q" 'quit-buffer)
>
> The function is called 'quit-window' not 'quit-buffer'.

Oops, thanks.  I've pushed a fix now.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no