Mercurial > hg > xemacs-beta
comparison lisp/prim/simple.el @ 74:54cc21c15cbb r20-0b32
Import from CVS: tag r20-0b32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:04:33 +0200 |
parents | b9518feda344 |
children | c7528f8e288d |
comparison
equal
deleted
inserted
replaced
73:e2d7a37b7c8d | 74:54cc21c15cbb |
---|---|
859 | 859 |
860 | 860 |
861 ;; XEmacs -- shouldn't these functions keep the zmacs region active? | 861 ;; XEmacs -- shouldn't these functions keep the zmacs region active? |
862 (defun forward-to-indentation (arg) | 862 (defun forward-to-indentation (arg) |
863 "Move forward ARG lines and position at first nonblank character." | 863 "Move forward ARG lines and position at first nonblank character." |
864 (interactive "p") | 864 (interactive "_p") |
865 (forward-line arg) | 865 (forward-line arg) |
866 (skip-chars-forward " \t")) | 866 (skip-chars-forward " \t")) |
867 | 867 |
868 (defun backward-to-indentation (arg) | 868 (defun backward-to-indentation (arg) |
869 "Move backward ARG lines and position at first nonblank character." | 869 "Move backward ARG lines and position at first nonblank character." |
870 (interactive "p") | 870 (interactive "_p") |
871 (forward-line (- arg)) | 871 (forward-line (- arg)) |
872 (skip-chars-forward " \t")) | 872 (skip-chars-forward " \t")) |
873 | 873 |
874 (defvar kill-whole-line nil | 874 (defvar kill-whole-line nil |
875 "*If non-nil, `kill-line' with no arg at beg of line kills the whole line.") | 875 "*If non-nil, `kill-line' with no arg at beg of line kills the whole line.") |
1225 (t (1- arg))))) | 1225 (t (1- arg))))) |
1226 (if (consp arg) | 1226 (if (consp arg) |
1227 ;; This is like exchange-point-and-mark, but doesn't activate the mark. | 1227 ;; This is like exchange-point-and-mark, but doesn't activate the mark. |
1228 ;; It is cleaner to avoid activation, even though the command | 1228 ;; It is cleaner to avoid activation, even though the command |
1229 ;; loop would deactivate the mark because we inserted text. | 1229 ;; loop would deactivate the mark because we inserted text. |
1230 (goto-char (prog1 (mark t) | 1230 ;; (But doesn't work in XEmacs) |
1231 (set-marker (mark-marker) (point) (current-buffer))))) | 1231 ;(goto-char (prog1 (mark t) |
1232 ;(set-marker (mark-marker) (point) (current-buffer))))) | |
1233 (exchange-point-and-mark t)) | |
1232 ;; If we do get all the way thru, make this-command indicate that. | 1234 ;; If we do get all the way thru, make this-command indicate that. |
1233 (setq this-command 'yank) | 1235 (setq this-command 'yank) |
1234 nil) | 1236 nil) |
1235 | 1237 |
1236 (defun rotate-yank-pointer (arg) | 1238 (defun rotate-yank-pointer (arg) |
1532 (widen)) | 1534 (widen)) |
1533 (goto-char position) | 1535 (goto-char position) |
1534 (switch-to-buffer buffer))) | 1536 (switch-to-buffer buffer))) |
1535 | 1537 |
1536 | 1538 |
1537 (defvar next-line-add-newlines t | 1539 ;;; After 8 years of waiting ... -sb |
1540 (defvar next-line-add-newlines nil ; XEmacs | |
1538 "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error.") | 1541 "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error.") |
1539 | 1542 |
1540 (defun next-line (arg) | 1543 (defun next-line (arg) |
1541 "Move cursor vertically down ARG lines. | 1544 "Move cursor vertically down ARG lines. |
1542 If there is no character in the target line exactly under the current column, | 1545 If there is no character in the target line exactly under the current column, |
1898 the comment's starting delimiter.") | 1901 the comment's starting delimiter.") |
1899 | 1902 |
1900 (defconst comment-indent-function | 1903 (defconst comment-indent-function |
1901 ;; XEmacs - add at least one space after the end of the text on the | 1904 ;; XEmacs - add at least one space after the end of the text on the |
1902 ;; current line... | 1905 ;; current line... |
1903 #'(lambda () | 1906 (lambda () |
1904 (save-excursion | 1907 (save-excursion |
1905 (beginning-of-line) | 1908 (beginning-of-line) |
1906 (let ((eol (save-excursion (end-of-line) (point)))) | 1909 (let ((eol (save-excursion (end-of-line) (point)))) |
1907 (and comment-start-skip | 1910 (and comment-start-skip |
1908 (re-search-forward comment-start-skip eol t) | 1911 (re-search-forward comment-start-skip eol t) |
1909 (setq eol (match-beginning 0))) | 1912 (setq eol (match-beginning 0))) |
1910 (goto-char eol) | 1913 (goto-char eol) |
1911 (skip-chars-backward " \t") | 1914 (skip-chars-backward " \t") |
1912 (max comment-column (1+ (current-column)))))) | 1915 (max comment-column (1+ (current-column)))))) |
1913 "Function to compute desired indentation for a comment. | 1916 "Function to compute desired indentation for a comment. |
1914 This function is called with no args with point at the beginning of | 1917 This function is called with no args with point at the beginning of |
1915 the comment's starting delimiter.") | 1918 the comment's starting delimiter.") |
1916 | 1919 |
1917 (defconst block-comment-start nil | 1920 (defconst block-comment-start nil |