unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master f7572b7: Fix Semantic completion-at-point functions in non-Semantic buffers
       [not found] ` <E1Y06tt-0002BU-21@vcs.savannah.gnu.org>
@ 2014-12-14 14:30   ` Stefan Monnier
  2014-12-14 14:38     ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-12-14 14:30 UTC (permalink / raw)
  To: emacs-devel; +Cc: Dmitry Gutov

>     * lisp/cedet/semantic.el (semantic-analyze-completion-at-point-function)
>     (semantic-analyze-notc-completion-at-point-function)
>     (semantic-analyze-nolongprefix-completion-at-point-function): Do
>     nothing if the current buffer is not using Semantic.

Looks like the wrong fix.  Don't you think the right fix would be to
change the add/remove-hooks in semantic-mode so that they are
buffer-local?


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master f7572b7: Fix Semantic completion-at-point functions in non-Semantic buffers
  2014-12-14 14:30   ` [Emacs-diffs] master f7572b7: Fix Semantic completion-at-point functions in non-Semantic buffers Stefan Monnier
@ 2014-12-14 14:38     ` Dmitry Gutov
  2014-12-14 22:51       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2014-12-14 14:38 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

On 12/14/2014 04:30 PM, Stefan Monnier wrote:
>>      * lisp/cedet/semantic.el (semantic-analyze-completion-at-point-function)
>>      (semantic-analyze-notc-completion-at-point-function)
>>      (semantic-analyze-nolongprefix-completion-at-point-function): Do
>>      nothing if the current buffer is not using Semantic.
>
> Looks like the wrong fix.  Don't you think the right fix would be to
> change the add/remove-hooks in semantic-mode so that they are
> buffer-local?

`semantic-mode' is global, so it's easier to have these hooks globally 
too. I guess we can move the changing of hooks to 
`semantic-new-buffer-fcn', but I don't see its counterpart which would 
run when `semantic-mode' is being disabled.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master f7572b7: Fix Semantic completion-at-point functions in non-Semantic buffers
  2014-12-14 14:38     ` Dmitry Gutov
@ 2014-12-14 22:51       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-12-14 22:51 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

>> Looks like the wrong fix.  Don't you think the right fix would be to
>> change the add/remove-hooks in semantic-mode so that they are
>> buffer-local?
> `semantic-mode' is global,

Duh!  Sorry for being dense, and thanks for the fix,


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-14 22:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20141214105944.8359.64300@vcs.savannah.gnu.org>
     [not found] ` <E1Y06tt-0002BU-21@vcs.savannah.gnu.org>
2014-12-14 14:30   ` [Emacs-diffs] master f7572b7: Fix Semantic completion-at-point functions in non-Semantic buffers Stefan Monnier
2014-12-14 14:38     ` Dmitry Gutov
2014-12-14 22:51       ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).