From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Deprecate _emacs on Windows Date: Sat, 12 Mar 2011 22:54:38 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1299966929 1989 80.91.229.12 (12 Mar 2011 21:55:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Mar 2011 21:55:29 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 12 22:55:25 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PyWmT-0007Yl-0y for ged-emacs-devel@m.gmane.org; Sat, 12 Mar 2011 22:55:25 +0100 Original-Received: from localhost ([127.0.0.1]:36060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PyWmS-0005ND-A2 for ged-emacs-devel@m.gmane.org; Sat, 12 Mar 2011 16:55:24 -0500 Original-Received: from [140.186.70.92] (port=33598 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PyWmO-0005N8-Bv for emacs-devel@gnu.org; Sat, 12 Mar 2011 16:55:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PyWmN-0007Af-93 for emacs-devel@gnu.org; Sat, 12 Mar 2011 16:55:20 -0500 Original-Received: from mail-gy0-f169.google.com ([209.85.160.169]:41675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PyWmN-0007AW-5h for emacs-devel@gnu.org; Sat, 12 Mar 2011 16:55:19 -0500 Original-Received: by gyg10 with SMTP id 10so604106gyg.0 for ; Sat, 12 Mar 2011 13:55:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=2QubsHnLWmiep4Mdpcw4JKQ5QB/lZIRNz2l0XgV9kcs=; b=GfG8sDxV8vTNyTntDYmoHa3IO3zoJ3RFGo6HQzKGqRRWxsFozgNd96NXb9d0N+Ek32 t32/SMDA96YBhXxsRGw2O+9T5ltFsBWWNNwaaJeuPgdFcwztVVTdbDS+Pkt72FcMHUJw yYWsQZS18PwoCRlwMHU//X2RCVisAYNYIoxQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=fDaS5GWBePOBLP+bE0OLZ6MOZEBmtaAHUN13uUiP0FlDJmZqBoYS8sTl2n/sUGsnXb qeNRrxC5ycuHfu+or4BE//jNhUoIqfOmZkiTL3UY6QwY2JlDftqm4sIUy3SpN7Mj6uyr XfV9Rq71Bz84kc8tTGqw84PR7D7Adg/Ree2/M= Original-Received: by 10.150.193.10 with SMTP id q10mr4294402ybf.413.1299966918460; Sat, 12 Mar 2011 13:55:18 -0800 (PST) Original-Received: by 10.147.137.2 with HTTP; Sat, 12 Mar 2011 13:54:38 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.160.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137170 Archived-At: As part of the discussion of bug#8220, I'd like to propose to add (warn "`_emacs' init file is deprecated, please use `.emacs'") at the appropriate place in `command-line', as a first past to eventually make _emacs obsolete and remove its support (on Windows, of course, not MS-DOS). Opinions? =C2=A0 =C2=A0 Juanma (The patch also changes cond + if/elsif/else into a simple cond, which seems clearer). =3D=3D=3D modified file 'lisp/startup.el' --- lisp/startup.el 2011-01-25 04:08:28 +0000 +++ lisp/startup.el 2011-03-12 21:39:52 +0000 @@ -1008,17 +1008,18 @@ (cond ((eq system-type 'ms-dos) (concat "~" init-file-user "/_emacs")) - ((eq system-type 'windows-nt) + ((not (eq system-type 'windows-nt)) + (concat "~" init-file-user "/.emacs")) + ;; Else deal with the Windows situation + ((directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$") ;; Prefer .emacs on Windows. - (if (directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$") - "~/.emacs" - ;; Also support _emacs for compatibility. - (if (directory-files "~" nil "^_emacs\\(\\.elc?\\)?$") - "~/_emacs" - ;; But default to .emacs if _emacs does not exist. - "~/.emacs"))) - (t - (concat "~" init-file-user "/.emacs"))))) + "~/.emacs") + ((directory-files "~" nil "^_emacs\\(\\.elc?\\)?$") + ;; Also support _emacs for compatibility, but warn about it. + (warn "`_emacs' init file is deprecated, please use `.emacs'") + "~/_emacs") + (t ;; But default to .emacs if _emacs does not exist. + "~/.emacs")))) ;; This tells `load' to store the file name found ;; into user-init-file. (setq user-init-file t)