Am 19.08.2011 09:18, schrieb Eric S. Johansson:
On 8/9/2011 1:35 AM, Andreas Röhler wrote:

For the moment put a semicolon before

(require 'highlight-indentation)

in python-mode.el, that's all.

;; (when (featurep 'xemacs)
;; (require 'highlight-indentation))

yields

(1) (file-mode-spec/warning) Error in File mode specification: menu
keyword must be :config, :included, :accelerator or :filter: :help

Backtrace follows:

backtrace(nil t)
# bind (standard-output standard-output handler-arg-name)
backtrace-in-condition-handler-eliminating-handler(call-trapping-errors-Ldc9FC5Hr)

# bind (errstr call-trapping-errors-Ldc9FC5Hr)
#<compiled-function (from "/home/esj/xemacs-beta/lisp/files.elc")
(call-trapping-errors-Ldc9FC5Hr) "...(17)"
[call-trapping-errors-Ldc9FC5Hr errstr error-message-string lwarn
file-mode-spec warning "Error in %s: %s\n\nBacktrace follows:\n\n%s"
"File mode specification"
backtrace-in-condition-handler-eliminating-handler] 8 0x694>((error
"menu keyword must be :config, :included, :accelerator or :filter" :help))
signal(error ("menu keyword must be :config, :included, :accelerator or
:filter" :help))
# bind (menuitem item menubar-p menu)
check-menu-syntax(("Python" :help "Python-specific Features" ["Shift
region left" py-shift-left :active mark-active :help "Shift by a single
indentation step"] ["Shift region right" py-shift-right :active
mark-active :help "Shift by a single indentation step"] "-" ["Mark
block" py-mark-block :help "Mark innermost block at point"] ["Mark
def/class" mark-defun :help "Mark innermost definition at point"] "-"
["Start of block" py-beginning-of-block :help "Go to start of innermost
definition at point"] ["End of block" py-end-of-block :help "Go to end
of innermost definition at point"] ["Start of def/class"
beginning-of-defun :help "Go to start of innermost definition at point"]
["End of def/class" end-of-defun :help "Go to end of innermost
definition at point"] "-" ("Templates..." :help "Expand templates for
compound statements" :filter (lambda (&rest junk) (abbrev-table-menu
python-mode-abbrev-table))) "-" ["Import/reload file"
py-execute-import-or-reload :help "Load into inferior Python session"]
["Eval buffer" py-execute-buffer :help "Evaluate buffer en bloc in
inferior Python session"] ["Eval region" py-execute-region :active
mark-active :help "Evaluate region en bloc in inferior Python session"]
["Eval def/class" py-execute-defun :help "Evaluate current definition in
inferior Python session"] ["Switch to interpreter" py-shell :help
"Switch to `inferior' Python in separate buffer"] ["Set default process"
py-set-proc :help "Make buffer's inferior process the default" :active
(buffer-live-p py-buffer)] ["Check file" py-check :help "Run pychecker"]
["Debugger" pdb :help "Run pdb under GUD"] "-" ["Help on symbol"
py-describe-symbol :help "Use pydoc on symbol at point"] ["Complete
symbol" completion-at-point :help "Complete (qualified) symbol before
point"] ["Find function" py-find-function :help "Try to find source
definition of function at point"] ["Update imports" py-find-imports
:help "Update list of top-level imports for completion"]) nil)
# bind (in-menu before submenu menu-path)
add-submenu(nil ("Python" :help "Python-specific Features" ["Shift
region left" py-shift-left :active mark-active :help "Shift by a single
indentation step"] ["Shift region right" py-shift-right :active
mark-active :help "Shift by a single indentation step"] "-" ["Mark
block" py-mark-block :help "Mark innermost block at point"] ["Mark
def/class" mark-defun :help "Mark innermost definition at point"] "-"
["Start of block" py-beginning-of-block :help "Go to start of innermost
definition at point"] ["End of block" py-end-of-block :help "Go to end
of innermost definition at point"] ["Start of def/class"
beginning-of-defun :help "Go to start of innermost definition at point"]
["End of def/class" end-of-defun :help "Go to end of innermost
definition at point"] "-" ("Templates..." :help "Expand templates for
compound statements" :filter (lambda (&rest junk) (abbrev-table-menu
python-mode-abbrev-table))) "-" ["Import/reload file"
py-execute-import-or-reload :help "Load into inferior Python session"]
["Eval buffer" py-execute-buffer :help "Evaluate buffer en bloc in
inferior Python session"] ["Eval region" py-execute-region :active
mark-active :help "Evaluate region en bloc in inferior Python session"]
["Eval def/class" py-execute-defun :help "Evaluate current definition in
inferior Python session"] ["Switch to interpreter" py-shell :help
"Switch to `inferior' Python in separate buffer"] ["Set default process"
py-set-proc :help "Make buffer's inferior process the default" :active
(buffer-live-p py-buffer)] ["Check file" py-check :help "Run pychecker"]
["Debugger" pdb :help "Run pdb under GUD"] "-" ["Help on symbol"
py-describe-symbol :help "Use pydoc on symbol at point"] ["Complete
symbol" completion-at-point :help "Complete (qualified) symbol before
point"] ["Find function" py-find-function :help "Try to find source
definition of function at point"] ["Update imports" py-find-imports
:help "Update list of top-level imports for completion"]) nil)
# bind (before menu-items menu-name menu-path)
add-menu(nil "Python" (:help "Python-specific Features" ["Shift region
left" py-shift-left :active mark-active :help "Shift by a single
indentation step"] ["Shift region right" py-shift-right :active
mark-active :help "Shift by a single indentation step"] "-" ["Mark
block" py-mark-block :help "Mark innermost block at point"] ["Mark
def/class" mark-defun :help "Mark innermost definition at point"] "-"
["Start of block" py-beginning-of-block :help "Go to start of innermost
definition at point"] ["End of block" py-end-of-block :help "Go to end
of innermost definition at point"] ["Start of def/class"
beginning-of-defun :help "Go to start of innermost definition at point"]
["End of def/class" end-of-defun :help "Go to end of innermost
definition at point"] "-" ("Templates..." :help "Expand templates for
compound statements" :filter (lambda (&rest junk) (abbrev-table-menu
python-mode-abbrev-table))) "-" ["Import/reload file"
py-execute-import-or-reload :help "Load into inferior Python session"]
["Eval buffer" py-execute-buffer :help "Evaluate buffer en bloc in
inferior Python session"] ["Eval region" py-execute-region :active
mark-active :help "Evaluate region en bloc in inferior Python session"]
["Eval def/class" py-execute-defun :help "Evaluate current definition in
inferior Python session"] ["Switch to interpreter" py-shell :help
"Switch to `inferior' Python in separate buffer"] ["Set default process"
py-set-proc :help "Make buffer's inferior process the default" :active
(buffer-live-p py-buffer)] ["Check file" py-check :help "Run pychecker"]
["Debugger" pdb :help "Run pdb under GUD"] "-" ["Help on symbol"
py-describe-symbol :help "Use pydoc on symbol at point"] ["Complete
symbol" completion-at-point :help "Complete (qualified) symbol before
point"] ["Find function" py-find-function :help "Try to find source
definition of function at point"] ["Update imports" py-find-imports
:help "Update list of top-level imports for completion"]))
# bind (map menu)
easy-menu-add(("Python" :help "Python-specific Features" ["Shift region
left" py-shift-left :active mark-active :help "Shift by a single
indentation step"] ["Shift region right" py-shift-right :active
mark-active :help "Shift by a single indentation step"] "-" ["Mark
block" py-mark-block :help "Mark innermost block at point"] ["Mark
def/class" mark-defun :help "Mark innermost definition at point"] "-"
["Start of block" py-beginning-of-block :help "Go to start of innermost
definition at point"] ["End of block" py-end-of-block :help "Go to end
of innermost definition at point"] ["Start of def/class"
beginning-of-defun :help "Go to start of innermost definition at point"]
["End of def/class" end-of-defun :help "Go to end of innermost
definition at point"] "-" ("Templates..." :help "Expand templates for
compound statements" :filter (lambda (&rest junk) (abbrev-table-menu
python-mode-abbrev-table))) "-" ["Import/reload file"
py-execute-import-or-reload :help "Load into inferior Python session"]
["Eval buffer" py-execute-buffer :help "Evaluate buffer en bloc in
inferior Python session"] ["Eval region" py-execute-region :active
mark-active :help "Evaluate region en bloc in inferior Python session"]
["Eval def/class" py-execute-defun :help "Evaluate current definition in
inferior Python session"] ["Switch to interpreter" py-shell :help
"Switch to `inferior' Python in separate buffer"] ["Set default process"
py-set-proc :help "Make buffer's inferior process the default" :active
(buffer-live-p py-buffer)] ["Check file" py-check :help "Run pychecker"]
["Debugger" pdb :help "Run pdb under GUD"] "-" ["Help on symbol"
py-describe-symbol :help "Use pydoc on symbol at point"] ["Complete
symbol" completion-at-point :help "Complete (qualified) symbol before
point"] ["Find function" py-find-function :help "Try to find source
definition of function at point"] ["Update imports" py-find-imports
:help "Update list of top-level imports for completion"]))
(if py-menu (easy-menu-add py-menu))
python-mode()
# bind (alist mode name keep-going)
# (unwind-protect ...)
# bind (just-from-file-name)
set-auto-mode()
#<compiled-function (from "/home/esj/xemacs-beta/lisp/files.elc") nil
"...(5)" [set-auto-mode t] 1 0x695>()
# (unwind-protect ...)
call-with-condition-handler(#<compiled-function (from
"/home/esj/xemacs-beta/lisp/files.elc") (call-trapping-errors-Ldc9FC5Hr)
"...(17)" [call-trapping-errors-Ldc9FC5Hr errstr error-message-string
lwarn file-mode-spec warning "Error in %s: %s\n\nBacktrace
follows:\n\n%s" "File mode specification"
backtrace-in-condition-handler-eliminating-handler] 8 0x694>
#<compiled-function (from "/home/esj/xemacs-beta/lisp/files.elc") nil
"...(5)" [set-auto-mode t] 1 0x695>)
# (condition-case ... . ((error)))
# bind (find-file)
normal-mode(t)
# bind (nomodes after-find-file-from-revert-buffer noauto warn error)
after-find-file(nil t)
# (unwind-protect ...)
# bind (inhibit-read-only error number truename rawfile nowarn filename
buf)
find-file-noselect-1(#<buffer "food_calc.py">
"/home/esj/food/food_calc.py" nil nil
"c:/cygwin/home/esj/food/food_calc.py" (361450 -22488999))
byte-code("..." [number truename rawfile nowarn filename buf
set-buffer-major-mode find-file-noselect-1] 7)
# (condition-case ... . ((t (byte-code "Â!ˆÃ @ A\"‡" [buf data
kill-buffer signal] 3))))
# bind (number truename buf wildcards rawfile nowarn filename)
find-file-noselect("/home/esj/food/food_calc.py" nil nil nil)
# bind (coding-system-for-read wildcards codesys filename)
find-file("/home/esj/food/food_calc.py")
# bind (dir file-count line end-of-options file-p arg tem)
command-line-1()
# bind (command-line-args-left)
command-line()
# (condition-case ... . ((t (byte-code " ‡" [error-data data nil] 1))))
# bind (error-data)
normal-top-level()
# (condition-case ... . error)
# (catch top-level ...)



Hi Eric,

exists a bug tracker at

https://bugs.launchpad.net/python-mode

for that kind of problems.

Please make an entry there,

thanks,

Andreas

_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to