emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 05/117: Only turn on recentf-mode in interactive sessions.


From: Matthew Fidler
Subject: [elpa] 05/117: Only turn on recentf-mode in interactive sessions.
Date: Fri, 25 Jul 2014 13:23:48 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit 84a729525fd82dae454c8c4935fdd38320fa9505
Author: Matthew L. Fidler <address@hidden>
Date:   Mon Jul 14 08:34:48 2014 -0500

    Only turn on recentf-mode in interactive sessions.
---
 ergoemacs-functions.el |   16 ++++++++++++++++
 ergoemacs-themes.el    |    3 ++-
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index a1a09b9..4b42c3e 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -40,6 +40,22 @@
   :type 'boolean
   :group 'ergoemacs-mode)
 
+(defun ergoemacs-recentf-mode (&optional arg)
+  "Toggle \"Open Recent\" menu (Recentf mode).
+With a prefix argument ARG, enable Recentf mode if ARG is
+positive, and disable it otherwise.  If called from Lisp, enable
+Recentf mode if ARG is omitted or nil.
+
+When Recentf mode is enabled, a \"Open Recent\" submenu is
+displayed in the \"File\" menu, containing a list of files that
+were operated on recently.
+
+This wrapper only calls `recentf-mode' when `ergoemacs-mode' is
+running interactively.
+"
+  (unless noninteractive
+    (recentf-mode arg)))
+
 
 (defvar ergoemacs-delete-functions
   '(delete-backward-char delete-char kill-word backward-kill-word)
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index bdeda95..bb67dd8 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -35,6 +35,7 @@
 (autoload 'wdired-change-to-wdired-mode "wdired" "ergoemacs-autoload." t)
 (autoload 'wdired-exit "wdired" "ergoemacs-autoload." t)
 
+
 (require 'advice)
 
 (defvar ergoemacs-theme-comp-hash)
@@ -175,7 +176,7 @@
           :help "Customize recently opened files menu and options"
           :active t]
          ))
-  (recentf-mode 1)
+  (ergoemacs-recentf-mode 1)
   ;; (setq cua--rectangle-modifier-key ergoemacs-cua-rect-modifier)
   ;; (setq cua--rectangle-keymap (make-sparse-keymap))
   ;; (setq cua--rectangle-initialized nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]