diff options
| author | Karoly Lorentey | 2004-03-11 01:13:03 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-03-11 01:13:03 +0000 |
| commit | 9fcd266514218d2d1bc9f30c9fcfdcf5eb356e1c (patch) | |
| tree | f882cb87dea7776ba5868b689d542838197b6641 /lisp | |
| parent | 2666355c452f1b1502752b7b1095a4eca16e9449 (diff) | |
| parent | bdfd0369ce065c4ed22cf74c6f32c6a081eca56f (diff) | |
| download | emacs-9fcd266514218d2d1bc9f30c9fcfdcf5eb356e1c.tar.gz emacs-9fcd266514218d2d1bc9f30c9fcfdcf5eb356e1c.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-141
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-142
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-143
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-144
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-145
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-115
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 45 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 7 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 4 | ||||
| -rw-r--r-- | lisp/find-dired.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/hexl.el | 2 | ||||
| -rw-r--r-- | lisp/newcomment.el | 13 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 35 | ||||
| -rw-r--r-- | lisp/type-break.el | 66 |
9 files changed, 104 insertions, 77 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a7aedbbe57e..7d12a911b31 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,9 +1,35 @@ | |||
| 1 | 2004-03-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * type-break.el (type-break-emacs-variant): Remove. | ||
| 4 | (type-break-run-at-time, type-break-cancel-function-timers): | ||
| 5 | Use fboundp rather than version name and number. | ||
| 6 | |||
| 7 | 2004-03-09 Masatake YAMATO <jet@gyve.org> | ||
| 8 | |||
| 9 | * hexl.el (hexl-mode): Use `make-local-variable' instead of | ||
| 10 | `make-variable-buffer-local'. | ||
| 11 | |||
| 12 | 2004-03-08 Michael Albinus <Michael.Albinus@alcatel.de> | ||
| 13 | |||
| 14 | * find-dired.el (find-dired): Call `shell-command' instead of | ||
| 15 | `start-process-shell-command'. By this, Tramp takes over | ||
| 16 | handling of remote directories. | ||
| 17 | |||
| 18 | 2004-03-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 19 | |||
| 20 | * cus-edit.el (fill) <defgroup>: Move to fill.el. | ||
| 21 | |||
| 22 | * textmodes/fill.el (fill) <defgroup>: Move from cus-edit.el. | ||
| 23 | (enable-kinsoku): Make it a defcustom. | ||
| 24 | (fill-comment-paragraph): Don't rely on fill-prefix to bound the | ||
| 25 | paragraph to same-comment-start-marker. | ||
| 26 | |||
| 1 | 2004-03-07 Dave Love <fx@gnu.org> | 27 | 2004-03-07 Dave Love <fx@gnu.org> |
| 2 | 28 | ||
| 3 | * net/browse-url.el (rfc2368-parse-mailto-url): Autoload. | 29 | * net/browse-url.el (rfc2368-parse-mailto-url): Autoload. |
| 4 | (browse-url-mail): Use it. | 30 | (browse-url-mail): Use it. |
| 5 | 31 | ||
| 6 | * mail/rfc2368.el (rfc2368-unhexify-char): Deleted. | 32 | * mail/rfc2368.el (rfc2368-unhexify-char): Delete. |
| 7 | (rfc2368-unhexify-string): Use replace-regexp-in-string. | 33 | (rfc2368-unhexify-string): Use replace-regexp-in-string. |
| 8 | 34 | ||
| 9 | 2004-03-07 Francis J. Wright <F.J.Wright@qmul.ac.uk> | 35 | 2004-03-07 Francis J. Wright <F.J.Wright@qmul.ac.uk> |
| @@ -21,14 +47,17 @@ | |||
| 21 | * gdb-ui.el (gdb-overlay-arrow-position): Add defvar. | 47 | * gdb-ui.el (gdb-overlay-arrow-position): Add defvar. |
| 22 | (gdb-reset): Reset gdb-overlay-arrow-position marker and remove it | 48 | (gdb-reset): Reset gdb-overlay-arrow-position marker and remove it |
| 23 | from overlay-arrow-variable-list. | 49 | from overlay-arrow-variable-list. |
| 24 | (gdb-assembler-mode): Use add-to-list for | 50 | (gdb-assembler-mode): Use add-to-list for gdb-overlay-arrow-position. |
| 25 | gdb-overlay-arrow-position. | ||
| 26 | 51 | ||
| 27 | 2004-03-06 Nick Roberts <nick@nick.uklinux.net> | 52 | 2004-03-06 Nick Roberts <nick@nick.uklinux.net> |
| 28 | 53 | ||
| 29 | * gdb-ui.el (gdb-assembler-mode, gdb-assembler-custom): Set up | 54 | * gdb-ui.el (gdb-assembler-mode, gdb-assembler-custom): Set up |
| 30 | overlay arrow string properly for the assembler buffer. | 55 | overlay arrow string properly for the assembler buffer. |
| 31 | 56 | ||
| 57 | 2004-03-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 58 | |||
| 59 | * mail/sendmail.el (mail-mode): Fix last change. | ||
| 60 | |||
| 32 | 2004-03-05 Nick Roberts <nick@nick.uklinux.net> | 61 | 2004-03-05 Nick Roberts <nick@nick.uklinux.net> |
| 33 | 62 | ||
| 34 | * gdb-ui.el (gdb-assembler-mode): Create a second overlay arrow | 63 | * gdb-ui.el (gdb-assembler-mode): Create a second overlay arrow |
| @@ -38,6 +67,11 @@ | |||
| 38 | 67 | ||
| 39 | 2004-03-04 Stefan Monnier <monnier@iro.umontreal.ca> | 68 | 2004-03-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| 40 | 69 | ||
| 70 | * progmodes/sh-script.el (sh-font-lock-paren): Add @ in case patterns. | ||
| 71 | |||
| 72 | * pcvs-info.el (cvs-fileinfo->backup-file): Use a more constraining | ||
| 73 | regexp to distinguish .#ChangeLog.9.1.400 and .#ChangeLog.1.400. | ||
| 74 | |||
| 41 | * mail/sendmail.el (mail-mode): Set comment-start-skip. | 75 | * mail/sendmail.el (mail-mode): Set comment-start-skip. |
| 42 | 76 | ||
| 43 | * newcomment.el (uncomment-region): Allow non-terminated comment. | 77 | * newcomment.el (uncomment-region): Allow non-terminated comment. |
| @@ -98,6 +132,11 @@ | |||
| 98 | 132 | ||
| 99 | 2004-03-02 Stefan Monnier <monnier@iro.umontreal.ca> | 133 | 2004-03-02 Stefan Monnier <monnier@iro.umontreal.ca> |
| 100 | 134 | ||
| 135 | * Makefile.in (setwins, setwins_almost): Skip .arch-ids and other | ||
| 136 | hidden files/directories. | ||
| 137 | |||
| 138 | 2004-03-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 139 | |||
| 101 | * textmodes/fill.el (fill-paragraph): Don't check comment-start-skip, | 140 | * textmodes/fill.el (fill-paragraph): Don't check comment-start-skip, |
| 102 | only comment-start (in case the mode hasn't set it). | 141 | only comment-start (in case the mode hasn't set it). |
| 103 | 142 | ||
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index fc5e7ecb8af..04570b1512e 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages | 1 | ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 1996,97,1999,2000,01,02,2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996,97,1999,2000,01,02,03,2004 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> | 5 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -286,11 +286,6 @@ | |||
| 286 | "Content of the modeline." | 286 | "Content of the modeline." |
| 287 | :group 'environment) | 287 | :group 'environment) |
| 288 | 288 | ||
| 289 | (defgroup fill nil | ||
| 290 | "Indenting and filling text." | ||
| 291 | :link '(custom-manual "(emacs)Filling Text") | ||
| 292 | :group 'editing) | ||
| 293 | |||
| 294 | (defgroup editing-basics nil | 289 | (defgroup editing-basics nil |
| 295 | "Most basic editing facilities." | 290 | "Most basic editing facilities." |
| 296 | :group 'editing) | 291 | :group 'editing) |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index c2dc3e6a16c..6b50318d3e6 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands | 1 | ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985,86,1999,2000,01,03,2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: FSF | 5 | ;; Maintainer: FSF |
| 6 | ;; Keywords: lisp, languages | 6 | ;; Keywords: lisp, languages |
| @@ -197,6 +197,8 @@ | |||
| 197 | (setq comment-column 40) | 197 | (setq comment-column 40) |
| 198 | (make-local-variable 'comment-indent-function) | 198 | (make-local-variable 'comment-indent-function) |
| 199 | (setq comment-indent-function 'lisp-comment-indent) | 199 | (setq comment-indent-function 'lisp-comment-indent) |
| 200 | ;; Don't get confused by `;' in doc strings when paragraph-filling. | ||
| 201 | (set (make-local-variable 'comment-use-global-state) t) | ||
| 200 | (make-local-variable 'imenu-generic-expression) | 202 | (make-local-variable 'imenu-generic-expression) |
| 201 | (setq imenu-generic-expression lisp-imenu-generic-expression) | 203 | (setq imenu-generic-expression lisp-imenu-generic-expression) |
| 202 | (make-local-variable 'multibyte-syntax-as-symbol) | 204 | (make-local-variable 'multibyte-syntax-as-symbol) |
diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 9407afc3862..5bef4d6bf3a 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el | |||
| @@ -121,6 +121,8 @@ as the final argument." | |||
| 121 | "" | 121 | "" |
| 122 | (concat "\\( " args " \\) ")) | 122 | (concat "\\( " args " \\) ")) |
| 123 | (car find-ls-option))) | 123 | (car find-ls-option))) |
| 124 | ;; Start the find process. | ||
| 125 | (shell-command (concat args "&") (current-buffer)) | ||
| 124 | ;; The next statement will bomb in classic dired (no optional arg allowed) | 126 | ;; The next statement will bomb in classic dired (no optional arg allowed) |
| 125 | (dired-mode dir (cdr find-ls-option)) | 127 | (dired-mode dir (cdr find-ls-option)) |
| 126 | (let ((map (make-sparse-keymap))) | 128 | (let ((map (make-sparse-keymap))) |
| @@ -149,8 +151,7 @@ as the final argument." | |||
| 149 | ;; ``wildcard'' line. | 151 | ;; ``wildcard'' line. |
| 150 | (insert " " args "\n") | 152 | (insert " " args "\n") |
| 151 | (setq buffer-read-only t) | 153 | (setq buffer-read-only t) |
| 152 | ;; Start the find process. | 154 | (let ((proc (get-buffer-process (current-buffer)))) |
| 153 | (let ((proc (start-process-shell-command find-dired-find-program (current-buffer) args))) | ||
| 154 | (set-process-filter proc (function find-dired-filter)) | 155 | (set-process-filter proc (function find-dired-filter)) |
| 155 | (set-process-sentinel proc (function find-dired-sentinel)) | 156 | (set-process-sentinel proc (function find-dired-sentinel)) |
| 156 | ;; Initialize the process marker; it is used by the filter. | 157 | ;; Initialize the process marker; it is used by the filter. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7fa3fb61ce5..43be1e84e43 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-03-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * message.el (message-mode): Fix last change. | ||
| 4 | |||
| 1 | 2004-03-04 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2004-03-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * message.el (message-mode): Set comment-start-skip. | 7 | * message.el (message-mode): Set comment-start-skip. |
diff --git a/lisp/hexl.el b/lisp/hexl.el index 40e3c929c59..9fd21824f26 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el | |||
| @@ -239,7 +239,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. | |||
| 239 | (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) | 239 | (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) |
| 240 | 240 | ||
| 241 | ;; Set a callback function for eldoc. | 241 | ;; Set a callback function for eldoc. |
| 242 | (set (make-variable-buffer-local 'eldoc-print-current-symbol-info-function) | 242 | (set (make-local-variable 'eldoc-print-current-symbol-info-function) |
| 243 | 'hexl-print-current-point-info) | 243 | 'hexl-print-current-point-info) |
| 244 | (eldoc-add-command-completions "hexl-") | 244 | (eldoc-add-command-completions "hexl-") |
| 245 | (eldoc-remove-command "hexl-save-buffer" | 245 | (eldoc-remove-command "hexl-save-buffer" |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 1c9c0dfd4b6..924cf0ed8c4 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -345,6 +345,13 @@ If UNP is non-nil, unquote nested comment markers." | |||
| 345 | ;;;; Navigation | 345 | ;;;; Navigation |
| 346 | ;;;; | 346 | ;;;; |
| 347 | 347 | ||
| 348 | (defvar comment-use-global-state nil | ||
| 349 | "Non-nil means that the global syntactic context is used. | ||
| 350 | More specifically, it means that `syntax-ppss' is used to find out whether | ||
| 351 | point is within a string or not. Major modes whose syntax is faithfully | ||
| 352 | described by the syntax-tables can set this to non-nil so comment markers | ||
| 353 | in strings will not confuse Emacs.") | ||
| 354 | |||
| 348 | (defun comment-search-forward (limit &optional noerror) | 355 | (defun comment-search-forward (limit &optional noerror) |
| 349 | "Find a comment start between point and LIMIT. | 356 | "Find a comment start between point and LIMIT. |
| 350 | Moves point to inside the comment and returns the position of the | 357 | Moves point to inside the comment and returns the position of the |
| @@ -357,8 +364,10 @@ and raises an error or returns nil of NOERROR is non-nil." | |||
| 357 | (unless noerror (error "No comment"))) | 364 | (unless noerror (error "No comment"))) |
| 358 | (let* ((pt (point)) | 365 | (let* ((pt (point)) |
| 359 | ;; Assume (at first) that pt is outside of any string. | 366 | ;; Assume (at first) that pt is outside of any string. |
| 360 | (s (parse-partial-sexp pt (or limit (point-max)) nil nil nil t))) | 367 | (s (parse-partial-sexp pt (or limit (point-max)) nil nil |
| 361 | (when (and (nth 8 s) (nth 3 s)) | 368 | (if comment-use-global-state (syntax-ppss pt)) |
| 369 | t))) | ||
| 370 | (when (and (nth 8 s) (nth 3 s) (not comment-use-global-state)) | ||
| 362 | ;; The search ended inside a string. Try to see if it | 371 | ;; The search ended inside a string. Try to see if it |
| 363 | ;; works better when we assume that pt is inside a string. | 372 | ;; works better when we assume that pt is inside a string. |
| 364 | (setq s (parse-partial-sexp | 373 | (setq s (parse-partial-sexp |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 7a794d67c5e..57ba513cd7f 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -30,6 +30,11 @@ | |||
| 30 | 30 | ||
| 31 | ;;; Code: | 31 | ;;; Code: |
| 32 | 32 | ||
| 33 | (defgroup fill nil | ||
| 34 | "Indenting and filling text." | ||
| 35 | :link '(custom-manual "(emacs)Filling Text") | ||
| 36 | :group 'editing) | ||
| 37 | |||
| 33 | (defcustom fill-individual-varying-indent nil | 38 | (defcustom fill-individual-varying-indent nil |
| 34 | "*Controls criterion for a new paragraph in `fill-individual-paragraphs'. | 39 | "*Controls criterion for a new paragraph in `fill-individual-paragraphs'. |
| 35 | Non-nil means changing indent doesn't end a paragraph. | 40 | Non-nil means changing indent doesn't end a paragraph. |
| @@ -49,13 +54,14 @@ A value of nil means that any change in indentation starts a new paragraph." | |||
| 49 | If the function returns nil, then `fill-paragraph' does its normal work.") | 54 | If the function returns nil, then `fill-paragraph' does its normal work.") |
| 50 | 55 | ||
| 51 | (defvar fill-paragraph-handle-comment t | 56 | (defvar fill-paragraph-handle-comment t |
| 52 | "If non-nil, paragraph filling will try to pay attention to comments.") | 57 | "Non-nil means paragraph filling will try to pay attention to comments.") |
| 53 | 58 | ||
| 54 | (defvar enable-kinsoku t | 59 | (defcustom enable-kinsoku t |
| 55 | "*Non-nil means enable \"kinsoku\" processing on filling paragraph. | 60 | "*Non-nil means enable \"kinsoku\" processing on filling paragraphs. |
| 56 | Kinsoku processing is designed to prevent certain characters from being | 61 | Kinsoku processing is designed to prevent certain characters from being |
| 57 | placed at the beginning or end of a line by filling. | 62 | placed at the beginning or end of a line by filling. |
| 58 | See the documentation of `kinsoku' for more information.") | 63 | See the documentation of `kinsoku' for more information." |
| 64 | :type 'boolean) | ||
| 59 | 65 | ||
| 60 | (defun set-fill-prefix () | 66 | (defun set-fill-prefix () |
| 61 | "Set the fill prefix to the current line up to point. | 67 | "Set the fill prefix to the current line up to point. |
| @@ -317,7 +323,7 @@ be tested. If it returns t, fill commands do not break the line there." | |||
| 317 | :options '(fill-french-nobreak-p fill-single-word-nobreak-p)) | 323 | :options '(fill-french-nobreak-p fill-single-word-nobreak-p)) |
| 318 | 324 | ||
| 319 | (defcustom fill-nobreak-invisible nil | 325 | (defcustom fill-nobreak-invisible nil |
| 320 | "Non-nil means that fill command do not break lines in invisible text." | 326 | "Non-nil means that fill commands do not break lines in invisible text." |
| 321 | :type 'boolean | 327 | :type 'boolean |
| 322 | :group 'fill) | 328 | :group 'fill) |
| 323 | 329 | ||
| @@ -365,7 +371,7 @@ and `fill-nobreak-invisible'." | |||
| 365 | Don't move back past the buffer position LIMIT. | 371 | Don't move back past the buffer position LIMIT. |
| 366 | 372 | ||
| 367 | This function is called when we are going to break the current line | 373 | This function is called when we are going to break the current line |
| 368 | after or before a non-ascii character. If the charset of the | 374 | after or before a non-ASCII character. If the charset of the |
| 369 | character has the property `fill-find-break-point-function', this | 375 | character has the property `fill-find-break-point-function', this |
| 370 | function calls the property value as a function with one arg LINEBEG. | 376 | function calls the property value as a function with one arg LINEBEG. |
| 371 | If the charset has no such property, do nothing." | 377 | If the charset has no such property, do nothing." |
| @@ -428,7 +434,7 @@ Point is moved to just past the fill prefix on the first line." | |||
| 428 | (string-to-list sentence-end-without-space))) | 434 | (string-to-list sentence-end-without-space))) |
| 429 | (while (re-search-forward eol-double-space-re to t) | 435 | (while (re-search-forward eol-double-space-re to t) |
| 430 | (or (>= (point) to) (memq (char-before) '(?\t ?\ )) | 436 | (or (>= (point) to) (memq (char-before) '(?\t ?\ )) |
| 431 | (memq (char-after (match-beginning 0)) | 437 | (memq (char-after (match-beginning 0)) |
| 432 | sentence-end-without-space-list) | 438 | sentence-end-without-space-list) |
| 433 | (insert-and-inherit ?\ )))) | 439 | (insert-and-inherit ?\ )))) |
| 434 | 440 | ||
| @@ -844,8 +850,13 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." | |||
| 844 | (concat paragraph-start "\\|[ \t]*\\(?:" | 850 | (concat paragraph-start "\\|[ \t]*\\(?:" |
| 845 | comment-start-skip "\\)\\(?:" | 851 | comment-start-skip "\\)\\(?:" |
| 846 | (default-value 'paragraph-start) "\\)")) | 852 | (default-value 'paragraph-start) "\\)")) |
| 847 | (paragraph-ignore-fill-prefix nil) | 853 | ;; We used to reply on fill-prefix to break paragraph at |
| 848 | (fill-prefix comment-fill-prefix) | 854 | ;; comment-starter changes, but it did not work for the |
| 855 | ;; first line (mixed comment&code). | ||
| 856 | ;; We now use comment-re instead to "manually" make sure | ||
| 857 | ;; we treat comment-marker changes as paragraph boundaries. | ||
| 858 | ;; (paragraph-ignore-fill-prefix nil) | ||
| 859 | ;; (fill-prefix comment-fill-prefix) | ||
| 849 | (after-line (if has-code-and-comment | 860 | (after-line (if has-code-and-comment |
| 850 | (line-beginning-position 2)))) | 861 | (line-beginning-position 2)))) |
| 851 | (setq end (progn (forward-paragraph) (point))) | 862 | (setq end (progn (forward-paragraph) (point))) |
| @@ -892,7 +903,7 @@ as specified by its text properties. | |||
| 892 | The fourth arg NOSQUEEZE non-nil means to leave | 903 | The fourth arg NOSQUEEZE non-nil means to leave |
| 893 | whitespace other than line breaks untouched, and fifth arg TO-EOP | 904 | whitespace other than line breaks untouched, and fifth arg TO-EOP |
| 894 | non-nil means to keep filling to the end of the paragraph (or next | 905 | non-nil means to keep filling to the end of the paragraph (or next |
| 895 | hard newline, if `use-hard-newlines' is on). | 906 | hard newline, if variable `use-hard-newlines' is on). |
| 896 | 907 | ||
| 897 | Return the fill-prefix used for filling the last paragraph. | 908 | Return the fill-prefix used for filling the last paragraph. |
| 898 | 909 | ||
| @@ -976,8 +987,8 @@ beginning and end of the region are not at paragraph breaks, they are | |||
| 976 | moved to the beginning and end \(respectively) of the paragraphs they | 987 | moved to the beginning and end \(respectively) of the paragraphs they |
| 977 | are in. | 988 | are in. |
| 978 | 989 | ||
| 979 | If `use-hard-newlines' is true, all hard newlines are taken to be paragraph | 990 | If variable `use-hard-newlines' is true, all hard newlines are |
| 980 | breaks. | 991 | taken to be paragraph breaks. |
| 981 | 992 | ||
| 982 | When calling from a program, operates just on region between BEGIN and END, | 993 | When calling from a program, operates just on region between BEGIN and END, |
| 983 | unless optional fourth arg WHOLE-PAR is non-nil. In that case bounds are | 994 | unless optional fourth arg WHOLE-PAR is non-nil. In that case bounds are |
diff --git a/lisp/type-break.el b/lisp/type-break.el index 83e6a4cebff..d7d74fd887b 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; type-break.el --- encourage rests from typing at appropriate intervals | 1 | ;;; type-break.el --- encourage rests from typing at appropriate intervals |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 95, 97, 2000 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 95, 97, 2000, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Noah Friedman | 5 | ;; Author: Noah Friedman |
| 6 | ;; Maintainer: Noah Friedman <friedman@splode.com> | 6 | ;; Maintainer: Noah Friedman <friedman@splode.com> |
| @@ -8,7 +8,7 @@ | |||
| 8 | ;; Status: Works in GNU Emacs 19.25 or later, some versions of XEmacs | 8 | ;; Status: Works in GNU Emacs 19.25 or later, some versions of XEmacs |
| 9 | ;; Created: 1994-07-13 | 9 | ;; Created: 1994-07-13 |
| 10 | 10 | ||
| 11 | ;; $Id: type-break.el,v 1.29 2003/09/01 15:45:17 miles Exp $ | 11 | ;; $Id: type-break.el,v 1.30 2004/03/09 15:27:06 monnier Exp $ |
| 12 | 12 | ||
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| 14 | 14 | ||
| @@ -277,39 +277,6 @@ It will be either \"seconds\" or \"keystrokes\".") | |||
| 277 | (defvar type-break-current-keystroke-warning-interval nil) | 277 | (defvar type-break-current-keystroke-warning-interval nil) |
| 278 | (defvar type-break-time-warning-count 0) | 278 | (defvar type-break-time-warning-count 0) |
| 279 | (defvar type-break-keystroke-warning-count 0) | 279 | (defvar type-break-keystroke-warning-count 0) |
| 280 | |||
| 281 | ;; Constant indicating emacs variant. | ||
| 282 | ;; This can be one of `xemacs', `lucid', `epoch', `mule', etc. | ||
| 283 | (defconst type-break-emacs-variant | ||
| 284 | (let ((data (match-data)) | ||
| 285 | (version (cond | ||
| 286 | ((fboundp 'nemacs-version) | ||
| 287 | (nemacs-version)) | ||
| 288 | (t | ||
| 289 | (emacs-version)))) | ||
| 290 | (alist '(("\\bXEmacs\\b" . xemacs) | ||
| 291 | ("\\bLucid\\b" . lucid) | ||
| 292 | ("^Nemacs\\b" . nemacs) | ||
| 293 | ("^GNU Emacs 19" . standard19) | ||
| 294 | ("^GNU Emacs 20" . standard19) | ||
| 295 | ("^GNU Emacs 18" . emacs18))) | ||
| 296 | result) | ||
| 297 | (while alist | ||
| 298 | (cond | ||
| 299 | ((string-match (car (car alist)) version) | ||
| 300 | (setq result (cdr (car alist))) | ||
| 301 | (setq alist nil)) | ||
| 302 | (t | ||
| 303 | (setq alist (cdr alist))))) | ||
| 304 | (set-match-data data) | ||
| 305 | (cond ((eq result 'lucid) | ||
| 306 | (and (string= emacs-version "19.8 Lucid") | ||
| 307 | (setq result 'lucid-19-8))) | ||
| 308 | ((memq result '(nemacs emacs18)) | ||
| 309 | (signal 'error | ||
| 310 | "type-break not supported in this version of emacs."))) | ||
| 311 | result)) | ||
| 312 | |||
| 313 | 280 | ||
| 314 | ;;;###autoload | 281 | ;;;###autoload |
| 315 | (defun type-break-mode (&optional prefix) | 282 | (defun type-break-mode (&optional prefix) |
| @@ -954,38 +921,37 @@ With optional non-nil ALL, force redisplay of all mode-lines." | |||
| 954 | ;;; for different versions of emacs. | 921 | ;;; for different versions of emacs. |
| 955 | 922 | ||
| 956 | (defun type-break-run-at-time (time repeat function) | 923 | (defun type-break-run-at-time (time repeat function) |
| 957 | (cond ((eq type-break-emacs-variant 'standard19) | 924 | (condition-case nil (or (require 'timer) (require 'itimer)) (error nil)) |
| 958 | (require 'timer) | 925 | (cond ((fboundp 'run-at-time) |
| 959 | (funcall 'run-at-time time repeat function)) | 926 | (run-at-time time repeat function)) |
| 960 | ((eq type-break-emacs-variant 'lucid-19-8) | 927 | ((fboundp 'start-timer) |
| 961 | (let ((name (if (symbolp function) | 928 | (let ((name (if (symbolp function) |
| 962 | (symbol-name function) | 929 | (symbol-name function) |
| 963 | "type-break"))) | 930 | "type-break"))) |
| 964 | (require 'timer) | 931 | (start-timer name function time repeat))) |
| 965 | (funcall 'start-timer name function time repeat))) | 932 | ((fboundp 'start-itimer) |
| 966 | ((memq type-break-emacs-variant '(xemacs lucid)) | ||
| 967 | (let ((name (if (symbolp function) | 933 | (let ((name (if (symbolp function) |
| 968 | (symbol-name function) | 934 | (symbol-name function) |
| 969 | "type-break"))) | 935 | "type-break"))) |
| 970 | (require 'itimer) | 936 | (start-itimer name function time repeat))))) |
| 971 | (funcall 'start-itimer name function time repeat))))) | ||
| 972 | 937 | ||
| 938 | (defvar timer-dont-exit) | ||
| 973 | (defun type-break-cancel-function-timers (function) | 939 | (defun type-break-cancel-function-timers (function) |
| 974 | (cond ((eq type-break-emacs-variant 'standard19) | 940 | (cond ((fboundp 'cancel-function-timers) |
| 975 | (let ((timer-dont-exit t)) | 941 | (let ((timer-dont-exit t)) |
| 976 | (funcall 'cancel-function-timers function))) | 942 | (cancel-function-timers function))) |
| 977 | ((eq type-break-emacs-variant 'lucid-19-8) | 943 | ((fboundp 'delete-timer) |
| 978 | (let ((list timer-list)) | 944 | (let ((list timer-list)) |
| 979 | (while list | 945 | (while list |
| 980 | (and (eq (funcall 'timer-function (car list)) function) | 946 | (and (eq (funcall 'timer-function (car list)) function) |
| 981 | (funcall 'delete-timer (car list))) | 947 | (delete-timer (car list))) |
| 982 | (setq list (cdr list))))) | 948 | (setq list (cdr list))))) |
| 983 | ((memq type-break-emacs-variant '(xemacs lucid)) | 949 | ((fboundp 'delete-itimer) |
| 984 | (with-no-warnings | 950 | (with-no-warnings |
| 985 | (let ((list itimer-list)) | 951 | (let ((list itimer-list)) |
| 986 | (while list | 952 | (while list |
| 987 | (and (eq (funcall 'itimer-function (car list)) function) | 953 | (and (eq (funcall 'itimer-function (car list)) function) |
| 988 | (funcall 'delete-itimer (car list))) | 954 | (delete-itimer (car list))) |
| 989 | (setq list (cdr list)))))))) | 955 | (setq list (cdr list)))))))) |
| 990 | 956 | ||
| 991 | 957 | ||