Mercurial > hg > xemacs-beta
comparison lisp/simple.el @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | 6719134a07c2 |
children | 2f8bb876ab1d |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
60 ;; 97/3/14 Jareth Hein (jhod@po.iijnet.or.jp) added kinsoku processing (support | 60 ;; 97/3/14 Jareth Hein (jhod@po.iijnet.or.jp) added kinsoku processing (support |
61 ;; for filling of Asian text) into the fill code. This was ripped bleeding from | 61 ;; for filling of Asian text) into the fill code. This was ripped bleeding from |
62 ;; Mule-2.3, and could probably use some feature additions (like additional wrap | 62 ;; Mule-2.3, and could probably use some feature additions (like additional wrap |
63 ;; styles, etc) | 63 ;; styles, etc) |
64 | 64 |
65 ;; 97/06/11 Steve Baur (steve@altair.xemacs.org) Convert use of | 65 ;; 97/06/11 Steve Baur (steve@xemacs.org) Convert use of |
66 ;; (preceding|following)-char to char-(after|before). | 66 ;; (preceding|following)-char to char-(after|before). |
67 | 67 |
68 ;;; Code: | 68 ;;; Code: |
69 | 69 |
70 (defgroup editing-basics nil | 70 (defgroup editing-basics nil |
431 ;; XEmacs: In overwrite mode, back over columns while clearing them out, | 431 ;; XEmacs: In overwrite mode, back over columns while clearing them out, |
432 ;; unless at end of line. | 432 ;; unless at end of line. |
433 (and overwrite-mode (not (eolp)) | 433 (and overwrite-mode (not (eolp)) |
434 (save-excursion (insert-char ?\ arg)))) | 434 (save-excursion (insert-char ?\ arg)))) |
435 | 435 |
436 (defcustom delete-key-deletes-forward nil | 436 (defcustom delete-key-deletes-forward t |
437 "*If non-nil, the DEL key will erase one character forwards. | 437 "*If non-nil, the DEL key will erase one character forwards. |
438 If nil, the DEL key will erase one character backwards." | 438 If nil, the DEL key will erase one character backwards." |
439 :type 'boolean | 439 :type 'boolean |
440 :group 'editing-basics) | 440 :group 'editing-basics) |
441 | 441 |
668 (message "Buffer has %d lines, %d characters" | 668 (message "Buffer has %d lines, %d characters" |
669 cnt (- (point-max) (point-min))) | 669 cnt (- (point-max) (point-min))) |
670 cnt))) | 670 cnt))) |
671 | 671 |
672 ;;; Modified by Bob Weiner, 8/24/95, to print narrowed line number also. | 672 ;;; Modified by Bob Weiner, 8/24/95, to print narrowed line number also. |
673 ;;; Expanded by Bob Weiner, Altrasoft, on 02/12/1997 | 673 ;;; Expanded by Bob Weiner, BeOpen, on 02/12/1997 |
674 (defun what-line () | 674 (defun what-line () |
675 "Print the following variants of the line number of point: | 675 "Print the following variants of the line number of point: |
676 Region line - displayed line within the active region | 676 Region line - displayed line within the active region |
677 Collapsed line - includes only selectively displayed lines; | 677 Collapsed line - includes only selectively displayed lines; |
678 Buffer line - physical line in the buffer; | 678 Buffer line - physical line in the buffer; |
2590 (fill-point | 2590 (fill-point |
2591 (let ((opoint (point)) | 2591 (let ((opoint (point)) |
2592 bounce | 2592 bounce |
2593 ;; 97/3/14 jhod: Kinsoku | 2593 ;; 97/3/14 jhod: Kinsoku |
2594 (re-break-point (if (featurep 'mule) | 2594 (re-break-point (if (featurep 'mule) |
2595 (concat "[ \t\n]\\|" word-across-newline) | 2595 (concat "[ \t\n]\\|" word-across-newline |
2596 ".\\|." word-across-newline) | |
2596 "[ \t\n]")) | 2597 "[ \t\n]")) |
2597 ;; end patch | 2598 ;; end patch |
2598 (first t)) | 2599 (first t)) |
2599 (save-excursion | 2600 (save-excursion |
2600 (move-to-column (1+ fill-column)) | 2601 (move-to-column (1+ fill-column)) |
2653 ;; Otherwise, if a comment prefix or fill-prefix is inserted, | 2654 ;; Otherwise, if a comment prefix or fill-prefix is inserted, |
2654 ;; point will end up before it rather than after it. | 2655 ;; point will end up before it rather than after it. |
2655 (if (save-excursion | 2656 (if (save-excursion |
2656 (skip-chars-backward " \t") | 2657 (skip-chars-backward " \t") |
2657 (= (point) fill-point)) | 2658 (= (point) fill-point)) |
2659 ;; 1999-09-17 hniksic: turn off Kinsoku until | |
2660 ;; it's debugged. | |
2661 (indent-new-comment-line) | |
2658 ;; 97/3/14 jhod: Kinsoku processing | 2662 ;; 97/3/14 jhod: Kinsoku processing |
2659 ;(indent-new-comment-line) | 2663 ; ;(indent-new-comment-line) |
2660 (let ((spacep (memq (char-before (point)) '(?\ ?\t)))) | 2664 ; (let ((spacep (memq (char-before (point)) '(?\ ?\t)))) |
2661 (funcall comment-line-break-function) | 2665 ; (funcall comment-line-break-function) |
2662 ;; if user type space explicitly, leave SPC | 2666 ; ;; if user type space explicitly, leave SPC |
2663 ;; even if there is no WAN. | 2667 ; ;; even if there is no WAN. |
2664 (if spacep | 2668 ; (if spacep |
2665 (save-excursion | 2669 ; (save-excursion |
2666 (goto-char fill-point) | 2670 ; (goto-char fill-point) |
2667 ;; put SPC except that there is SPC | 2671 ; ;; put SPC except that there is SPC |
2668 ;; already or there is sentence end. | 2672 ; ;; already or there is sentence end. |
2669 (or (memq (char-after (point)) '(?\ ?\t)) | 2673 ; (or (memq (char-after (point)) '(?\ ?\t)) |
2670 (fill-end-of-sentence-p) | 2674 ; (fill-end-of-sentence-p) |
2671 (insert ?\ ))))) | 2675 ; (insert ?\ ))))) |
2672 (save-excursion | 2676 (save-excursion |
2673 (goto-char fill-point) | 2677 (goto-char fill-point) |
2674 (funcall comment-line-break-function))) | 2678 (funcall comment-line-break-function))) |
2675 ;; If making the new line didn't reduce the hpos of | 2679 ;; If making the new line didn't reduce the hpos of |
2676 ;; the end of the line, then give up now; | 2680 ;; the end of the line, then give up now; |
2887 (setq comstart | 2891 (setq comstart |
2888 (buffer-substring (point) (match-end 0))))))) | 2892 (buffer-substring (point) (match-end 0))))))) |
2889 (if (and comcol (not fill-prefix)) ; XEmacs - (ENE) from fa-extras. | 2893 (if (and comcol (not fill-prefix)) ; XEmacs - (ENE) from fa-extras. |
2890 (let ((comment-column comcol) | 2894 (let ((comment-column comcol) |
2891 (comment-start comstart) | 2895 (comment-start comstart) |
2896 (block-comment-start comstart) | |
2892 (comment-end comment-end)) | 2897 (comment-end comment-end)) |
2893 (and comment-end (not (equal comment-end "")) | 2898 (and comment-end (not (equal comment-end "")) |
2894 ; (if (not comment-multi-line) | 2899 ; (if (not comment-multi-line) |
2895 (progn | 2900 (progn |
2896 (forward-char -1) | 2901 (forward-char -1) |
3623 ;; So, I left only a few of the really useless ones on this kill-list. | 3628 ;; So, I left only a few of the really useless ones on this kill-list. |
3624 ;; | 3629 ;; |
3625 ;; --hniksic | 3630 ;; --hniksic |
3626 (defcustom log-message-ignore-regexps | 3631 (defcustom log-message-ignore-regexps |
3627 '(;; Note: adding entries to this list slows down messaging | 3632 '(;; Note: adding entries to this list slows down messaging |
3628 ;; significantly. Wherever possible, use message lables. | 3633 ;; significantly. Wherever possible, use message labels. |
3629 | 3634 |
3630 ;; Often-seen messages | 3635 ;; Often-seen messages |
3631 "\\`\\'" ; empty message | 3636 "\\`\\'" ; empty message |
3632 "\\`\\(Beginning\\|End\\) of buffer\\'" | 3637 "\\`\\(Beginning\\|End\\) of buffer\\'" |
3633 ;;"^Quit$" | 3638 ;;"^Quit$" |