~ubuntu-branches/ubuntu/saucy/texmacs/saucy

« back to all changes in this revision

Viewing changes to TeXmacs/progs/texmacs/menus/debug-menu.scm

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA
  • Date: 2010-11-05 14:47:00 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20101105144700-t2ju0m1o53cqtyed
Tags: 1:1.0.7.7-1
* New Upstream Release.
* Updated patches/09_ipa.dpatch for new upstream sources.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
3
;;
 
4
;; MODULE      : debug-menu.scm
 
5
;; DESCRIPTION : the debug menu
 
6
;; COPYRIGHT   : (C) 1999  Joris van der Hoeven
 
7
;;
 
8
;; This software falls under the GNU general public license version 3 or later.
 
9
;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
 
10
;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
 
11
;;
 
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
13
 
 
14
(texmacs-module (texmacs menus debug-menu))
 
15
 
 
16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
17
;; Memory
 
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
19
 
 
20
(define (show-memory-information s)
 
21
  (string-append s "#[" (number->string (texmacs-memory)) "#bytes]"))
 
22
 
 
23
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
24
;; Guile
 
25
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
26
 
 
27
(define (debug-backtrace-errors?) (in? 'backtrace (debug-options)))
 
28
(tm-define (debug-toggle-backtrace-errors)
 
29
  (:synopsis "Toggle scheme backtracing of errors.")
 
30
  (:check-mark "v" debug-backtrace-errors?)
 
31
  (if (debug-backtrace-errors?)
 
32
      (debug-disable 'backtrace 'debug)
 
33
      (debug-enable 'backtrace 'debug)))
 
34
 
 
35
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
36
;; General debugging options
 
37
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
38
 
 
39
(tm-define (debug-toggle s)
 
40
  (:check-mark "v" debug-get)
 
41
  (debug-set s (not (debug-get s))))
 
42
 
 
43
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
44
;; Memory
 
45
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
46
 
 
47
(menu-bind debug-menu
 
48
  (-> "Guile"
 
49
      ("Backtrace errors" (debug-toggle-backtrace-errors)))
 
50
  (-> "Status"
 
51
      ("Tree" (show-tree))
 
52
      ("Path" (show-path))
 
53
      ("Cursors" (show-cursor))
 
54
      ("Selection" (show-selection))
 
55
      ("Environment" (show-env))
 
56
      ("History" (show-history))
 
57
      ("Memory usage" (show-meminfo)))
 
58
  (-> "Timings"
 
59
      ("All" (bench-print-all)))
 
60
  (-> "Memory"
 
61
      ("Memory usage" (show-meminfo))
 
62
      ("Collect garbage" (gc))
 
63
      ---
 
64
      (group "Permanent")
 
65
      ("Show memory usage" (set! footer-hook show-memory-information))
 
66
      ("Garbage collection" (delayed (:idle 1000) (gc))))
 
67
  (-> "Miscellaneous"
 
68
      ("Provoke error" (oops))
 
69
      ("Test routine" (edit-test)))
 
70
  ---
 
71
  ("auto" (debug-toggle "auto"))
 
72
  ("verbose" (debug-toggle "verbose"))
 
73
  ("events" (debug-toggle "events"))
 
74
  ("std" (debug-toggle "std"))
 
75
  ("io" (debug-toggle "io"))
 
76
  ("bench" (debug-toggle "bench"))
 
77
  ("history" (debug-toggle "history"))
 
78
  ("qt" (debug-toggle "qt"))
 
79
  ("keyboard" (debug-toggle "keyboard"))
 
80
  ("packrat" (debug-toggle "packrat")))