Deal with $shell from lua from now on.
[apps/madmutt.git] / init.c
diff --git a/init.c b/init.c
index 0d8b52b..a40576b 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1570,11 +1570,6 @@ static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
         set_option (OPTRESORTINIT);
         set_option (OPTREDRAWTREE);
         return (0);
-      }
-      else if (!FuncTable[DTYPE (option->type)].opt_fromstr) {
-        snprintf (err->data, err->dsize, _("$%s is read-only"), option->option);
-        r = -1;
-        break;
       } else {
         CHECK_PAGER;
         mutt_restore_default (NULL, option, 1);
@@ -1629,12 +1624,7 @@ static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
       {
         if (unset) {
           CHECK_PAGER;
-          if (!FuncTable[DTYPE (option->type)].opt_fromstr) {
-            snprintf (err->data, err->dsize, _("$%s is read-only"),
-                      option->option);
-            r = -1;
-            break;
-          } else if (DTYPE (option->type) == DT_ADDR)
+          if (DTYPE (option->type) == DT_ADDR)
             address_list_wipe((address_t **) option->data);
           else
             p_delete((void **)(void *)&option->data);
@@ -1648,20 +1638,12 @@ static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
         break;
       }
 
-      /* the $madmutt_ variables are read-only */
-      if (!FuncTable[DTYPE (option->type)].opt_fromstr) {
-        snprintf (err->data, err->dsize, _("$%s is read-only"),
-                  option->option);
+      CHECK_PAGER;
+      s->dptr++;
+      mutt_extract_token (tmp, s, 0);
+      if (!FuncTable[DTYPE (option->type)].opt_fromstr
+          (option, tmp->data, err->data, err->dsize))
         r = -1;
-        break;
-      } else {
-        CHECK_PAGER;
-        s->dptr++;
-        mutt_extract_token (tmp, s, 0);
-        if (!FuncTable[DTYPE (option->type)].opt_fromstr
-            (option, tmp->data, err->data, err->dsize))
-          r = -1;
-      }
     }
     else if (DTYPE (option->type) == DT_QUAD) {
 
@@ -2239,7 +2221,6 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
 
     mutt_gecos_name(rnbuf, sizeof(rnbuf), pw, GecosMask.rx);
     Realname = m_strdup(rnbuf);
-    Shell = m_strdup(pw->pw_shell);
     endpwent ();
   }
   else {
@@ -2255,7 +2236,6 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
       fputs (_("unable to determine username"), stderr);
       exit (1);
     }
-    Shell = m_strdup((p = getenv ("SHELL")) ? p : "/bin/sh");
   }
 
   /* And about the host... */