From cfc5b5953758b8a9d43dfe74222bbc7beecd8bd5 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 6 Aug 2012 19:30:19 +0900 Subject: [PATCH] fix whitespace-style --- _keysnail.js | 24 +++++++++++++----------- emacs.el | 8 +++++++- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 27f820b..dc53375 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -199,17 +199,19 @@ ext.add("strong-fullscreen", function(){ } var tabs = document.getElementById("verticaltabs-box"); - var pref_key = "extensions.verticaltabs.width"; - var pref_key_bak = pref_key + "_bak" - if(isfullscreen){ - var width_orig = util.getIntPref(pref_key); - util.setIntPref(pref_key_bak, width_orig); - util.setIntPref(pref_key, 0); - tabs.setAttribute("width", "0"); - }else if(parseInt(tabs.getAttribute("width") || "") === 0){ - var width_bak = util.getIntPref(pref_key_bak); - util.setIntPref(pref_key, width_bak); - tabs.setAttribute("width", width_bak.toString()); + if(tabs){ + var pref_key = "extensions.verticaltabs.width"; + var pref_key_bak = pref_key + "_bak" + if(isfullscreen){ + var width_orig = util.getIntPref(pref_key); + util.setIntPref(pref_key_bak, width_orig); + util.setIntPref(pref_key, 0); + tabs.setAttribute("width", "0"); + }else if(parseInt(tabs.getAttribute("width") || "") === 0){ + var width_bak = util.getIntPref(pref_key_bak); + util.setIntPref(pref_key, width_bak); + tabs.setAttribute("width", width_bak.toString()); + } } }, "go fullscreen with hiding toolbar and tabbar"); diff --git a/emacs.el b/emacs.el index a0b9178..4adb37a 100644 --- a/emacs.el +++ b/emacs.el @@ -345,7 +345,13 @@ drill-instructor.el" )) (when (require 'whitespace nil t) - (setq whitespace-style '(face newline newline-mark empty lines-trail trailing)) + (setq whitespace-style '(face + trailing ; trailing blanks + newline ; newlines + newline-mark ; use display table for newline + empty ; empty lines at beg or end of buffer + lines-tail ; lines over 80 + )) ;; (setq whitespace-newline 'font-lock-comment-face) (add-to-list 'whitespace-display-mappings `(newline-mark ?\n ,(vconcat "$\n"))