Mercurial > emacs
comparison lisp/simple.el @ 83401:03335deca80b
Merged from miles@gnu.org--gnu-2005 (patch 655)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-655
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-441
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 18 Nov 2005 14:53:14 +0000 |
parents | 03934708f1e9 775cde85fe0a |
children | 69e184bbba16 |
comparison
equal
deleted
inserted
replaced
83400:03934708f1e9 | 83401:03335deca80b |
---|---|
345 (kill-all-local-variables) | 345 (kill-all-local-variables) |
346 (unless delay-mode-hooks | 346 (unless delay-mode-hooks |
347 (run-hooks 'after-change-major-mode-hook))) | 347 (run-hooks 'after-change-major-mode-hook))) |
348 | 348 |
349 ;; Making and deleting lines. | 349 ;; Making and deleting lines. |
350 | |
351 (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard))) | |
350 | 352 |
351 (defun newline (&optional arg) | 353 (defun newline (&optional arg) |
352 "Insert a newline, and move to left margin of the new line if it's blank. | 354 "Insert a newline, and move to left margin of the new line if it's blank. |
353 If `use-hard-newlines' is non-nil, the newline is marked with the | 355 If `use-hard-newlines' is non-nil, the newline is marked with the |
354 text-property `hard'. | 356 text-property `hard'. |
3326 (if (and next-line-add-newlines (= arg 1)) | 3328 (if (and next-line-add-newlines (= arg 1)) |
3327 (if (save-excursion (end-of-line) (eobp)) | 3329 (if (save-excursion (end-of-line) (eobp)) |
3328 ;; When adding a newline, don't expand an abbrev. | 3330 ;; When adding a newline, don't expand an abbrev. |
3329 (let ((abbrev-mode nil)) | 3331 (let ((abbrev-mode nil)) |
3330 (end-of-line) | 3332 (end-of-line) |
3331 (insert "\n")) | 3333 (insert hard-newline)) |
3332 (line-move arg nil nil try-vscroll)) | 3334 (line-move arg nil nil try-vscroll)) |
3333 (if (interactive-p) | 3335 (if (interactive-p) |
3334 (condition-case nil | 3336 (condition-case nil |
3335 (line-move arg nil nil try-vscroll) | 3337 (line-move arg nil nil try-vscroll) |
3336 ((beginning-of-buffer end-of-buffer) (ding))) | 3338 ((beginning-of-buffer end-of-buffer) (ding))) |
4506 (rfc822-goto-eoh) | 4508 (rfc822-goto-eoh) |
4507 (while other-headers | 4509 (while other-headers |
4508 (unless (member-ignore-case (car (car other-headers)) | 4510 (unless (member-ignore-case (car (car other-headers)) |
4509 '("in-reply-to" "cc" "body")) | 4511 '("in-reply-to" "cc" "body")) |
4510 (insert (car (car other-headers)) ": " | 4512 (insert (car (car other-headers)) ": " |
4511 (cdr (car other-headers)) "\n")) | 4513 (cdr (car other-headers)) hard-newline)) |
4512 (setq other-headers (cdr other-headers))) | 4514 (setq other-headers (cdr other-headers))) |
4513 (when body | 4515 (when body |
4514 (forward-line 1) | 4516 (forward-line 1) |
4515 (insert body)) | 4517 (insert body)) |
4516 t))) | 4518 t))) |
4919 ;; common prefix. | 4921 ;; common prefix. |
4920 ;; FIXME: this probably still doesn't do the right thing | 4922 ;; FIXME: this probably still doesn't do the right thing |
4921 ;; when completing file names. It's not even clear what | 4923 ;; when completing file names. It's not even clear what |
4922 ;; is TRT. | 4924 ;; is TRT. |
4923 0 | 4925 0 |
4924 (- common-string-length (- (point) (point-max)))))) | 4926 (- common-string-length (- (point-max) (point)))))) |
4925 (with-current-buffer standard-output | 4927 (with-current-buffer standard-output |
4926 (completion-list-mode) | 4928 (completion-list-mode) |
4927 (set (make-local-variable 'completion-reference-buffer) mainbuf) | 4929 (set (make-local-variable 'completion-reference-buffer) mainbuf) |
4928 (setq completion-base-size | 4930 (setq completion-base-size |
4929 (if minibuffer-completing-file-name | 4931 (if minibuffer-completing-file-name |