Mercurial > hg > xemacs-beta
comparison lisp/simple.el @ 5684:0eb4e96fd261
#'delete-trailing-whitespace needs to work when the region is inactive, too
lisp/ChangeLog addition:
Update its interactive spec to work correctly in XEmacs.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 08 Sep 2012 16:33:48 +0100 |
parents | 98f762d06c5f |
children | 94a6b8fbd56e |
comparison
equal
deleted
inserted
replaced
5683:98f762d06c5f | 5684:0eb4e96fd261 |
---|---|
389 | 389 |
390 If this command acts on the entire buffer (i.e. if called | 390 If this command acts on the entire buffer (i.e. if called |
391 interactively with the mark inactive, or called from Lisp with | 391 interactively with the mark inactive, or called from Lisp with |
392 END nil), it also deletes all trailing lines at the end of the | 392 END nil), it also deletes all trailing lines at the end of the |
393 buffer if the variable `delete-trailing-lines' is non-nil." | 393 buffer if the variable `delete-trailing-lines' is non-nil." |
394 ;; XEmacs; "*r" instead of re-implementing it. | 394 (interactive (progn |
395 (interactive "*r") | 395 (barf-if-buffer-read-only) |
396 (if (if zmacs-regions | |
397 zmacs-region-active-p | |
398 (eq (marker-buffer (mark-marker t)) (current-buffer))) | |
399 (list (region-beginning) (region-end)) | |
400 (list nil nil)))) | |
396 (save-match-data | 401 (save-match-data |
397 (save-excursion | 402 (save-excursion |
398 (let ((end-marker (copy-marker (or end (point-max)))) | 403 (let ((end-marker (copy-marker (or end (point-max)))) |
399 (start (or start (point-min)))) | 404 (start (or start (point-min)))) |
400 (goto-char start) | 405 (goto-char start) |