From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: denebet Newsgroups: gmane.emacs.help Subject: Re: Completion in Auctex Date: Mon, 22 Sep 2008 08:53:28 +0200 Organization: les newsgroups par Orange Message-ID: <48d740e8$0$848$ba4acef3@news.orange.fr> References: Reply-To: denebet@lechebet.bzh NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1222069250 27071 80.91.229.12 (22 Sep 2008 07:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2008 07:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 22 09:41:46 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Khg3E-00028g-R9 for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Sep 2008 09:41:45 +0200 Original-Received: from localhost ([127.0.0.1]:53769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Khg2D-0001no-1r for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Sep 2008 03:40:41 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!fdn.fr!freenix!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.10.9 Original-Lines: 38 Original-NNTP-Posting-Date: 22 Sep 2008 08:53:28 CEST Original-NNTP-Posting-Host: 90.49.132.123 Original-X-Trace: 1222066408 news.orange.fr 848 90.49.132.123:7901 Original-X-Complaints-To: abuse@orange.fr Original-Xref: news.stanford.edu gnu.emacs.help:162539 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57882 Archived-At: Ross A. Laird wrote: > I don't know if this is what you are looking for, but in auctex you can > type M-/ (alt-forward slash) and it will complete words that are not > commands (e.g. words that exist previously in the document). Thanks. Yes, this is what I was looking for but didn't find it because a long time ago I set completion in programming modes to [TAB] and forgot to set it for text mode. In case it could be useful for people reading this group and who think that M-/ is not a very user friendly shortcut : from ------------- (defun indent-or-expand (arg) "Either indent according to mode, or expand the word preceding point." (interactive "*P") (if (and (or (bobp) (= ?w (char-syntax (char-before)))) (or (eobp) (not (= ?w (char-syntax (char-after)))))) (dabbrev-expand arg) (indent-according-to-mode))) (defun my-tab-fix () (local-set-key [tab] 'indent-or-expand)) (add-hook 'text-mode-hook 'my-tab-fix) ;; for auctex (add-hook 'c++-mode-hook 'my-tab-fix) ;; for c++ ;; and so on --------------- Have a nice day