From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.bugs Subject: bug#28685: [PATCH 2/3] Put .cpp.el to ~/.emacs.d if possible Date: Sun, 22 Oct 2017 18:22:41 +0900 Message-ID: <20171022092242.7014-2-yamato@redhat.com> References: <87a80kdzod.fsf@users.sourceforge.net> <20171022092242.7014-1-yamato@redhat.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1508664263 4488 195.159.176.226 (22 Oct 2017 09:24:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Oct 2017 09:24:23 +0000 (UTC) Cc: yamato@redhat.com, 28685@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 22 11:24:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6CUR-0008H3-IE for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 11:24:15 +0200 Original-Received: from localhost ([::1]:60555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6CUX-0007iq-C4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 05:24:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6CUH-0007iE-L2 for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 05:24:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6CUE-0003Jp-SW for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 05:24:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6CUE-0003Jc-OV for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 05:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e6CUE-0005fG-Gj for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 05:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Masatake YAMATO Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Oct 2017 09:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28685 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28685-submit@debbugs.gnu.org id=B28685.150866419821701 (code B ref 28685); Sun, 22 Oct 2017 09:24:02 +0000 Original-Received: (at 28685) by debbugs.gnu.org; 22 Oct 2017 09:23:18 +0000 Original-Received: from localhost ([127.0.0.1]:54922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6CTV-0005dv-Tq for submit@debbugs.gnu.org; Sun, 22 Oct 2017 05:23:18 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:36740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6CTU-0005di-AF for 28685@debbugs.gnu.org; Sun, 22 Oct 2017 05:23:16 -0400 Original-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CED1337E68; Sun, 22 Oct 2017 09:23:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CED1337E68 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=yamato@redhat.com Original-Received: from master.redhat.com (unknown [10.64.242.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id E84EC60A98; Sun, 22 Oct 2017 09:23:08 +0000 (UTC) In-Reply-To: <20171022092242.7014-1-yamato@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sun, 22 Oct 2017 09:23:11 +0000 (UTC) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138844 Archived-At: * lisp/progmodes/cpp.el (cpp-edit-load): Use locate-user-emacs-file instead of specifying "~/" (cpp-edit-save): Ditto. --- lisp/progmodes/cpp.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 3a7dab72b4..0a68a0cf2c 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -576,8 +576,8 @@ cpp-edit-load nil) ((file-readable-p cpp-config-file) (load-file cpp-config-file)) - ((file-readable-p (concat "~/" cpp-config-file)) - (load-file (concat "~/" cpp-config-file)))) + ((file-readable-p (locate-user-emacs-file cpp-config-file)) + (load-file (locate-user-emacs-file cpp-config-file)))) (if (derived-mode-p 'cpp-edit-mode) (cpp-edit-reset))) @@ -588,7 +588,7 @@ cpp-edit-save (with-current-buffer cpp-edit-buffer (let* ((config-file (if (file-writable-p cpp-config-file) cpp-config-file - (concat "~/" cpp-config-file))) + (locate-user-emacs-file cpp-config-file))) (buffer (find-file-noselect config-file)) ) (set-buffer buffer) -- 2.13.6