From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juha Nieminen Newsgroups: gmane.emacs.help Subject: Always use UTF-8 mode with certain files Date: Tue, 23 Apr 2013 15:25:48 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1366735510 30474 80.91.229.3 (23 Apr 2013 16:45:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 16:45:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 23 18:45:15 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1UUgLB-0003VF-Ha for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Apr 2013 18:45:13 +0200 Original-Received: from localhost ([::1]:33342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUgLB-0005ka-7c for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Apr 2013 12:45:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUcID-0003S4-4N for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 08:25:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUcIA-0004r5-4w for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 08:25:52 -0400 Original-Received: from mail-ia0-x233.google.com ([2607:f8b0:4001:c02::233]:41527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUcI9-0004qt-V1 for help-gnu-emacs@gnu.org; Tue, 23 Apr 2013 08:25:50 -0400 Original-Received: by mail-ia0-f179.google.com with SMTP id p22so462161iad.24 for ; Tue, 23 Apr 2013 05:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=3lNZiCppQ2E1bHE2YHV8PHa/H4PxwX1OtL02diHcc44=; b=PoR45wjzTN340I2T6lZPpvSdeuthTI/UMdfaCmKQEQc95CaaDoC7mVUYdhEFV4JEUh geXrifUri4noJ+kznBJ3dLXqRRFZ1caNkSuB5Djes6Ncwk3OUOq7oD8CUaAncq8KrxJP oARX/78tOnFbu/IBqlfS3d+8GkTFJ6gc/djVZ3Prl8ovIrhT9QBBQx9dORqr16FgyhhK cwG1vHGOaSWHmHJZ9H8sdKUoFR0LhQfNIQCnbEtB+OGoGpBoH2o2Oecgvbi7oBfIskTd NJLPLOrMIn4mp/1E+VVRC2IfazczmUV2N87cCw2M3pq4uQwammo0BjabyvqeeBQucwm7 T50A== X-Received: by 10.50.15.166 with SMTP id y6mr18325606igc.83.1366719949065; Tue, 23 Apr 2013 05:25:49 -0700 (PDT) Original-Received: by 10.64.143.34 with HTTP; Tue, 23 Apr 2013 05:25:48 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c02::233 X-Mailman-Approved-At: Tue, 23 Apr 2013 12:45:03 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90309 Archived-At: Hello. I would like for emacs to always use UTF-8 mode when opening certain files (similarly as to what happens if I do a C-x C-m r utf-8, but just when normally opening a file.) For example I would like this to be the case when opening files with extensions .m, .mm and .h. I don't know what to write in the .emacs file for this to happen. (And obviously it shouldn't interfere with any other hooks that are triggered when opening such files...)