• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/

Lines Matching +defs:marker +defs:buffer

32 ;; binary.  For full instructions, invoke `hexl-mode' on an empty buffer and
60 and \"-de\" when dehexlifying a buffer."
90 "Face used in address area of hexl-mode buffer."
95 "Face used in ascii area of hexl-mode buffer."
99 "Maximum offset into hexl buffer.")
126 (make-variable-buffer-local 'hexl-ascii-overlay)
146 This function automatically converts a buffer into the hexl format
147 using the function `hexlify-buffer'.
149 Each line in the buffer has an \"address\" (displayed in hexadecimal)
158 If `hexl-mode' is invoked with an argument the buffer is assumed to be
179 Movement is as simple as movement in a normal Emacs text buffer. Most
183 Advanced cursor movement commands (ala \\[hexl-beginning-of-line], \\[hexl-end-of-line], \\[hexl-beginning-of-buffer], and \\[hexl-end-of-buffer]) are
190 insert itself (actually overstrike) into the buffer.
197 into the buffer at the current point.
200 into the buffer at the current point.
203 into the buffer at the current point.
215 (let ((modified (buffer-modified-p))
220 ;; If `hexl-mode' is invoked with an argument the buffer is assumed to
223 ;; If the buffer's EOL type is -dos, we need to account for
224 ;; extra CR characters added when hexlify-buffer writes the
225 ;; buffer to a file.
227 (when (eq (coding-system-eol-type buffer-file-coding-system) 1)
231 (hexlify-buffer)
232 (restore-buffer-modified-p modified))
234 (let* ((full-lines (/ (buffer-size) 68))
235 (last-line (% (buffer-size) 68))
273 (add-hook 'write-contents-functions 'hexl-save-buffer nil t)
289 (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t)
295 (eldoc-remove-command "hexl-save-buffer"
322 (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t))
327 (defvar hexl-in-save-buffer nil)
329 (defun hexl-save-buffer ()
330 "Save a hexl format buffer as binary in visited file if modified."
332 (if hexl-in-save-buffer nil
333 (restore-buffer-modified-p
334 (if (buffer-modified-p)
335 (let ((buf (generate-new-buffer " hexl"))
336 (name (buffer-name))
340 (with-current-buffer buf
341 (insert-buffer-substring name start end)
342 (set-buffer name)
343 (dehexlify-buffer)
345 (let ((hexl-in-save-buffer t))
346 (save-buffer))
347 (setq modified (buffer-modified-p))
349 (insert-buffer-substring buf start end)
350 (kill-buffer buf)
360 Switch to a buffer visiting file FILENAME, creating one if none exists,
374 With arg, don't unhexlify buffer."
377 (let ((modified (buffer-modified-p))
380 (dehexlify-buffer)
381 (remove-hook 'write-contents-functions 'hexl-save-buffer t)
382 (restore-buffer-modified-p modified)
385 (when (eq (coding-system-eol-type buffer-file-coding-system) 1)
393 (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t)
418 (defun hexl-maybe-dehexlify-buffer ()
419 "Convert a hexl format buffer to binary.
422 (let ((modified (buffer-modified-p))
425 (dehexlify-buffer)
426 (remove-hook 'write-contents-functions 'hexl-save-buffer t)
427 (restore-buffer-modified-p modified)
454 (defun hexl-address-to-marker (address)
455 "Return buffer position for ADDRESS."
465 (goto-char (hexl-address-to-marker address)))
517 (message "End of buffer.")
522 (message "End of buffer.")
528 (message "End of buffer.")
536 (message "Beginning of buffer.")))
556 (message "End of buffer.")
561 (message "End of buffer.")
567 (message "End of buffer.")
575 (message "Beginning of buffer.")))
610 (defun hexl-beginning-of-buffer (arg)
611 "Move to the beginning of the hexl buffer.
618 (defun hexl-end-of-buffer (arg)
638 "Scroll hexl buffer window upward ARG lines; or near full window if no ARG."
646 "Scroll hexl buffer window upward ARG lines; or near full window if no ARG.
708 (defun hexlify-buffer ()
709 "Convert a binary buffer to hexl format.
710 This discards the buffer's undo information."
712 (and (consp buffer-undo-list)
715 (setq buffer-undo-list nil))
718 (coding-system-for-write buffer-file-coding-system)
719 (buffer-undo-list t))
724 ;; coding-system-for-write (i.e. buffer-file-coding-system) which
730 (if (> (point) (hexl-address-to-marker hexl-max-address))
733 (defun dehexlify-buffer ()
734 "Convert a hexl format buffer to binary.
735 This discards the buffer's undo information."
737 (and (consp buffer-undo-list)
740 (setq buffer-undo-list nil))
742 (coding-system-for-read buffer-file-coding-system)
743 (buffer-undo-list t))
786 Non-ASCII characters are first encoded with `buffer-file-coding-system',
789 (coding (if (or (null buffer-file-coding-system)
791 (eq (coding-system-type buffer-file-coding-system) t))
792 default-buffer-file-coding-system
793 buffer-file-coding-system)))
805 ;; cannot be safely encoded with buffer-file-coding-system.
818 "Can't encode `0x%x' with this buffer's coding system; try \\[hexl-insert-hex-string]"
829 Non-ASCII characters are first encoded with `buffer-file-coding-system',
835 "Insert the character CH NUM times in a hexl buffer.
1018 ;; inserting them into the buffer.
1034 (define-key hexl-mode-map [C-home] 'hexl-beginning-of-buffer)
1035 (define-key hexl-mode-map [C-end] 'hexl-end-of-buffer)
1092 (define-key hexl-mode-map "\e<" 'hexl-beginning-of-buffer)
1093 (define-key hexl-mode-map "\e>" 'hexl-end-of-buffer)
1104 (define-key hexl-mode-map "\C-x\C-s" 'hexl-save-buffer)