aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-11-23 18:34:44 +0000
committerStefan Monnier2006-11-23 18:34:44 +0000
commit312d24fbde1d80e5ea823de511eb362f16bac582 (patch)
tree634f311053f081bd2c8b0d34797fdf39845bbd5e
parent5978ab2c977ad4b14419b9f55dd5c694ca40af84 (diff)
downloademacs-312d24fbde1d80e5ea823de511eb362f16bac582.tar.gz
emacs-312d24fbde1d80e5ea823de511eb362f16bac582.zip
(hexl-mode): Don't try to guess the max-address: get it from the horse's mouth.
(hexlify-buffer): Don't re-encode an arg that's already encoded.
-rw-r--r--lisp/ChangeLog106
-rw-r--r--lisp/hexl.el30
2 files changed, 66 insertions, 70 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7f37210e820..2eb85221b32 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,13 @@
12006-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * hexl.el (hexl-mode): Don't try to guess the max-address: get it from
4 the horse's mouth.
5 (hexlify-buffer): Don't re-encode an arg that's already encoded.
6
12006-11-23 Michael Kifer <kifer@cs.stonybrook.edu> 72006-11-23 Michael Kifer <kifer@cs.stonybrook.edu>
2 8
3 * ediff-diff.el (ediff-exec-process, ediff-same-file-contents): remove 9 * ediff-diff.el (ediff-exec-process, ediff-same-file-contents):
4 condition-case. 10 Remove condition-case.
5 11
62006-11-23 Glenn Morris <rgm@gnu.org> 122006-11-23 Glenn Morris <rgm@gnu.org>
7 13
@@ -29,19 +35,19 @@
29 35
302006-11-21 Diane Murray <disumu@x3y2z1.net> (tiny change) 362006-11-21 Diane Murray <disumu@x3y2z1.net> (tiny change)
31 37
32 * thingatpt.el (thing-at-point-uri-schemes): Added schemes that 38 * thingatpt.el (thing-at-point-uri-schemes): Add schemes that
33 are new to the list at IANA. Also added irc, mms, mmsh. 39 are new to the list at IANA. Also added irc, mms, mmsh.
34 40
352006-11-20 J.D. Smith <jdsmith@as.arizona.edu> 412006-11-20 J.D. Smith <jdsmith@as.arizona.edu>
36 42
37 * progmodes/idlw-help.el (idlwave-html-help-location): Fail 43 * progmodes/idlw-help.el (idlwave-html-help-location):
38 gracefully for missing help packages. 44 Fail gracefully for missing help packages.
39 (idlwave-help-assistant-open-link): Open full links. 45 (idlwave-help-assistant-open-link): Open full links.
40 (idlwave-help-assistant-help-with-topic): Direct help link. 46 (idlwave-help-assistant-help-with-topic): Direct help link.
41 47
42 * progmodes/idlwave.el (idlwave-mode): Set 48 * progmodes/idlwave.el (idlwave-mode):
43 add-log-current-defun-function. 49 Set add-log-current-defun-function.
44 (idlwave-current-routine-fullname): Added, to support add-log. 50 (idlwave-current-routine-fullname): Add, to support add-log.
45 (idlwave-convert-xml-system-routine-info): Simplify XML parsing 51 (idlwave-convert-xml-system-routine-info): Simplify XML parsing
46 to reflect improvements to xml-parse-file. 52 to reflect improvements to xml-parse-file.
47 (idlwave-mode-menu-def): New binding for help-with-topic. 53 (idlwave-mode-menu-def): New binding for help-with-topic.
@@ -123,7 +129,7 @@
1232006-11-17 Carsten Dominik <dominik@science.uva.nl> 1292006-11-17 Carsten Dominik <dominik@science.uva.nl>
124 130
125 * textmodes/org.el (org-scan-tags): Re-align code fixed. 131 * textmodes/org.el (org-scan-tags): Re-align code fixed.
126 (org-detach-overlay): Renamed from `org-detatch-overlay'. 132 (org-detach-overlay): Rename from `org-detatch-overlay'.
127 (org-table-convert-region): Insert space after column separator. 133 (org-table-convert-region): Insert space after column separator.
128 (org-agenda-kill): New command. 134 (org-agenda-kill): New command.
129 (org-metaleft): Call `org-outdent-item' on bullets. 135 (org-metaleft): Call `org-outdent-item' on bullets.
@@ -280,8 +286,8 @@
280 Delete support for old versions of `align'. 286 Delete support for old versions of `align'.
281 (ada-search-prev-end-stmt): Handle additional keyword `private'. 287 (ada-search-prev-end-stmt): Handle additional keyword `private'.
282 (ada-check-defun-name): Simplify handling of `declare'. 288 (ada-check-defun-name): Simplify handling of `declare'.
283 (ada-goto-matching-start): Handle nested `begin ... end'. Handle 289 (ada-goto-matching-start): Handle nested `begin ... end'.
284 `declare', `protected', `procedure', `function'. 290 Handle `declare', `protected', `procedure', `function'.
285 (ada-create-menu): Presence of arm95 is not conditional on using 291 (ada-create-menu): Presence of arm95 is not conditional on using
286 GNAT compiler. 292 GNAT compiler.
287 293
@@ -364,15 +370,14 @@
3642006-11-10 Carsten Dominik <carsten.dominik@gmail.com> 3702006-11-10 Carsten Dominik <carsten.dominik@gmail.com>
365 371
366 * textmodes/org.el (org-show-hierarchy-above) 372 * textmodes/org.el (org-show-hierarchy-above)
367 (org-show-following-heading): Fixed typo in default value. 373 (org-show-following-heading): Fix typo in default value.
368 (org-scan-tags): Make the search case-sensitive. 374 (org-scan-tags): Make the search case-sensitive.
369 (org-tags-sparse-tree): Don't overrule 375 (org-tags-sparse-tree): Don't overrule
370 `org-show-following-heading' and `org-show-hierarchy-above'. 376 `org-show-following-heading' and `org-show-hierarchy-above'.
371 (org-reveal): New command. 377 (org-reveal): New command.
372 (org-show-context): Renamed from `org-show-hierarchy-above'. 378 (org-show-context): Rename from `org-show-hierarchy-above'.
373 (org-fast-tag-selection-single-key): New option. 379 (org-fast-tag-selection-single-key): New option.
374 (org-fast-tag-show-exit, org-set-current-tags-overlay): New 380 (org-fast-tag-show-exit, org-set-current-tags-overlay): New functions.
375 functions.
376 (org-tags-overlay): New variable. 381 (org-tags-overlay): New variable.
377 (org-agenda-todo-ignore-deadlines): New option. 382 (org-agenda-todo-ignore-deadlines): New option.
378 ("session"): Add circular data structure `org-mark-ring' to 383 ("session"): Add circular data structure `org-mark-ring' to
@@ -380,32 +385,29 @@
380 (org-agenda-window-setup, org-agenda-restore-windows-after-quit): 385 (org-agenda-window-setup, org-agenda-restore-windows-after-quit):
381 New options. 386 New options.
382 (org-agenda-quit): Use `org-agenda-restore-windows-after-quit'. 387 (org-agenda-quit): Use `org-agenda-restore-windows-after-quit'.
383 (org-prepare-agenda, org-agenda-quit): Use 388 (org-prepare-agenda, org-agenda-quit): Use `org-agenda-window-setup'.
384 `org-agenda-window-setup'. 389 (org-pre-agenda-window-conf, org-blank-before-new-entry): New vars.
385 (org-pre-agenda-window-conf, org-blank-before-new-entry): New
386 variables.
387 (org-finalize-agenda): Activate bracket links in agenda. 390 (org-finalize-agenda): Activate bracket links in agenda.
388 (org-at-timestamp-p, org-at-date-range-p): Additional argument 391 (org-at-timestamp-p, org-at-date-range-p): Additional argument
389 INACTIVE-OK. 392 INACTIVE-OK.
390 (org-show-hierarchy-above, org-show-following-heading): List 393 (org-show-hierarchy-above, org-show-following-heading):
391 values allowed for fine-tuned configuration. 394 List values allowed for fine-tuned configuration.
392 (org-show-hierarchy-above): New argument CONTEXT, use the 395 (org-show-hierarchy-above): New argument CONTEXT, use the
393 fine-tuned settings in `org-show-hierarchy-above' and 396 fine-tuned settings in `org-show-hierarchy-above' and
394 `org-show-following-heading'. 397 `org-show-following-heading'.
395 (org-display-custom-time): New function. 398 (org-display-custom-time): New function.
396 (org-toggle-time-stamp-overlays, org-insert-time-stamp): New 399 (org-toggle-time-stamp-overlays, org-insert-time-stamp): New function.
397 function.
398 (org-display-custom-times, org-time-stamp-custom-formats): 400 (org-display-custom-times, org-time-stamp-custom-formats):
399 (org-maybe-intangible): New macro. 401 (org-maybe-intangible): New macro.
400 (org-activate-bracket-links, org-hide-wide-columns): Use 402 (org-activate-bracket-links, org-hide-wide-columns):
401 `org-maybe-intangible'. 403 Use `org-maybe-intangible'.
402 (org-open-file): Use `shell-quote-argument'. 404 (org-open-file): Use `shell-quote-argument'.
403 (org-display-internal-link-with-indirect-buffer): New option. 405 (org-display-internal-link-with-indirect-buffer): New option.
404 (org-file-remote-p): Get regexp from list. 406 (org-file-remote-p): Get regexp from list.
405 (org-link-expand-abbrev): New function. 407 (org-link-expand-abbrev): New function.
406 (org-link-abbrev-alist): New option. 408 (org-link-abbrev-alist): New option.
407 (org-open-at-point, org-cleaned-string-for-export): Call 409 (org-open-at-point, org-cleaned-string-for-export):
408 `org-link-expand-abbrev'. 410 Call `org-link-expand-abbrev'.
409 (org-timeline, org-agenda-list, org-todo-list) 411 (org-timeline, org-agenda-list, org-todo-list)
410 (org-tags-view): Remove the KEEP-MODES argument. 412 (org-tags-view): Remove the KEEP-MODES argument.
411 (org-finalize-agenda-hook): New hook. 413 (org-finalize-agenda-hook): New hook.
@@ -414,8 +416,7 @@
414 (org-open-at-point): Call `org-follow-timestamp-link'. 416 (org-open-at-point): Call `org-follow-timestamp-link'.
415 (org-log-note-marker, org-log-note-purpose) 417 (org-log-note-marker, org-log-note-purpose)
416 (org-log-note-window-configuration): New variables. 418 (org-log-note-window-configuration): New variables.
417 (org-add-log-maybe, org-add-log-note, org-store-log-note): New 419 (org-add-log-maybe, org-add-log-note, org-store-log-note): New funs.
418 functions.
419 (org-log-note-headings): New option. 420 (org-log-note-headings): New option.
420 (org-dblock-write:clocktable): Bug fix, removed infinite loop. 421 (org-dblock-write:clocktable): Bug fix, removed infinite loop.
421 (org-store-link): Support for dired-mode. 422 (org-store-link): Support for dired-mode.
@@ -430,14 +431,12 @@
430 the text property inticating the agenda type. 431 the text property inticating the agenda type.
431 (org-agenda-post-command-hook): Get agenda type from text property 432 (org-agenda-post-command-hook): Get agenda type from text property
432 at point. 433 at point.
433 (org-agenda): Handle command sets. Set 434 (org-agenda): Handle command sets. Set `org-agenda-last-arguments'
434 `org-agenda-last-arguments' and obey 435 and obey `org-agenda-overriding-arguments'.
435 `org-agenda-overriding-arguments'. 436 (org-agenda-overriding-arguments, org-agenda-last-arguments): New vars.
436 (org-agenda-overriding-arguments, org-agenda-last-arguments): New
437 variables.
438 (org-agenda-goto-today, org-agenda-later, org-agenda-earlier) 437 (org-agenda-goto-today, org-agenda-later, org-agenda-earlier)
439 (org-agenda-week-view, org-agenda-day-view): Use 438 (org-agenda-week-view, org-agenda-day-view):
440 `org-agenda-overriding-arguments' to make updating work with 439 Use `org-agenda-overriding-arguments' to make updating work with
441 multi-block agendas. 440 multi-block agendas.
442 (org-agenda-prefix-format): Allow different formats for the 441 (org-agenda-prefix-format): Allow different formats for the
443 different agenda entry types. 442 different agenda entry types.
@@ -448,11 +447,11 @@
448 `org-select-agenda-window' instead. 447 `org-select-agenda-window' instead.
449 (org-respect-restriction): Variable removed. 448 (org-respect-restriction): Variable removed.
450 (org-cmp-tag): New function. 449 (org-cmp-tag): New function.
451 (org-agenda-sorting-strategy, org-entries-lessp): Implement 450 (org-agenda-sorting-strategy, org-entries-lessp):
452 sorting by last tag. 451 Implement sorting by last tag.
453 (org-complete): Better completion in in-buffer option lines. 452 (org-complete): Better completion in in-buffer option lines.
454 (org-in-item-p): New function. 453 (org-in-item-p): New function.
455 (org-org-menu): Added entries for checkboxes. 454 (org-org-menu): Add entries for checkboxes.
456 (org-cycle): Extra brouping in outline-regexp, because it is used 455 (org-cycle): Extra brouping in outline-regexp, because it is used
457 in a search with "^" prepended. 456 in a search with "^" prepended.
458 (org-provide-checkbox-statistics): New option. 457 (org-provide-checkbox-statistics): New option.
@@ -460,16 +459,16 @@
460 (org-update-checkbox-count-maybe) 459 (org-update-checkbox-count-maybe)
461 (org-get-checkbox-statistics-face): New functions. 460 (org-get-checkbox-statistics-face): New functions.
462 (org-update-checkbox-count): New command. 461 (org-update-checkbox-count): New command.
463 (org-insert-item, org-toggle-checkbox): Call 462 (org-insert-item, org-toggle-checkbox):
464 `org-update-checkbox-count-maybe'. 463 Call `org-update-checkbox-count-maybe'.
465 (org-export-as-html): XEmacs compatibility for coding system. 464 (org-export-as-html): XEmacs compatibility for coding system.
466 (org-force-cycle-archived): New command. 465 (org-force-cycle-archived): New command.
467 (org-cycle-hide-archived-subtrees): Display message when ARCHIVE 466 (org-cycle-hide-archived-subtrees): Display message when ARCHIVE
468 overrules cycling. 467 overrules cycling.
469 (org-fix-position-after-promote): If the line contains only a todo 468 (org-fix-position-after-promote): If the line contains only a todo
470 keyword, add a final space. 469 keyword, add a final space.
471 (org-promote-subtree, org-demote-subtree): Call 470 (org-promote-subtree, org-demote-subtree):
472 `org-fix-position-after-promote'. 471 Call `org-fix-position-after-promote'.
473 472
4742006-11-10 Glenn Morris <rgm@gnu.org> 4732006-11-10 Glenn Morris <rgm@gnu.org>
475 474
@@ -575,8 +574,8 @@
575 574
5762006-11-08 Kenichi Handa <handa@m17n.org> 5752006-11-08 Kenichi Handa <handa@m17n.org>
577 576
578 * international/mule-cmds.el (set-default-coding-systems): Always 577 * international/mule-cmds.el (set-default-coding-systems):
579 set default-file-name-coding-system to utf-8 for Mac Darwin. 578 Always set default-file-name-coding-system to utf-8 for Mac Darwin.
580 579
5812006-11-08 Juanma Barranquero <lekktu@gmail.com> 5802006-11-08 Juanma Barranquero <lekktu@gmail.com>
582 581
@@ -811,8 +810,7 @@
811 810
8122006-11-04 Yoni Rabkin Katzenell <yoni-r@actcom.com> (tiny change) 8112006-11-04 Yoni Rabkin Katzenell <yoni-r@actcom.com> (tiny change)
813 812
814 * faces.el (faces-sample-overlay, describe-face): Revert last 813 * faces.el (faces-sample-overlay, describe-face): Revert last changes.
815 changes.
816 (faces-sample-overlay): Remove variable. 814 (faces-sample-overlay): Remove variable.
817 (describe-face): Insert sample text in the face being described. 815 (describe-face): Insert sample text in the face being described.
818 816
@@ -823,12 +821,12 @@
823 (whitespace-buffer): Use `remove-overlays' instead of 821 (whitespace-buffer): Use `remove-overlays' instead of
824 `whitespace-unhighlight-the-space' and `overlay-recenter' to 822 `whitespace-unhighlight-the-space' and `overlay-recenter' to
825 speed up overlay handling. 823 speed up overlay handling.
826 (whitespace-buffer-leading, whitespace-buffer-trailing): Make 824 (whitespace-buffer-leading, whitespace-buffer-trailing):
827 these functions highlight the text removed by 825 Make these functions highlight the text removed by
828 `whitespace-buffer-leading-cleanup' and 826 `whitespace-buffer-leading-cleanup' and
829 `whitespace-buffer-trailing-cleanup' respectively. 827 `whitespace-buffer-trailing-cleanup' respectively.
830 (whitespace-buffer-search): Use `with-local-quit'. Move 828 (whitespace-buffer-search): Use `with-local-quit'.
831 `format' out of loop to speed up scanning larger buffers. 829 Move `format' out of loop to speed up scanning larger buffers.
832 (whitespace-unhighlight-the-space): Remove `remove-hook' since 830 (whitespace-unhighlight-the-space): Remove `remove-hook' since
833 that function is never added to a hook. 831 that function is never added to a hook.
834 (whitespace-spacetab-regexp, whitespace-ateol-regexp) 832 (whitespace-spacetab-regexp, whitespace-ateol-regexp)
@@ -859,7 +857,7 @@
859 (allout-deannotate-hidden): New function to remove was-hidden 857 (allout-deannotate-hidden): New function to remove was-hidden
860 annotation. 858 annotation.
861 (allout-hide-by-annotation): Use new allout-deannotate-hidden. 859 (allout-hide-by-annotation): Use new allout-deannotate-hidden.
862 (allout-remove-exposure-annotation): Replaced by 860 (allout-remove-exposure-annotation): Replace by
863 allout-deannotate-hidden. 861 allout-deannotate-hidden.
864 (allout-yank-processing): Signal that yank processing is happening 862 (allout-yank-processing): Signal that yank processing is happening
865 with allout-during-yank-processing. Also, wrap 863 with allout-during-yank-processing. Also, wrap
@@ -985,10 +983,10 @@
985 983
9862006-10-30 Lennart Borgman <lennart.borgman.073@student.lu.se> 9842006-10-30 Lennart Borgman <lennart.borgman.073@student.lu.se>
987 985
988 * help-fns.el (help-with-tutorial): Moved to tutorial.el. 986 * help-fns.el (help-with-tutorial): Move to tutorial.el.
989 987
990 * tutorial.el: New file. 988 * tutorial.el: New file.
991 (help-with-tutorial): Moved here from help-fns.el. Added help for 989 (help-with-tutorial): Move here from help-fns.el. Added help for
992 rebound keys. Fixed resume of tutorial. 990 rebound keys. Fixed resume of tutorial.
993 (tutorial--describe-nonstandard-key, tutorial--sort-keys) 991 (tutorial--describe-nonstandard-key, tutorial--sort-keys)
994 (tutorial--find-changed-keys, tutorial--display-changes) 992 (tutorial--find-changed-keys, tutorial--display-changes)
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 47bfc76940c..ff7c4bf480e 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -207,31 +207,27 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
207 (unless (eq major-mode 'hexl-mode) 207 (unless (eq major-mode 'hexl-mode)
208 (let ((modified (buffer-modified-p)) 208 (let ((modified (buffer-modified-p))
209 (inhibit-read-only t) 209 (inhibit-read-only t)
210 (original-point (- (point) (point-min))) 210 (original-point (- (point) (point-min))))
211 max-address)
212 (and (eobp) (not (bobp)) 211 (and (eobp) (not (bobp))
213 (setq original-point (1- original-point))) 212 (setq original-point (1- original-point)))
214 (if (not (or (eq arg 1) (not arg))) 213 ;; If `hexl-mode' is invoked with an argument the buffer is assumed to
215 ;; if no argument then we guess at hexl-max-address 214 ;; be in hexl format.
216 (setq max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15)) 215 (when (memq arg '(1 nil))
217 (setq max-address (1- (buffer-size)))
218 ;; If the buffer's EOL type is -dos, we need to account for 216 ;; If the buffer's EOL type is -dos, we need to account for
219 ;; extra CR characters added when hexlify-buffer writes the 217 ;; extra CR characters added when hexlify-buffer writes the
220 ;; buffer to a file. 218 ;; buffer to a file.
219 ;; FIXME: This doesn't take into account multibyte coding systems.
221 (when (eq (coding-system-eol-type buffer-file-coding-system) 1) 220 (when (eq (coding-system-eol-type buffer-file-coding-system) 1)
222 (setq max-address (+ (count-lines (point-min) (point-max)) 221 (setq original-point (+ (count-lines (point-min) (point))
223 max-address))
224 ;; But if there's no newline at the last line, we are off by
225 ;; one; adjust.
226 (or (eq (char-before (point-max)) ?\n)
227 (setq max-address (1- max-address)))
228 (setq original-point (+ (count-lines (point-min) (point))
229 original-point)) 222 original-point))
230 (or (bolp) (setq original-point (1- original-point)))) 223 (or (bolp) (setq original-point (1- original-point))))
231 (hexlify-buffer) 224 (hexlify-buffer)
232 (restore-buffer-modified-p modified)) 225 (restore-buffer-modified-p modified))
233 (make-local-variable 'hexl-max-address) 226 (set (make-local-variable 'hexl-max-address)
234 (setq hexl-max-address max-address) 227 (let* ((full-lines (/ (buffer-size) 68))
228 (last-line (% (buffer-size) 68))
229 (last-line-bytes (% last-line 52)))
230 (+ last-line-bytes (* full-lines 16) -1)))
235 (condition-case nil 231 (condition-case nil
236 (hexl-goto-address original-point) 232 (hexl-goto-address original-point)
237 (error nil))) 233 (error nil)))
@@ -709,7 +705,9 @@ This discards the buffer's undo information."
709 ;; Manually encode the args, otherwise they're encoded using 705 ;; Manually encode the args, otherwise they're encoded using
710 ;; coding-system-for-write (i.e. buffer-file-coding-system) which 706 ;; coding-system-for-write (i.e. buffer-file-coding-system) which
711 ;; may not be what we want (e.g. utf-16 on a non-utf-16 system). 707 ;; may not be what we want (e.g. utf-16 on a non-utf-16 system).
712 (mapcar (lambda (s) (encode-coding-string s locale-coding-system)) 708 (mapcar (lambda (s)
709 (if (not (multibyte-string-p s)) s
710 (encode-coding-string s locale-coding-system)))
713 (split-string hexl-options))) 711 (split-string hexl-options)))
714 (if (> (point) (hexl-address-to-marker hexl-max-address)) 712 (if (> (point) (hexl-address-to-marker hexl-max-address))
715 (hexl-goto-address hexl-max-address)))) 713 (hexl-goto-address hexl-max-address))))