branch: externals/ergoemacs-mode commit 12b10188ded0ae59f0beab798a62a9d22ab918b8 Author: Walter Landry <wlan...@caltech.edu> Commit: Walter Landry <wlan...@caltech.edu>
Remove unused functions --- ergoemacs-command-loop.el | 50 ----------------------------------------------- ergoemacs-component.el | 21 -------------------- ergoemacs-map.el | 4 ---- 3 files changed, 75 deletions(-) diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el index 389a634..cc0c9f5 100644 --- a/ergoemacs-command-loop.el +++ b/ergoemacs-command-loop.el @@ -522,57 +522,7 @@ This sequence is compatible with `listify-key-sequence'." input)) input)) -(defun ergoemacs-command-loop-p () - "Determine if `ergoemacs-mode' is running its command loop. -This is done by looking at the current `backtrace' and making -sure that `ergoemacs-command-loop--internal' hasn't been called." - (eq (symbol-function 'this-command-keys) #'ergoemacs-command-loop--this-command-keys)) - -(defvar ergoemacs-command-loop--running-pre-command-hook-p nil - "Variable to tell if ergoemacs-command loop is running the `pre-command-hook'.") - -(defvar ergoemacs-command-loop--excluded-variables - '(defining-kbd-macro executing-kbd-macro) - "List of variables stopping the command loop. - -While these variables are non-nil, the `ergoemacs-command-loop' -will stop and not be started agin.") - -(defvar ergoemacs-command-loop--excluded-major-modes - '(calc-mode calc-trail-mode calc-edit-mode) - "List of major modes where the command loop is incompatible.") - - (defvar ergoemacs-command-loop--minibuffer-unsupported-p nil) -(defun ergoemacs-command-loop--minibuffer-supported-p (&optional command) - "Determine if the current minibuffer supports the full command loop. -When COMMAND is non-nil, set -`ergoemacs-command-loop--minibuffer-unsupported-p' to the -appropriate value based on the COMMAND." - (if (not command) - (or (not (minibufferp)) - (not ergoemacs-command-loop--minibuffer-unsupported-p)) - (when (or (and command (symbolp command) (string-match-p "^\\(calc\\|math\\)" (symbol-name command))) - (and (stringp command) (string-match-p "^[^:]*:\\(calc\\|math\\)" command))) - (ergoemacs-save-buffer-state - (set (make-local-variable 'ergoemacs-command-loop--minibuffer-unsupported-p) t))) - (ergoemacs-command-loop--minibuffer-supported-p))) - -(defun ergoemacs-command-loop-full-p (&optional type) - "Determines if the full command loop should be run. - - -TYPE is the type of command loop to check for. By default this -is the :full command loop." - (and - (eq ergoemacs-command-loop-type (or type :full)) - (ergoemacs-command-loop--minibuffer-supported-p) - (catch 'excluded-variables - (dolist (var ergoemacs-command-loop--excluded-variables) - (when (and var (ergoemacs-sv var)) - (throw 'excluded-variables nil))) - t) - (not (memq major-mode ergoemacs-command-loop--excluded-major-modes)))) (defvar ergoemacs-last-command-was-ergoemacs-ignore-p nil "Last command was `ergoemacs-ignore'.") diff --git a/ergoemacs-component.el b/ergoemacs-component.el index 4a8ec94..df32b69 100644 --- a/ergoemacs-component.el +++ b/ergoemacs-component.el @@ -871,27 +871,6 @@ OBJ is the current object being modified, passed to (ergoemacs-save-buffer-state (set (make-local-variable (car elt)) (make-composed-keymap (cdr elt) (symbol-value (car elt)))))))) -(defvar ergoemacs-component-struct--create-hooks nil) -(defun ergoemacs-component-struct--create-hooks (&optional obj) - "Gets a list of hooks that need to be defined eor OBJ." - (dolist (hook (ergoemacs-component-struct--hooks obj)) - (eval `(progn - (defun ,(intern (concat "ergoemacs--" (symbol-name hook))) () - ,(format "`ergoemacs-mode' hook for `%s'" (symbol-name hook)) - (ergoemacs-component-struct--composed-hook ',hook)) - ;; (push ) - (push ',hook ergoemacs-component-struct--create-hooks) - (add-hook ',hook #',(intern (concat "ergoemacs--" (symbol-name hook)))))))) - -(defun ergoemacs-component-struct--rm-hooks () - "Remove hooks. - -These hooks are those created with -`ergoemacs-component-struct--create-hooks'." - (dolist (hook ergoemacs-component-struct--create-hooks) - (remove-hook hook (intern (concat "ergoemacs--" (symbol-name hook))))) - (setq ergoemacs-component-struct--create-hooks nil)) - (defun ergoemacs-component-struct--translated-list (obj list &optional layout) "Base on OBJ translation, Translate LIST using LAYOUT." (let ((cur-layout (or layout ergoemacs-keyboard-layout)) diff --git a/ergoemacs-map.el b/ergoemacs-map.el index 6c91319..14adeb6 100644 --- a/ergoemacs-map.el +++ b/ergoemacs-map.el @@ -69,16 +69,12 @@ (declare-function ergoemacs-command-loop--spinner-display "ergoemacs-command-loop") -(declare-function ergoemacs-component-struct--create-hooks "ergoemacs-component") (declare-function ergoemacs-component-struct--get "ergoemacs-component") (declare-function ergoemacs-component-struct--lookup-hash "ergoemacs-component") (declare-function ergoemacs-component-struct--lookup-list "ergoemacs-component") (declare-function ergoemacs-component-struct--minor-mode-map-alist "ergoemacs-component") -(declare-function ergoemacs-component-struct--rm-hooks "ergoemacs-component") (declare-function ergoemacs-component-struct--translated-list "ergoemacs-component") -(declare-function ergoemacs-command-loop--minibuffer-supported-p "ergoemacs-command-loop") - (declare-function ergoemacs-theme--get-version "ergoemacs-theme-engine") (declare-function ergoemacs-theme-components "ergoemacs-theme-engine") (declare-function ergoemacs-theme--menu "ergoemacs-theme-engine")