diff options
| author | Phillip Rulon | 1999-10-09 01:19:36 +0000 |
|---|---|---|
| committer | Phillip Rulon | 1999-10-09 01:19:36 +0000 |
| commit | 330bd7c39b44338d31d6c72a0bca8c1b475cddb3 (patch) | |
| tree | 72f2bd4abef69d8c2592fe0692e098a28830cd37 | |
| parent | 62f1e1cd5997194fa774063ea79af8973caf85a1 (diff) | |
| download | emacs-330bd7c39b44338d31d6c72a0bca8c1b475cddb3.tar.gz emacs-330bd7c39b44338d31d6c72a0bca8c1b475cddb3.zip | |
* hexl.el (hexl-mode): Do nothing if already in hexl mode.
| -rw-r--r-- | lisp/hexl.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el index 4a5d12c28e9..e5d55b43ca4 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el | |||
| @@ -122,8 +122,10 @@ and \"-de\" when dehexlifying a buffer." | |||
| 122 | 122 | ||
| 123 | ;;;###autoload | 123 | ;;;###autoload |
| 124 | (defun hexl-mode (&optional arg) | 124 | (defun hexl-mode (&optional arg) |
| 125 | "\\<hexl-mode-map> | 125 | "\\<hexl-mode-map>A mode for editing binary files in hex dump format. |
| 126 | A major mode for editing binary files in hex dump format. | 126 | This is not an ordinary major mode; it alters some aspects |
| 127 | if the current mode's behavior, but not all; also, you can exit | ||
| 128 | Hexl mode and return to the previous mode using `hexl-mode-exit'. | ||
| 127 | 129 | ||
| 128 | This function automatically converts a buffer into the hexl format | 130 | This function automatically converts a buffer into the hexl format |
| 129 | using the function `hexlify-buffer'. | 131 | using the function `hexlify-buffer'. |
| @@ -189,13 +191,11 @@ into the buffer at the current point. | |||
| 189 | Note: saving the file with any of the usual Emacs commands | 191 | Note: saving the file with any of the usual Emacs commands |
| 190 | will actually convert it back to binary format while saving. | 192 | will actually convert it back to binary format while saving. |
| 191 | 193 | ||
| 192 | You can use \\[hexl-find-file] to visit a file in hexl-mode. | 194 | You can use \\[hexl-find-file] to visit a file in Hexl mode. |
| 193 | 195 | ||
| 194 | \\[describe-bindings] for advanced commands." | 196 | \\[describe-bindings] for advanced commands." |
| 195 | (interactive "p") | 197 | (interactive "p") |
| 196 | (if (eq major-mode 'hexl-mode) | 198 | (unless (eq major-mode 'hexl-mode) |
| 197 | (error "You are already in hexl mode") | ||
| 198 | |||
| 199 | (let ((modified (buffer-modified-p)) | 199 | (let ((modified (buffer-modified-p)) |
| 200 | (inhibit-read-only t) | 200 | (inhibit-read-only t) |
| 201 | (original-point (1- (point))) | 201 | (original-point (1- (point))) |