From a9ada58204642528647c1ccc3f6a029ee2dd24b2 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sun, 3 Nov 2013 07:55:50 +1800 Subject: [PATCH] [PATCH 17/21] vim: move default sets to set_defaults() --- 86/ff976501793f7ab6a6e531735f1097bf060df4 | 128 ++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 86/ff976501793f7ab6a6e531735f1097bf060df4 diff --git a/86/ff976501793f7ab6a6e531735f1097bf060df4 b/86/ff976501793f7ab6a6e531735f1097bf060df4 new file mode 100644 index 000000000..82d72d831 --- /dev/null +++ b/86/ff976501793f7ab6a6e531735f1097bf060df4 @@ -0,0 +1,128 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 608DC421174 + for ; Sat, 2 Nov 2013 07:04:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 1X3Bha5LN4l6 for ; + Sat, 2 Nov 2013 07:04:05 -0700 (PDT) +Received: from mail-oa0-f42.google.com (mail-oa0-f42.google.com + [209.85.219.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C81E5429E43 + for ; Sat, 2 Nov 2013 07:03:19 -0700 (PDT) +Received: by mail-oa0-f42.google.com with SMTP id k14so5694677oag.15 + for ; Sat, 02 Nov 2013 07:03:19 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=+p6NGqAXHM+MUZ+lnJIDivk5MFEtJt+mRiuAuWoaAXY=; + b=JtGnWwG1Ma6kG80lynWFl3wNsdpZrhidE+NP2IU7HrmaxqiNu9BhBr5DKjaVyXJWGo + oV27TkftMYRyCeF9kO08vSZP6HS9/VsJJstlygVqGE2njivvhWlqnSOylJ1lcPaTvPOo + 3FlXxjquOpCqwUHIrsBZbTsBfpVbOC58bLPR13Oh8F5rham5OuY72F6TcwgpuISMkb53 + iGdqLpTLpnlKLyDh9tUZEObjaSB/5fOiCBXaNw38V6nPxpcaYfoZXKp+DLbQXwHO0xl2 + sN3VnRWoGLf+akl9oKpDEynKaKAeTDHqBPvOtOlrEN5pW53JvbbHLpPti+5nvc1RTB1r + wQdw== +X-Received: by 10.182.81.41 with SMTP id w9mr6514979obx.18.1383400999106; + Sat, 02 Nov 2013 07:03:19 -0700 (PDT) +Received: from localhost (187-162-140-241.static.axtel.net. [187.162.140.241]) + by mx.google.com with ESMTPSA id + eg8sm19940507obd.6.2013.11.02.07.03.17 for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 02 Nov 2013 07:03:18 -0700 (PDT) +From: Felipe Contreras +To: notmuch@notmuchmail.org +Subject: [PATCH 17/21] vim: move default sets to set_defaults() +Date: Sat, 2 Nov 2013 07:55:50 -0600 +Message-Id: <1383400554-1832-18-git-send-email-felipe.contreras@gmail.com> +X-Mailer: git-send-email 1.8.4.2+fc1 +In-Reply-To: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> +References: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 02 Nov 2013 14:04:11 -0000 + +Signed-off-by: Felipe Contreras +--- + vim/notmuch.vim | 40 ++++++++++++++++++++-------------------- + 1 file changed, 20 insertions(+), 20 deletions(-) + +diff --git a/vim/notmuch.vim b/vim/notmuch.vim +index 2fe9346..71d4b32 100644 +--- a/vim/notmuch.vim ++++ b/vim/notmuch.vim +@@ -60,26 +60,6 @@ let s:notmuch_reader_default = 'mutt -f %s' + let s:notmuch_sendmail_default = 'sendmail' + let s:notmuch_folders_count_threads_default = 0 + +-if !exists('g:notmuch_date_format') +- let g:notmuch_date_format = s:notmuch_date_format_default +-endif +- +-if !exists('g:notmuch_datetime_format') +- let g:notmuch_datetime_format = s:notmuch_datetime_format_default +-endif +- +-if !exists('g:notmuch_reader') +- let g:notmuch_reader = s:notmuch_reader_default +-endif +- +-if !exists('g:notmuch_sendmail') +- let g:notmuch_sendmail = s:notmuch_sendmail_default +-endif +- +-if !exists('g:notmuch_folders_count_threads') +- let g:notmuch_folders_count_threads = s:notmuch_folders_count_threads_default +-endif +- + function! s:new_file_buffer(type, fname) + exec printf('edit %s', a:fname) + execute printf('set filetype=notmuch-%s', a:type) +@@ -410,6 +390,26 @@ endfunction + "" root + + function! s:set_defaults() ++ if !exists('g:notmuch_date_format') ++ let g:notmuch_date_format = s:notmuch_date_format_default ++ endif ++ ++ if !exists('g:notmuch_datetime_format') ++ let g:notmuch_datetime_format = s:notmuch_datetime_format_default ++ endif ++ ++ if !exists('g:notmuch_reader') ++ let g:notmuch_reader = s:notmuch_reader_default ++ endif ++ ++ if !exists('g:notmuch_sendmail') ++ let g:notmuch_sendmail = s:notmuch_sendmail_default ++ endif ++ ++ if !exists('g:notmuch_folders_count_threads') ++ let g:notmuch_folders_count_threads = s:notmuch_folders_count_threads_default ++ endif ++ + if exists('g:notmuch_custom_search_maps') + call extend(g:notmuch_search_maps, g:notmuch_custom_search_maps) + endif +-- +1.8.4.2+fc1 + -- 2.26.2