ergoemacs / ergoemacs-mode

ergoemacs-mode
ergoemacs.github.io/
GNU General Public License v3.0
293 stars 35 forks source link

pr-update-menus fails #411

Closed sg2002 closed 8 years ago

sg2002 commented 8 years ago

With clean ergoemacs:

(require 'printing)
(pr-update-menus)

This results in:

Debugger entered--Lisp error: (wrong-type-argument listp 3)
  signal(wrong-type-argument (listp 3))
  (if (and (eq (car err) (quote error)) (stringp (nth 1 err)) (string-match "max-specpdl-size\\|max-lisp-eval-depth" (nth 1 err)) ergoemacs-comand-loop-grow-max-sizes-p (<= max-specpdl-size ergoemacs-max-specpdl-size) (<= max-lisp-eval-depth ergoemacs-max-lisp-eval-depth)) (progn (setq max-specpdl-size (* 2 max-specpdl-size) max-lisp-eval-depth (* 2 max-lisp-eval-depth)) (ergoemacs-warn "Increased max-specpdl-size to %s and max-lisp-eval-depth to %s for %s" max-specpdl-size max-lisp-eval-depth command)) (setq grow-max-lisp-p nil max-specpdl-size orig-max-specpdl-size max-lisp-eval-depth orig-max-lisp-eval-depth) (signal (car err) (cdr err)))
  (condition-case err (cond (ergoemacs-command-loop--grow-command (command-execute ergoemacs-command-loop--grow-command ergoemacs-command-loop--grow-record ergoemacs-command-loop--grow-keys ergoemacs-command-loop--grow-special) (setq grow-max-lisp-p nil)) (t (call-interactively command record-flag keys) (setq grow-max-lisp-p nil))) (error (if (and (eq (car err) (quote error)) (stringp (nth 1 err)) (string-match "max-specpdl-size\\|max-lisp-eval-depth" (nth 1 err)) ergoemacs-comand-loop-grow-max-sizes-p (<= max-specpdl-size ergoemacs-max-specpdl-size) (<= max-lisp-eval-depth ergoemacs-max-lisp-eval-depth)) (progn (setq max-specpdl-size (* 2 max-specpdl-size) max-lisp-eval-depth (* 2 max-lisp-eval-depth)) (ergoemacs-warn "Increased max-specpdl-size to %s and max-lisp-eval-depth to %s for %s" max-specpdl-size max-lisp-eval-depth command)) (setq grow-max-lisp-p nil max-specpdl-size orig-max-specpdl-size max-lisp-eval-depth orig-max-lisp-eval-depth) (signal (car err) (cdr err)))))
  (while grow-max-lisp-p (condition-case err (cond (ergoemacs-command-loop--grow-command (command-execute ergoemacs-command-loop--grow-command ergoemacs-command-loop--grow-record ergoemacs-command-loop--grow-keys ergoemacs-command-loop--grow-special) (setq grow-max-lisp-p nil)) (t (call-interactively command record-flag keys) (setq grow-max-lisp-p nil))) (error (if (and (eq (car err) (quote error)) (stringp (nth 1 err)) (string-match "max-specpdl-size\\|max-lisp-eval-depth" (nth 1 err)) ergoemacs-comand-loop-grow-max-sizes-p (<= max-specpdl-size ergoemacs-max-specpdl-size) (<= max-lisp-eval-depth ergoemacs-max-lisp-eval-depth)) (progn (setq max-specpdl-size (* 2 max-specpdl-size) max-lisp-eval-depth (* 2 max-lisp-eval-depth)) (ergoemacs-warn "Increased max-specpdl-size to %s and max-lisp-eval-depth to %s for %s" max-specpdl-size max-lisp-eval-depth command)) (setq grow-max-lisp-p nil max-specpdl-size orig-max-specpdl-size max-lisp-eval-depth orig-max-lisp-eval-depth) (signal (car err) (cdr err))))))
  (let ((grow-max-lisp-p t) (orig-max-specpdl-size max-specpdl-size) (orig-max-lisp-eval-depth max-lisp-eval-depth)) (while grow-max-lisp-p (condition-case err (cond (ergoemacs-command-loop--grow-command (command-execute ergoemacs-command-loop--grow-command ergoemacs-command-loop--grow-record ergoemacs-command-loop--grow-keys ergoemacs-command-loop--grow-special) (setq grow-max-lisp-p nil)) (t (call-interactively command record-flag keys) (setq grow-max-lisp-p nil))) (error (if (and (eq (car err) (quote error)) (stringp (nth 1 err)) (string-match "max-specpdl-size\\|max-lisp-eval-depth" (nth 1 err)) ergoemacs-comand-loop-grow-max-sizes-p (<= max-specpdl-size ergoemacs-max-specpdl-size) (<= max-lisp-eval-depth ergoemacs-max-lisp-eval-depth)) (progn (setq max-specpdl-size (* 2 max-specpdl-size) max-lisp-eval-depth (* 2 max-lisp-eval-depth)) (ergoemacs-warn "Increased max-specpdl-size to %s and max-lisp-eval-depth to %s for %s" max-specpdl-size max-lisp-eval-depth command)) (setq grow-max-lisp-p nil max-specpdl-size orig-max-specpdl-size max-lisp-eval-depth orig-max-lisp-eval-depth) (signal (car err) (cdr err)))))) (setq max-specpdl-size orig-max-specpdl-size max-lisp-eval-depth orig-max-lisp-eval-depth))
  ergoemacs-command-loop--grow-interactive(eval-last-sexp t nil)
  (cond ((and (eventp last-command-event) (consp last-command-event) (memq (event-basic-type (car last-command-event)) (quote (mouse-1 mouse-2 mouse-3 mouse-4 mouse-5 mouse-6 mouse-7 mouse-8 mouse-9)))) (ergoemacs-command-loop--call-mouse-command command record-flag keys)) ((and (symbolp command) (not (fboundp command))) (ergoemacs-command-loop--message "Command `%s' is not found" command)) ((and (symbolp command) (not (commandp command))) (ergoemacs-command-loop--message "Command `%s' cannot be called from a key" command)) ((and (consp ergoemacs-command-loop-describe-key-functions) (memq command ergoemacs-command-loop-describe-key-functions)) (let* ((old (symbol-function (quote key-description))) (old (symbol-function (quote read-key-sequence)))) (unwind-protect (progn (fset (quote key-description) (function ergoemacs-key-description)) (fset (quote read-key-sequence) (function ergoemacs-command-loop--read-key-sequence)) (ergoemacs-command-loop--grow-interactive command record-flag keys)) (fset (quote key-description) old) (fset (quote read-key-sequence) old)))) (t (ergoemacs-command-loop--grow-interactive command record-flag keys)))
  ergoemacs-command-loop--call-interactively(eval-last-sexp t)
  (unwind-protect (ergoemacs-command-loop--call-interactively this-command t) (setq ergoemacs-command-loop--single-command-keys nil))
  (cond ((or (stringp command) (vectorp command)) (let ((tmp (prefix-numeric-value current-prefix-arg))) (cond ((<= tmp 0) (ergoemacs-command-loop--message "The %s keyboard macro was not run %s times" (ergoemacs-key-description (vconcat command)) tmp)) (t (let ((--dotimes-limit-- tmp) (--dotimes-counter-- 0)) (while (< --dotimes-counter-- --dotimes-limit--) (let ... ...) (setq --dotimes-counter-- ...)) (let (...) unread-command-events))))) (setq ergoemacs-command-loop--single-command-keys nil)) (t (ergoemacs-command-loop--execute-modify-command-list command) (ergoemacs-command-loop--execute-handle-shift-selection this-command) (if keys (progn (setq ergoemacs-command-loop--single-command-keys keys) (if (consp last-command-event) nil (setq last-nonmenu-event last-command-event)))) (unwind-protect (progn (setq ergoemacs-command-loop--running-pre-command-hook-p t) (run-hooks (quote pre-command-hook))) (setq ergoemacs-command-loop--running-pre-command-hook-p nil)) (unwind-protect (ergoemacs-command-loop--call-interactively this-command t) (setq ergoemacs-command-loop--single-command-keys nil))))
  (let ((keys (or keys ergoemacs-command-loop--single-command-keys))) (cond ((or (stringp command) (vectorp command)) (let ((tmp (prefix-numeric-value current-prefix-arg))) (cond ((<= tmp 0) (ergoemacs-command-loop--message "The %s keyboard macro was not run %s times" (ergoemacs-key-description ...) tmp)) (t (let (... ...) (while ... ... ...) (let ... unread-command-events))))) (setq ergoemacs-command-loop--single-command-keys nil)) (t (ergoemacs-command-loop--execute-modify-command-list command) (ergoemacs-command-loop--execute-handle-shift-selection this-command) (if keys (progn (setq ergoemacs-command-loop--single-command-keys keys) (if (consp last-command-event) nil (setq last-nonmenu-event last-command-event)))) (unwind-protect (progn (setq ergoemacs-command-loop--running-pre-command-hook-p t) (run-hooks (quote pre-command-hook))) (setq ergoemacs-command-loop--running-pre-command-hook-p nil)) (unwind-protect (ergoemacs-command-loop--call-interactively this-command t) (setq ergoemacs-command-loop--single-command-keys nil)))))
  (unwind-protect (let ((keys (or keys ergoemacs-command-loop--single-command-keys))) (cond ((or (stringp command) (vectorp command)) (let ((tmp (prefix-numeric-value current-prefix-arg))) (cond ((<= tmp 0) (ergoemacs-command-loop--message "The %s keyboard macro was not run %s times" ... tmp)) (t (let ... ... ...)))) (setq ergoemacs-command-loop--single-command-keys nil)) (t (ergoemacs-command-loop--execute-modify-command-list command) (ergoemacs-command-loop--execute-handle-shift-selection this-command) (if keys (progn (setq ergoemacs-command-loop--single-command-keys keys) (if (consp last-command-event) nil (setq last-nonmenu-event last-command-event)))) (unwind-protect (progn (setq ergoemacs-command-loop--running-pre-command-hook-p t) (run-hooks (quote pre-command-hook))) (setq ergoemacs-command-loop--running-pre-command-hook-p nil)) (unwind-protect (ergoemacs-command-loop--call-interactively this-command t) (setq ergoemacs-command-loop--single-command-keys nil))))))
  ergoemacs-command-loop--execute(eval-last-sexp)
  (let ((inhibit-quit nil)) (ergoemacs-command-loop--execute command))
  (condition-case nil (let ((inhibit-quit nil)) (ergoemacs-command-loop--execute command)) (quit (setq quit-flag t) (eval (quote (ignore nil)))))
  (if (memq ergoemacs-command-loop-type (quote (:test :read-key-sequence))) nil (condition-case nil (let ((inhibit-quit nil)) (ergoemacs-command-loop--execute command)) (quit (setq quit-flag t) (eval (quote (ignore nil))))))
  (if (setq continue-read (and (not (and (consp (aref current-key 0)) (memq (event-basic-type (car ...)) (quote (mouse-1 mouse-2 mouse-3 mouse-4 mouse-5 mouse-6 mouse-7 mouse-8 mouse-9))))) (condition-case nil (progn (keymapp command)) (error nil)))) (setq universal nil) (if (memq ergoemacs-command-loop-type (quote (:test :read-key-sequence))) nil (condition-case nil (let ((inhibit-quit nil)) (ergoemacs-command-loop--execute command)) (quit (setq quit-flag t) (eval (quote (ignore nil)))))) (if quit-flag (progn (ergoemacs-command-loop--message "Quit!"))) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (if (eq ergoemacs-command-loop-type :read-key-sequence) (progn (setq ergoemacs-command-loop--exit t continue-read nil command current-key))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit) current-prefix-arg (if ergoemacs-command-loop--universal current-prefix-arg prefix-arg)) (if (and (not continue-read) (eq ergoemacs-command-loop--exit :ignore-post-command-hook)) (progn (setq continue-read t))))
  (cond ((and last-current-key (or (lookup-key ergoemacs-map--quit-map raw-key) (and (equal raw-key [27]) (lookup-key ergoemacs-map--quit-map [escape])))) (ergoemacs-command-loop--message "Key sequence %s aborted by %s" (ergoemacs-key-description last-current-key) (ergoemacs-key-description raw-key)) (setq quit-flag t)) ((and (or modal-p (not (equal current-key raw-key))) (setq command (lookup-key local-keymap raw-key)) (not (condition-case nil (progn (keymapp command)) (error nil))) (not (and ergoemacs-command-loop--next-key-hash (hash-table-p ergoemacs-command-loop--next-key-hash) (gethash command ergoemacs-command-loop--next-key-hash nil))) (or modal-p (and (symbolp command) (eq (get command :ergoemacs-local) :force)) (not (key-binding current-key t)))) (car-safe (prog1 ergoemacs-command-loop--history (setq ergoemacs-command-loop--history (cdr ergoemacs-command-loop--history)))) (setq ergoemacs-command-loop--single-command-keys last-current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal ergoemacs-command-loop--exit nil) (if (eq ergoemacs-command-loop-type :test) nil (setq tmp this-command this-command command) (ergoemacs-command-loop--call-interactively this-command) (setq command this-command this-command tmp)) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit))) ((setq command (ergoemacs-command-loop--key-lookup current-key)) (setq ergoemacs-command-loop--single-command-keys current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal nil ergoemacs-command-loop--exit t) (if (setq continue-read (and (not (and (consp ...) (memq ... ...))) (condition-case nil (progn (keymapp command)) (error nil)))) (setq universal nil) (if (memq ergoemacs-command-loop-type (quote (:test :read-key-sequence))) nil (condition-case nil (let ((inhibit-quit nil)) (ergoemacs-command-loop--execute command)) (quit (setq quit-flag t) (eval (quote ...))))) (if quit-flag (progn (ergoemacs-command-loop--message "Quit!"))) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (if (eq ergoemacs-command-loop-type :read-key-sequence) (progn (setq ergoemacs-command-loop--exit t continue-read nil command current-key))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit) current-prefix-arg (if ergoemacs-command-loop--universal current-prefix-arg prefix-arg)) (if (and (not continue-read) (eq ergoemacs-command-loop--exit :ignore-post-command-hook)) (progn (setq continue-read t)))) (if (or (not ergoemacs-command-loop--exit) (and (not continue-read) (setq continue-read unread-command-events))) (progn (ergoemacs-command-loop--internal-end-command)))) (quit-flag (ergoemacs-command-loop--message "Quit!") (setq quit-flag nil type :normal first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil)) ((consp (aref current-key 0))) (t (ergoemacs-command-loop--message "Key %s doesn't do anything." (ergoemacs-key-description current-key))))
  (while continue-read (setq ergoemacs-command-loop--single-command-keys current-key ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal raw-key (ergoemacs-command-loop--read-key current-key (or (and unread-command-events :normal) type) (and (not unread-command-events) universal)) ergoemacs-command-loop--single-command-keys nil universal-argument-num-events 0 last-current-key current-key current-key (nth 1 raw-key) raw-key (nth 0 raw-key) continue-read nil) (if (setq modal-p (ergoemacs-command-loop--modal-p)) (progn (setq local-keymap (ergoemacs-translation-struct-keymap-modal modal-p)))) (cond ((and last-current-key (or (lookup-key ergoemacs-map--quit-map raw-key) (and (equal raw-key [27]) (lookup-key ergoemacs-map--quit-map [escape])))) (ergoemacs-command-loop--message "Key sequence %s aborted by %s" (ergoemacs-key-description last-current-key) (ergoemacs-key-description raw-key)) (setq quit-flag t)) ((and (or modal-p (not (equal current-key raw-key))) (setq command (lookup-key local-keymap raw-key)) (not (condition-case nil (progn (keymapp command)) (error nil))) (not (and ergoemacs-command-loop--next-key-hash (hash-table-p ergoemacs-command-loop--next-key-hash) (gethash command ergoemacs-command-loop--next-key-hash nil))) (or modal-p (and (symbolp command) (eq (get command :ergoemacs-local) :force)) (not (key-binding current-key t)))) (car-safe (prog1 ergoemacs-command-loop--history (setq ergoemacs-command-loop--history (cdr ergoemacs-command-loop--history)))) (setq ergoemacs-command-loop--single-command-keys last-current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal ergoemacs-command-loop--exit nil) (if (eq ergoemacs-command-loop-type :test) nil (setq tmp this-command this-command command) (ergoemacs-command-loop--call-interactively this-command) (setq command this-command this-command tmp)) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit))) ((setq command (ergoemacs-command-loop--key-lookup current-key)) (setq ergoemacs-command-loop--single-command-keys current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal nil ergoemacs-command-loop--exit t) (if (setq continue-read (and (not (and ... ...)) (condition-case nil (progn ...) (error nil)))) (setq universal nil) (if (memq ergoemacs-command-loop-type (quote (:test :read-key-sequence))) nil (condition-case nil (let (...) (ergoemacs-command-loop--execute command)) (quit (setq quit-flag t) (eval ...)))) (if quit-flag (progn (ergoemacs-command-loop--message "Quit!"))) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (if (eq ergoemacs-command-loop-type :read-key-sequence) (progn (setq ergoemacs-command-loop--exit t continue-read nil command current-key))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit) current-prefix-arg (if ergoemacs-command-loop--universal current-prefix-arg prefix-arg)) (if (and (not continue-read) (eq ergoemacs-command-loop--exit :ignore-post-command-hook)) (progn (setq continue-read t)))) (if (or (not ergoemacs-command-loop--exit) (and (not continue-read) (setq continue-read unread-command-events))) (progn (ergoemacs-command-loop--internal-end-command)))) (quit-flag (ergoemacs-command-loop--message "Quit!") (setq quit-flag nil type :normal first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil)) ((consp (aref current-key 0))) (t (ergoemacs-command-loop--message "Key %s doesn't do anything." (ergoemacs-key-description current-key)))))
  (while continue-read (if (eq ergoemacs-command-loop-type :read-key-sequence) nil (setq inhibit-quit t)) (while continue-read (setq ergoemacs-command-loop--single-command-keys current-key ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal raw-key (ergoemacs-command-loop--read-key current-key (or (and unread-command-events :normal) type) (and (not unread-command-events) universal)) ergoemacs-command-loop--single-command-keys nil universal-argument-num-events 0 last-current-key current-key current-key (nth 1 raw-key) raw-key (nth 0 raw-key) continue-read nil) (if (setq modal-p (ergoemacs-command-loop--modal-p)) (progn (setq local-keymap (ergoemacs-translation-struct-keymap-modal modal-p)))) (cond ((and last-current-key (or (lookup-key ergoemacs-map--quit-map raw-key) (and (equal raw-key [27]) (lookup-key ergoemacs-map--quit-map [escape])))) (ergoemacs-command-loop--message "Key sequence %s aborted by %s" (ergoemacs-key-description last-current-key) (ergoemacs-key-description raw-key)) (setq quit-flag t)) ((and (or modal-p (not (equal current-key raw-key))) (setq command (lookup-key local-keymap raw-key)) (not (condition-case nil (progn ...) (error nil))) (not (and ergoemacs-command-loop--next-key-hash (hash-table-p ergoemacs-command-loop--next-key-hash) (gethash command ergoemacs-command-loop--next-key-hash nil))) (or modal-p (and (symbolp command) (eq ... :force)) (not (key-binding current-key t)))) (car-safe (prog1 ergoemacs-command-loop--history (setq ergoemacs-command-loop--history (cdr ergoemacs-command-loop--history)))) (setq ergoemacs-command-loop--single-command-keys last-current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal ergoemacs-command-loop--exit nil) (if (eq ergoemacs-command-loop-type :test) nil (setq tmp this-command this-command command) (ergoemacs-command-loop--call-interactively this-command) (setq command this-command this-command tmp)) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit))) ((setq command (ergoemacs-command-loop--key-lookup current-key)) (setq ergoemacs-command-loop--single-command-keys current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal nil ergoemacs-command-loop--exit t) (if (setq continue-read (and (not ...) (condition-case nil ... ...))) (setq universal nil) (if (memq ergoemacs-command-loop-type (quote ...)) nil (condition-case nil (let ... ...) (quit ... ...))) (if quit-flag (progn (ergoemacs-command-loop--message "Quit!"))) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (if (eq ergoemacs-command-loop-type :read-key-sequence) (progn (setq ergoemacs-command-loop--exit t continue-read nil command current-key))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit) current-prefix-arg (if ergoemacs-command-loop--universal current-prefix-arg prefix-arg)) (if (and (not continue-read) (eq ergoemacs-command-loop--exit :ignore-post-command-hook)) (progn (setq continue-read t)))) (if (or (not ergoemacs-command-loop--exit) (and (not continue-read) (setq continue-read unread-command-events))) (progn (ergoemacs-command-loop--internal-end-command)))) (quit-flag (ergoemacs-command-loop--message "Quit!") (setq quit-flag nil type :normal first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil)) ((consp (aref current-key 0))) (t (ergoemacs-command-loop--message "Key %s doesn't do anything." (ergoemacs-key-description current-key))))) (if quit-flag nil (ergoemacs-command-loop--internal-end-command)) (setq quit-flag nil type :normal continue-read (or unread-command-events (and from-start-p (ergoemacs-command-loop-full-p))) first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil) (if (or (not ergoemacs-mode) (eq :read-key-sequence ergoemacs-command-loop-type)) (progn (setq continue-read nil))))
  (progn (setq tmp (ergoemacs-command-loop--listify-key-sequence key initial-key-type) unread-command-events (or (and unread-command-events tmp (append tmp unread-command-events)) tmp) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil ergoemacs-command-loop-start nil) (while continue-read (if (eq ergoemacs-command-loop-type :read-key-sequence) nil (setq inhibit-quit t)) (while continue-read (setq ergoemacs-command-loop--single-command-keys current-key ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal raw-key (ergoemacs-command-loop--read-key current-key (or (and unread-command-events :normal) type) (and (not unread-command-events) universal)) ergoemacs-command-loop--single-command-keys nil universal-argument-num-events 0 last-current-key current-key current-key (nth 1 raw-key) raw-key (nth 0 raw-key) continue-read nil) (if (setq modal-p (ergoemacs-command-loop--modal-p)) (progn (setq local-keymap (ergoemacs-translation-struct-keymap-modal modal-p)))) (cond ((and last-current-key (or (lookup-key ergoemacs-map--quit-map raw-key) (and ... ...))) (ergoemacs-command-loop--message "Key sequence %s aborted by %s" (ergoemacs-key-description last-current-key) (ergoemacs-key-description raw-key)) (setq quit-flag t)) ((and (or modal-p (not ...)) (setq command (lookup-key local-keymap raw-key)) (not (condition-case nil ... ...)) (not (and ergoemacs-command-loop--next-key-hash ... ...)) (or modal-p (and ... ...) (not ...))) (car-safe (prog1 ergoemacs-command-loop--history (setq ergoemacs-command-loop--history ...))) (setq ergoemacs-command-loop--single-command-keys last-current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal ergoemacs-command-loop--exit nil) (if (eq ergoemacs-command-loop-type :test) nil (setq tmp this-command this-command command) (ergoemacs-command-loop--call-interactively this-command) (setq command this-command this-command tmp)) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation))) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit))) ((setq command (ergoemacs-command-loop--key-lookup current-key)) (setq ergoemacs-command-loop--single-command-keys current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal nil ergoemacs-command-loop--exit t) (if (setq continue-read (and ... ...)) (setq universal nil) (if (memq ergoemacs-command-loop-type ...) nil (condition-case nil ... ...)) (if quit-flag (progn ...)) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation ... local-keymap ...)) (if (eq ergoemacs-command-loop-type :read-key-sequence) (progn ...)) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit) current-prefix-arg (if ergoemacs-command-loop--universal current-prefix-arg prefix-arg)) (if (and ... ...) (progn ...))) (if (or (not ergoemacs-command-loop--exit) (and ... ...)) (progn (ergoemacs-command-loop--internal-end-command)))) (quit-flag (ergoemacs-command-loop--message "Quit!") (setq quit-flag nil type :normal first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil)) ((consp (aref current-key 0))) (t (ergoemacs-command-loop--message "Key %s doesn't do anything." (ergoemacs-key-description current-key))))) (if quit-flag nil (ergoemacs-command-loop--internal-end-command)) (setq quit-flag nil type :normal continue-read (or unread-command-events (and from-start-p (ergoemacs-command-loop-full-p))) first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil) (if (or (not ergoemacs-mode) (eq :read-key-sequence ergoemacs-command-loop-type)) (progn (setq continue-read nil)))) (setq inhibit-quit nil))
  (unwind-protect (progn (setq tmp (ergoemacs-command-loop--listify-key-sequence key initial-key-type) unread-command-events (or (and unread-command-events tmp (append tmp unread-command-events)) tmp) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil ergoemacs-command-loop-start nil) (while continue-read (if (eq ergoemacs-command-loop-type :read-key-sequence) nil (setq inhibit-quit t)) (while continue-read (setq ergoemacs-command-loop--single-command-keys current-key ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal raw-key (ergoemacs-command-loop--read-key current-key (or (and unread-command-events :normal) type) (and (not unread-command-events) universal)) ergoemacs-command-loop--single-command-keys nil universal-argument-num-events 0 last-current-key current-key current-key (nth 1 raw-key) raw-key (nth 0 raw-key) continue-read nil) (if (setq modal-p (ergoemacs-command-loop--modal-p)) (progn (setq local-keymap (ergoemacs-translation-struct-keymap-modal modal-p)))) (cond ((and last-current-key (or ... ...)) (ergoemacs-command-loop--message "Key sequence %s aborted by %s" (ergoemacs-key-description last-current-key) (ergoemacs-key-description raw-key)) (setq quit-flag t)) ((and (or modal-p ...) (setq command ...) (not ...) (not ...) (or modal-p ... ...)) (car-safe (prog1 ergoemacs-command-loop--history ...)) (setq ergoemacs-command-loop--single-command-keys last-current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal ergoemacs-command-loop--exit nil) (if (eq ergoemacs-command-loop-type :test) nil (setq tmp this-command this-command command) (ergoemacs-command-loop--call-interactively this-command) (setq command this-command this-command tmp)) (if (equal type ergoemacs-command-loop--current-type) nil (setq type ergoemacs-command-loop--current-type translation ... local-keymap ...)) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read (not ergoemacs-command-loop--exit))) ((setq command (ergoemacs-command-loop--key-lookup current-key)) (setq ergoemacs-command-loop--single-command-keys current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal nil ergoemacs-command-loop--exit t) (if (setq continue-read ...) (setq universal nil) (if ... nil ...) (if quit-flag ...) (if ... nil ...) (if ... ...) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read ... current-prefix-arg ...) (if ... ...)) (if (or ... ...) (progn ...))) (quit-flag (ergoemacs-command-loop--message "Quit!") (setq quit-flag nil type :normal first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil)) ((consp (aref current-key 0))) (t (ergoemacs-command-loop--message "Key %s doesn't do anything." (ergoemacs-key-description current-key))))) (if quit-flag nil (ergoemacs-command-loop--internal-end-command)) (setq quit-flag nil type :normal continue-read (or unread-command-events (and from-start-p (ergoemacs-command-loop-full-p))) first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil) (if (or (not ergoemacs-mode) (eq :read-key-sequence ergoemacs-command-loop-type)) (progn (setq continue-read nil)))) (setq inhibit-quit nil)))
  (let* ((type (or type :normal)) (from-start-p ergoemacs-command-loop-start) (continue-read t) (first-type type) raw-key current-key last-current-key (translation (ergoemacs-translate--get type)) (local-keymap (ergoemacs-translate--keymap translation)) modal-p tmp command) (unwind-protect (progn (setq tmp (ergoemacs-command-loop--listify-key-sequence key initial-key-type) unread-command-events (or (and unread-command-events tmp (append tmp unread-command-events)) tmp) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil ergoemacs-command-loop-start nil) (while continue-read (if (eq ergoemacs-command-loop-type :read-key-sequence) nil (setq inhibit-quit t)) (while continue-read (setq ergoemacs-command-loop--single-command-keys current-key ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal raw-key (ergoemacs-command-loop--read-key current-key (or ... type) (and ... universal)) ergoemacs-command-loop--single-command-keys nil universal-argument-num-events 0 last-current-key current-key current-key (nth 1 raw-key) raw-key (nth 0 raw-key) continue-read nil) (if (setq modal-p (ergoemacs-command-loop--modal-p)) (progn (setq local-keymap ...))) (cond ((and last-current-key ...) (ergoemacs-command-loop--message "Key sequence %s aborted by %s" ... ...) (setq quit-flag t)) ((and ... ... ... ... ...) (car-safe ...) (setq ergoemacs-command-loop--single-command-keys last-current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal ergoemacs-command-loop--exit nil) (if ... nil ... ... ...) (if ... nil ...) (setq current-key ergoemacs-command-loop--single-command-keys universal ergoemacs-command-loop--universal ergoemacs-command-loop--single-command-keys nil continue-read ...)) ((setq command ...) (setq ergoemacs-command-loop--single-command-keys current-key universal-argument-num-events 0 ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal nil ergoemacs-command-loop--exit t) (if ... ... ... ... ... ... ... ...) (if ... ...)) (quit-flag (ergoemacs-command-loop--message "Quit!") (setq quit-flag nil type :normal first-type :normal raw-key nil current-key nil translation ... local-keymap ... ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil)) ((consp ...)) (t (ergoemacs-command-loop--message "Key %s doesn't do anything." ...)))) (if quit-flag nil (ergoemacs-command-loop--internal-end-command)) (setq quit-flag nil type :normal continue-read (or unread-command-events (and from-start-p (ergoemacs-command-loop-full-p))) first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil) (if (or (not ergoemacs-mode) (eq :read-key-sequence ergoemacs-command-loop-type)) (progn (setq continue-read nil)))) (setq inhibit-quit nil))) command)
  (progn (fset (quote this-command-keys) (function ergoemacs-command-loop--this-command-keys)) (let* ((type (or type :normal)) (from-start-p ergoemacs-command-loop-start) (continue-read t) (first-type type) raw-key current-key last-current-key (translation (ergoemacs-translate--get type)) (local-keymap (ergoemacs-translate--keymap translation)) modal-p tmp command) (unwind-protect (progn (setq tmp (ergoemacs-command-loop--listify-key-sequence key initial-key-type) unread-command-events (or (and unread-command-events tmp (append tmp unread-command-events)) tmp) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil ergoemacs-command-loop-start nil) (while continue-read (if (eq ergoemacs-command-loop-type :read-key-sequence) nil (setq inhibit-quit t)) (while continue-read (setq ergoemacs-command-loop--single-command-keys current-key ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal raw-key (ergoemacs-command-loop--read-key current-key ... ...) ergoemacs-command-loop--single-command-keys nil universal-argument-num-events 0 last-current-key current-key current-key (nth 1 raw-key) raw-key (nth 0 raw-key) continue-read nil) (if (setq modal-p ...) (progn ...)) (cond (... ... ...) (... ... ... ... ... ...) (... ... ... ...) (quit-flag ... ...) (...) (t ...))) (if quit-flag nil (ergoemacs-command-loop--internal-end-command)) (setq quit-flag nil type :normal continue-read (or unread-command-events (and from-start-p ...)) first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil) (if (or (not ergoemacs-mode) (eq :read-key-sequence ergoemacs-command-loop-type)) (progn (setq continue-read nil)))) (setq inhibit-quit nil))) command))
  (unwind-protect (progn (fset (quote this-command-keys) (function ergoemacs-command-loop--this-command-keys)) (let* ((type (or type :normal)) (from-start-p ergoemacs-command-loop-start) (continue-read t) (first-type type) raw-key current-key last-current-key (translation (ergoemacs-translate--get type)) (local-keymap (ergoemacs-translate--keymap translation)) modal-p tmp command) (unwind-protect (progn (setq tmp (ergoemacs-command-loop--listify-key-sequence key initial-key-type) unread-command-events (or (and unread-command-events tmp ...) tmp) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil ergoemacs-command-loop-start nil) (while continue-read (if (eq ergoemacs-command-loop-type :read-key-sequence) nil (setq inhibit-quit t)) (while continue-read (setq ergoemacs-command-loop--single-command-keys current-key ergoemacs-command-loop--current-type type ergoemacs-command-loop--universal universal raw-key ... ergoemacs-command-loop--single-command-keys nil universal-argument-num-events 0 last-current-key current-key current-key ... raw-key ... continue-read nil) (if ... ...) (cond ... ... ... ... ... ...)) (if quit-flag nil (ergoemacs-command-loop--internal-end-command)) (setq quit-flag nil type :normal continue-read (or unread-command-events ...) first-type :normal raw-key nil current-key nil translation (ergoemacs-translate--get type) local-keymap (ergoemacs-translate--keymap translation) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil) (if (or ... ...) (progn ...))) (setq inhibit-quit nil))) command)) (fset (quote this-command-keys) old))
  (let* ((old (symbol-function (quote this-command-keys)))) (unwind-protect (progn (fset (quote this-command-keys) (function ergoemacs-command-loop--this-command-keys)) (let* ((type (or type :normal)) (from-start-p ergoemacs-command-loop-start) (continue-read t) (first-type type) raw-key current-key last-current-key (translation (ergoemacs-translate--get type)) (local-keymap (ergoemacs-translate--keymap translation)) modal-p tmp command) (unwind-protect (progn (setq tmp (ergoemacs-command-loop--listify-key-sequence key initial-key-type) unread-command-events (or ... tmp) ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil ergoemacs-command-loop-start nil) (while continue-read (if ... nil ...) (while continue-read ... ... ...) (if quit-flag nil ...) (setq quit-flag nil type :normal continue-read ... first-type :normal raw-key nil current-key nil translation ... local-keymap ... ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil) (if ... ...)) (setq inhibit-quit nil))) command)) (fset (quote this-command-keys) old)))
  (progn (ergoemacs-command-loop--execute-rm-keyfreq (quote ergoemacs-command-loop)) (if (commandp ergoemacs-command-loop-start) (progn (ergoemacs-command-loop--call-interactively ergoemacs-command-loop-start) (ergoemacs-command-loop--internal-end-command))) (let* ((old (symbol-function (quote this-command-keys)))) (unwind-protect (progn (fset (quote this-command-keys) (function ergoemacs-command-loop--this-command-keys)) (let* ((type (or type :normal)) (from-start-p ergoemacs-command-loop-start) (continue-read t) (first-type type) raw-key current-key last-current-key (translation (ergoemacs-translate--get type)) (local-keymap (ergoemacs-translate--keymap translation)) modal-p tmp command) (unwind-protect (progn (setq tmp ... unread-command-events ... ergoemacs-command-loop--first-type first-type ergoemacs-command-loop--history nil ergoemacs-command-loop-start nil) (while continue-read ... ... ... ... ...) (setq inhibit-quit nil))) command)) (fset (quote this-command-keys) old))))
  (if ergoemacs-mode (progn (ergoemacs-command-loop--execute-rm-keyfreq (quote ergoemacs-command-loop)) (if (commandp ergoemacs-command-loop-start) (progn (ergoemacs-command-loop--call-interactively ergoemacs-command-loop-start) (ergoemacs-command-loop--internal-end-command))) (let* ((old (symbol-function (quote this-command-keys)))) (unwind-protect (progn (fset (quote this-command-keys) (function ergoemacs-command-loop--this-command-keys)) (let* ((type ...) (from-start-p ergoemacs-command-loop-start) (continue-read t) (first-type type) raw-key current-key last-current-key (translation ...) (local-keymap ...) modal-p tmp command) (unwind-protect (progn ... ... ...)) command)) (fset (quote this-command-keys) old)))))
  ergoemacs-command-loop--internal(nil nil nil nil)
  (cond ((and ergoemacs-command-loop-start (not (ergoemacs-command-loop-p))) (ergoemacs-command-loop--internal key type initial-key-type universal)) (t (setq ergoemacs-command-loop--exit :ignore-post-command-hook prefix-arg current-prefix-arg ergoemacs-command-loop--single-command-keys (or (and key (read-kbd-macro key t)) ergoemacs-command-loop--single-command-keys) unread-command-events (or (and key (ergoemacs-command-loop--listify-key-sequence key initial-key-type)) unread-command-events) ergoemacs-command-loop--universal (if (and ergoemacs-command-loop--universal (not universal)) nil universal) ergoemacs-command-loop--current-type (or type ergoemacs-command-loop--current-type))))
  ergoemacs-command-loop()
  ergoemacs-command-loop-start()
  call-interactively(ergoemacs-command-loop-start nil nil)
  #[1025 "\306\211?\205\f
mattfidler commented 8 years ago

This is because the menus are updated. pr-update-menus assumes the "File" menu is exactly the same as what was in standard Emacs. The solution is to put this before Emacs loads. I did this at one point in ergoemacs-mode. I have added them again.