changeset 79165:4e282ea90733

* hexl.el (hexl-menu): New major mode menu.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sun, 21 Oct 2007 02:41:13 +0000
parents 58e889027356
children 93a637a2f2a0
files lisp/ChangeLog lisp/hexl.el
diffstat 2 files changed, 42 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Oct 21 01:01:33 2007 +0000
+++ b/lisp/ChangeLog	Sun Oct 21 02:41:13 2007 +0000
@@ -1,3 +1,7 @@
+2007-10-21  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* hexl.el (hexl-menu): New major mode menu.
+
 2007-10-20  Glenn Morris  <rgm@gnu.org>
 
 	* progmodes/f90.el (f90-font-lock-keywords-2)
--- a/lisp/hexl.el	Sun Oct 21 01:01:33 2007 +0000
+++ b/lisp/hexl.el	Sun Oct 21 02:41:13 2007 +0000
@@ -457,7 +457,7 @@
   (+ (* (/ address 16) 68) 10 (point-min) (/ (* (% address 16) 5) 2)))
 
 (defun hexl-goto-address (address)
-  "Goto hexl-mode (decimal) address ADDRESS.
+  "Go to hexl-mode (decimal) address ADDRESS.
 Signal error if ADDRESS is out of range."
   (interactive "nAddress: ")
   (if (or (< address 0) (> address hexl-max-address))
@@ -1104,6 +1104,43 @@
   (define-key hexl-mode-map "\C-x\C-s" 'hexl-save-buffer)
   (define-key hexl-mode-map "\C-x\C-t" 'undefined))
 
+(easy-menu-define hexl-menu hexl-mode-map "Hexl Mode menu"
+  `("Hexl"
+    :help "Hexl-specific Features"
+
+    ["Backward short" hexl-backward-short
+     :help "Move to left a short"]
+    ["Forward short" hexl-forward-short
+     :help "Move to right a short"]
+    ["Backward word" hexl-backward-short
+     :help "Move to left a word"]
+    ["Forward word" hexl-forward-short
+     :help "Move to right a word"]
+    "-"
+    ["Beginning of 512b page" hexl-beginning-of-512b-page
+     :help "Go to beginning of 512 byte boundary"]
+    ["End of 512b page" hexl-end-of-512b-page
+     :help "Go to end of 512 byte boundary"]
+    ["Beginning of 1K page" hexl-beginning-of-1k-page
+     :help "Go to beginning of 1KB boundary"]
+    ["End of 1K page" hexl-end-of-1k-page
+     :help "Go to end of 1KB boundary"]
+    "-"
+    ["Go to address" hexl-goto-address
+     :help "Go to hexl-mode (decimal) address"]
+    ["Go to address" hexl-goto-hex-address
+     :help "Go to hexl-mode (hex string) address"]
+    "-"
+    ["Insert decimal char" hexl-insert-decimal-char
+     :help "Insert a character given by its decimal code"]
+    ["Insert hex char" hexl-insert-hex-char
+     :help "Insert a character given by its hexadecimal code"]
+    ["Insert octal char" hexl-insert-octal-char
+     :help "Insert a character given by its octal code"]
+    "-"
+    ["Exit hexl mode" hexl-mode-exit
+     :help "Exit hexl mode returning to previous mode"]))
+
 (provide 'hexl)
 
 ;; arch-tag: d5a7aa8a-9bce-480b-bcff-6c4c7ca5ea4a