From 63eb03282311673fcc00194172fddcc61af25156 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 29 Mar 2007 15:23:58 -0700 Subject: [PATCH] Use ~/.muttrc as the default alias_file if no user muttrc exists. Makes the code agree with the documentation. Document that default is actually the used muttrc. (Closes Debian #226500.) --- init.c | 4 +++- init.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/init.c b/init.c index 0008ab7f..701303a4 100644 --- a/init.c +++ b/init.c @@ -2967,7 +2967,9 @@ void mutt_init (int skip_sys_rc, LIST *commands) snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(Homedir), MUTT_VERSION); if (access(buffer, F_OK) == -1) snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(Homedir)); - + if (access(buffer, F_OK) == -1) /* default to .muttrc for alias_file */ + snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(Homedir)); + default_rc = 1; Muttrc = safe_strdup (buffer); } diff --git a/init.h b/init.h index 1d8a4eeb..9124c4d9 100644 --- a/init.h +++ b/init.h @@ -107,6 +107,9 @@ struct option_t MuttVars[] = { ** .pp ** \fBNote:\fP Mutt will not automatically source this file; you must ** explicitly use the ``$source'' command for it to be executed. + ** .pp + ** The default for this option is the currently used muttrc file, or + ** ``~/.muttrc'' if no user muttrc was found. */ { "alias_format", DT_STR, R_NONE, UL &AliasFmt, UL "%4n %2f %t %-10a %r" }, /* -- 2.40.0