From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master f7572b7: Fix Semantic completion-at-point functions in non-Semantic buffers Date: Sun, 14 Dec 2014 16:38:27 +0200 Message-ID: <548DA0E3.6090008@yandex.ru> References: <20141214105944.8359.64300@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1418567953 16549 80.91.229.3 (14 Dec 2014 14:39:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2014 14:39:13 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 14 15:39:06 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y0AK9-00027P-VQ for ged-emacs-devel@m.gmane.org; Sun, 14 Dec 2014 15:39:06 +0100 Original-Received: from localhost ([::1]:36181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0AK9-0002qH-H8 for ged-emacs-devel@m.gmane.org; Sun, 14 Dec 2014 09:39:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0AJl-0002kw-VT for emacs-devel@gnu.org; Sun, 14 Dec 2014 09:38:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0AJc-000775-T6 for emacs-devel@gnu.org; Sun, 14 Dec 2014 09:38:41 -0500 Original-Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:56376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0AJc-000771-Le for emacs-devel@gnu.org; Sun, 14 Dec 2014 09:38:32 -0500 Original-Received: by mail-wi0-f169.google.com with SMTP id r20so8331765wiv.2 for ; Sun, 14 Dec 2014 06:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=xv+79NnEOrLoLLnDoPBYtzqkOT8XhGnYfezgw/l8jag=; b=hgk3pgTfPoh7jc0DKMrdICvHM3BBIsNVVDYB0Pl5LqmZdsScbVZYsir0a0TNtZKKLf z1Gu/Y5k0eE4Tvap0P9tAm1B9sE2AP3/LTsZ9D7b5mbM133U6c1Ts3de1WDt4dEm8NUO nQc0q2XWVdcStnTUOnjzge0ZLetyDeMkqGjNY/psp4h+FQNocMS461vDzIHq5q9Rio8L M3XnZQP37d7vMQZ1Y21W3UfLI+mts45ByQ9a4xkASmQ5rfeJXvzR/XY8x+8R4KUzAOzj GrZHgXHCqqZaxfUvrzWHE7X57j0WiLXhPyuCgVd50ltmsXD94TMp14ag9ysRx75YNGz8 fjvQ== X-Received: by 10.194.91.234 with SMTP id ch10mr45485221wjb.114.1418567911087; Sun, 14 Dec 2014 06:38:31 -0800 (PST) Original-Received: from [192.168.1.2] ([82.102.93.58]) by mx.google.com with ESMTPSA id o2sm6384243wiy.11.2014.12.14.06.38.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Dec 2014 06:38:30 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:180084 Archived-At: 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.