diff options
| author | Eli Zaretskii | 2008-10-21 14:45:34 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-10-21 14:45:34 +0000 |
| commit | 80e6b6df5e610ac878ce9751536ade0eb703ab42 (patch) | |
| tree | 5065a705e3d18022f19f9deab2dfc5d2adfd1434 | |
| parent | f46684418b8b7bc11a60cd9f46292ead18dc501a (diff) | |
| download | emacs-80e6b6df5e610ac878ce9751536ade0eb703ab42.tar.gz emacs-80e6b6df5e610ac878ce9751536ade0eb703ab42.zip | |
(Serial Ports): Fix wording and improve markup.
| -rw-r--r-- | doc/lispref/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 164 | ||||
| -rw-r--r-- | etc/NEWS | 3 |
3 files changed, 90 insertions, 79 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index d3db94bc5fa..cb9363638af 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2008-10-21 Eli Zaretskii <eliz@gnu.org> | 1 | 2008-10-21 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * processes.texi (Serial Ports): Fix wording and improve markup. | ||
| 4 | |||
| 3 | * searching.texi (Regexp Search): Document `string-match-p' and | 5 | * searching.texi (Regexp Search): Document `string-match-p' and |
| 4 | `looking-at-p'. | 6 | `looking-at-p'. |
| 5 | (POSIX Regexps): Add an xref for "non-greedy". | 7 | (POSIX Regexps): Add an xref for "non-greedy". |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 9e6642143a5..0ae10fac831 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -2370,77 +2370,82 @@ mode line for configuration. | |||
| 2370 | A serial connection is represented by a process object which can be | 2370 | A serial connection is represented by a process object which can be |
| 2371 | used similar to a subprocess or network process. You can send and | 2371 | used similar to a subprocess or network process. You can send and |
| 2372 | receive data and configure the serial port. A serial process object | 2372 | receive data and configure the serial port. A serial process object |
| 2373 | has no process ID, and you can't send signals to it. | 2373 | has no process ID, you can't send signals to it, and the status codes |
| 2374 | are different from other types of processes. | ||
| 2374 | @code{delete-process} on the process object or @code{kill-buffer} on | 2375 | @code{delete-process} on the process object or @code{kill-buffer} on |
| 2375 | the process buffer close the connection, but this does not affect the | 2376 | the process buffer close the connection, but this does not affect the |
| 2376 | device connected to the serial port. | 2377 | device connected to the serial port. |
| 2377 | 2378 | ||
| 2378 | The function @code{process-type} returns the symbol @code{serial} | 2379 | The function @code{process-type} returns the symbol @code{serial} |
| 2379 | for a process object representing a serial port. | 2380 | for a process object representing a serial port connection. |
| 2380 | 2381 | ||
| 2381 | Serial ports are available on GNU/Linux, Unix, and Windows systems. | 2382 | Serial ports are available on GNU/Linux, Unix, and Windows systems. |
| 2382 | 2383 | ||
| 2383 | @defun serial-term port speed | 2384 | @deffn Command serial-term port speed |
| 2384 | Start a terminal-emulator for a serial port in a new buffer. | 2385 | Start a terminal-emulator for a serial port in a new buffer. |
| 2385 | @var{port} is the path or name of the serial port. For example, this | 2386 | @var{port} is the name of the serial port to which to connect. For |
| 2386 | could be @file{/dev/ttyS0} on Unix. On Windows, this could be | 2387 | example, this could be @file{/dev/ttyS0} on Unix. On Windows, this |
| 2387 | @file{COM1}, or @file{\\.\COM10} (double the backslashes in strings). | 2388 | could be @file{COM1}, or @file{\\.\COM10} (double the backslashes in |
| 2389 | Lisp strings). | ||
| 2388 | 2390 | ||
| 2389 | @var{speed} is the speed of the serial port in bits per second. 9600 | 2391 | @var{speed} is the speed of the serial port in bits per second. 9600 |
| 2390 | is a common value. The buffer is in Term mode; see @code{term-mode} | 2392 | is a common value. The buffer is in Term mode; see @ref{Term Mode,,, |
| 2391 | for the commands to use in that buffer. You can change the speed and | 2393 | emacs, The GNU Emacs Manual}, for the commands to use in that buffer. |
| 2392 | the configuration in the mode line menu. @end defun | 2394 | You can change the speed and the configuration in the mode line menu. |
| 2395 | @end deffn | ||
| 2393 | 2396 | ||
| 2394 | @defun make-serial-process &rest args | 2397 | @defun make-serial-process &rest args |
| 2395 | @code{make-serial-process} creates a process and a buffer. Arguments | 2398 | This function creates a process and a buffer. Arguments are specified |
| 2396 | are specified as keyword/argument pairs. The following arguments are | 2399 | as keyword/argument pairs. Here's the list of the meaningful keywords: |
| 2397 | defined: | ||
| 2398 | 2400 | ||
| 2399 | @table @code | 2401 | @table @code |
| 2400 | @item :port port | 2402 | @item :port @var{port}@r{ (mandatory)} |
| 2401 | @var{port} (mandatory) is the path or name of the serial port. | 2403 | This is the name of the serial port. On Unix and GNU systems, this is |
| 2402 | For example, this could be @file{/dev/ttyS0} on Unix. On Windows, | 2404 | a file name such as @file{/dev/ttyS0}. On Windows, this could be |
| 2403 | this could be @file{COM1}, or @file{\\.\COM10} for ports higher than | 2405 | @file{COM1}, or @file{\\.\COM10} for ports higher than @file{COM9} |
| 2404 | @file{COM9} (double the backslashes in strings). | 2406 | (double the backslashes in Lisp strings). |
| 2405 | 2407 | ||
| 2406 | @item :speed speed | 2408 | @item :speed @var{speed}@r{ (mandatory)} |
| 2407 | @var{speed} (mandatory) is handled by @code{serial-process-configure}, | 2409 | The speed of the serial port in bits per second. This function calls |
| 2408 | which is called by @code{make-serial-process}. | 2410 | @code{serial-process-configure} to handle the speed. |
| 2409 | 2411 | ||
| 2410 | @item :name name | 2412 | @item :name @var{name} |
| 2411 | @var{name} is the name of the process. If @var{name} is not given, the | 2413 | The name of the process. If @var{name} is not given, @var{port} will |
| 2412 | value of @var{port} is used. | 2414 | serve as the process name as well. |
| 2413 | 2415 | ||
| 2414 | @item :buffer buffer | 2416 | @item :buffer @var{buffer} |
| 2415 | @var{buffer} is the buffer (or buffer-name) to associate with the | 2417 | The buffer to associate with the process. The value could be either a |
| 2416 | process. Process output goes at the end of that buffer, unless you | 2418 | buffer or a string that names a buffer. Process output goes at the |
| 2417 | specify an output stream or filter function to handle the output. If | 2419 | end of that buffer, unless you specify an output stream or filter |
| 2418 | @var{buffer} is not given, the value of @var{name} is used. | 2420 | function to handle the output. If @var{buffer} is not given, the |
| 2419 | 2421 | process buffer's name is taken from the value of the @code{:name} | |
| 2420 | @item :coding coding | 2422 | keyword. |
| 2423 | |||
| 2424 | @item :coding @var{coding} | ||
| 2421 | If @var{coding} is a symbol, it specifies the coding system used for | 2425 | If @var{coding} is a symbol, it specifies the coding system used for |
| 2422 | both reading and writing for this process. If @var{coding} is a cons | 2426 | both reading and writing for this process. If @var{coding} is a cons |
| 2423 | @code{(decoding . encoding)}, @var{decoding} is used for reading, and | 2427 | @code{(decoding . encoding)}, @var{decoding} is used for reading, and |
| 2424 | @var{encoding} is used for writing. | 2428 | @var{encoding} is used for writing. If not specified, the default is |
| 2429 | to determine the coding systems from data itself. | ||
| 2425 | 2430 | ||
| 2426 | @item :noquery bool | 2431 | @item :noquery @var{query-flag} |
| 2427 | When exiting Emacs, query the user if @var{bool} is @code{nil} and the | 2432 | Initialize the process query flag to @var{query-flag}. @xref{Query |
| 2428 | process is running. If @var{bool} is not given, query before exiting. | 2433 | Before Exit}. The flags defaults to @code{nil} if unspecified. |
| 2429 | 2434 | ||
| 2430 | @item :stop bool | 2435 | @item :stop @var{bool} |
| 2431 | Start process in the @code{stopped} state if @var{bool} is | 2436 | Start process in the @code{stopped} state if @var{bool} is |
| 2432 | non-@code{nil}. In the stopped state, a serial process does not | 2437 | non-@code{nil}. In the stopped state, a serial process does not |
| 2433 | accept incoming data, but you can send outgoing data. The stopped | 2438 | accept incoming data, but you can send outgoing data. The stopped |
| 2434 | state is cleared by @code{continue-process} and set by | 2439 | state is cleared by @code{continue-process} and set by |
| 2435 | @code{stop-process}. | 2440 | @code{stop-process}. |
| 2436 | 2441 | ||
| 2437 | @item :filter filter | 2442 | @item :filter @var{filter} |
| 2438 | Install @var{filter} as the process filter. | 2443 | Install @var{filter} as the process filter. |
| 2439 | 2444 | ||
| 2440 | @item :sentinel sentinel | 2445 | @item :sentinel @var{sentinel} |
| 2441 | Install @var{sentinel} as the process sentinel. | 2446 | Install @var{sentinel} as the process sentinel. |
| 2442 | 2447 | ||
| 2443 | @item :plist plist | 2448 | @item :plist @var{plist} |
| 2444 | Install @var{plist} as the initial plist of the process. | 2449 | Install @var{plist} as the initial plist of the process. |
| 2445 | 2450 | ||
| 2446 | @item :speed | 2451 | @item :speed |
| @@ -2462,66 +2467,67 @@ Examples: | |||
| 2462 | 2467 | ||
| 2463 | (make-serial-process :port "COM1" :speed 115200 :stopbits 2) | 2468 | (make-serial-process :port "COM1" :speed 115200 :stopbits 2) |
| 2464 | 2469 | ||
| 2465 | (make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity 'odd) | 2470 | (make-serial-process :port "\\\\.\\COM13" :speed 1200 |
| 2471 | :bytesize 7 :parity 'odd) | ||
| 2466 | 2472 | ||
| 2467 | (make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) | 2473 | (make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) |
| 2468 | @end example | 2474 | @end example |
| 2469 | @end defun | 2475 | @end defun |
| 2470 | 2476 | ||
| 2471 | @defun serial-process-configure &rest args | 2477 | @defun serial-process-configure &rest args |
| 2472 | @cindex baud | 2478 | @cindex baud, in serial connections |
| 2473 | @cindex bytesize | 2479 | @cindex bytesize, in serial connections |
| 2474 | @cindex parity | 2480 | @cindex parity, in serial connections |
| 2475 | @cindex stopbits | 2481 | @cindex stopbits, in serial connections |
| 2476 | @cindex flowcontrol | 2482 | @cindex flowcontrol, in serial connections |
| 2477 | 2483 | ||
| 2478 | Configure a serial port. Arguments are specified as keyword/argument | 2484 | This functions configures a serial port connection. Arguments are |
| 2479 | pairs. Attributes that are not given are re-initialized from the | 2485 | specified as keyword/argument pairs. Attributes that are not given |
| 2480 | process's current configuration (available via the function | 2486 | are re-initialized from the process's current configuration (available |
| 2481 | @code{process-contact}) or set to reasonable default values. The | 2487 | via the function @code{process-contact}) or set to reasonable default |
| 2482 | following arguments are defined: | 2488 | values. The following arguments are defined: |
| 2483 | 2489 | ||
| 2484 | @table @code | 2490 | @table @code |
| 2485 | @item :process process | 2491 | @item :process @var{process} |
| 2486 | @itemx :name name | 2492 | @itemx :name @var{name} |
| 2487 | @itemx :buffer buffer | 2493 | @itemx :buffer @var{buffer} |
| 2488 | @itemx :port port | 2494 | @itemx :port @var{port} |
| 2489 | Any of these arguments can be given to identify the process that is to | 2495 | Any of these arguments can be given to identify the process that is to |
| 2490 | be configured. If none of these arguments is given, the current | 2496 | be configured. If none of these arguments is given, the current |
| 2491 | buffer's process is used. | 2497 | buffer's process is used. |
| 2492 | 2498 | ||
| 2493 | @item :speed @var{speed} | 2499 | @item :speed @var{speed} |
| 2494 | @var{speed} is the speed of the serial port in bits per second, also | 2500 | The speed of the serial port in bits per second, also called @dfn{baud |
| 2495 | called baud rate. Any value can be given for @var{speed}, but most | 2501 | rate}. Any value can be given for @var{speed}, but most serial ports |
| 2496 | serial ports work only at a few defined values between 1200 and | 2502 | work only at a few defined values between 1200 and 115200, with 9600 |
| 2497 | 115200, with 9600 being the most common value. If @var{speed} is | 2503 | being the most common value. If @var{speed} is @code{nil}, the serial |
| 2498 | @code{nil}, the serial port is not configured any further, i.e., all | 2504 | port is not configured any further, i.e., all other arguments are |
| 2499 | other arguments are ignored. This may be useful for special serial | 2505 | ignored. This may be useful for special serial ports such as |
| 2500 | ports such as Bluetooth-to-serial converters which can only be | 2506 | Bluetooth-to-serial converters which can only be configured through AT |
| 2501 | configured through AT commands. A value of @code{nil} for @var{speed} | 2507 | commands sent through the connection. A value of @code{nil} for |
| 2502 | can be used only when passed through @code{make-serial-process} or | 2508 | @var{speed} can be used only for connections already opened by |
| 2503 | @code{serial-term}. | 2509 | @code{make-serial-process} or @code{serial-term}. |
| 2504 | 2510 | ||
| 2505 | @item :bytesize @var{bytesize} | 2511 | @item :bytesize @var{bytesize} |
| 2506 | @var{bytesize} is the number of bits per byte, which can be 7 or 8. | 2512 | The number of bits per byte, which can be 7 or 8. If @var{bytesize} |
| 2507 | If @var{bytesize} is not given or @code{nil}, a value of 8 is used. | 2513 | is not given or @code{nil}, it defaults to 8. |
| 2508 | 2514 | ||
| 2509 | @item :parity @var{parity} | 2515 | @item :parity @var{parity} |
| 2510 | @var{parity} can be @code{nil} (don't use parity), the symbol | 2516 | The value can be @code{nil} (don't use parity), the symbol |
| 2511 | @code{odd} (use odd parity), or the symbol @code{even} (use even | 2517 | @code{odd} (use odd parity), or the symbol @code{even} (use even |
| 2512 | parity). If @var{parity} is not given, no parity is used. | 2518 | parity). If @var{parity} is not given, it defaults to no parity. |
| 2513 | 2519 | ||
| 2514 | @item :stopbits @var{stopbits} | 2520 | @item :stopbits @var{stopbits} |
| 2515 | @var{stopbits} is the number of stopbits used to terminate a byte | 2521 | The number of stopbits used to terminate a transmission |
| 2516 | transmission. @var{stopbits} can be 1 or 2. If @var{stopbits} is not | 2522 | of each byte. @var{stopbits} can be 1 or 2. If @var{stopbits} is not |
| 2517 | given or @code{nil}, 1 stopbit is used. | 2523 | given or @code{nil}, it defaults to 1. |
| 2518 | 2524 | ||
| 2519 | @item :flowcontrol @var{flowcontrol} | 2525 | @item :flowcontrol @var{flowcontrol} |
| 2520 | @var{flowcontrol} determines the type of flowcontrol to be used, which | 2526 | The type of flow control to use for this connection, which is either |
| 2521 | is either @code{nil} (don't use flowcontrol), the symbol @code{hw} | 2527 | @code{nil} (don't use flow control), the symbol @code{hw} (use RTS/CTS |
| 2522 | (use RTS/CTS hardware flowcontrol), or the symbol @code{sw} (use | 2528 | hardware flow control), or the symbol @code{sw} (use XON/XOFF software |
| 2523 | XON/XOFF software flowcontrol). If @var{flowcontrol} is not given, no | 2529 | flow control). If @var{flowcontrol} is not given, it defaults to no |
| 2524 | flowcontrol is used. | 2530 | flow control. |
| 2525 | @end table | 2531 | @end table |
| 2526 | 2532 | ||
| 2527 | @code{serial-process-configure} is called by @code{make-serial-process} for the | 2533 | @code{serial-process-configure} is called by @code{make-serial-process} for the |
| @@ -1566,6 +1566,7 @@ invisible-p to check whether it would cause the text to be invisible. | |||
| 1566 | Convenient when checking invisibility of text with no buffer position | 1566 | Convenient when checking invisibility of text with no buffer position |
| 1567 | (e.g. in before/after-strings). | 1567 | (e.g. in before/after-strings). |
| 1568 | 1568 | ||
| 1569 | +++ | ||
| 1569 | *** `clear-image-cache' can be told to flush only images of a specific file. | 1570 | *** `clear-image-cache' can be told to flush only images of a specific file. |
| 1570 | 1571 | ||
| 1571 | *** `vertical-motion' can now be given a goal column. | 1572 | *** `vertical-motion' can now be given a goal column. |
| @@ -1623,12 +1624,14 @@ specification. | |||
| 1623 | the same matching as `looking-at' and `string-match' without changing | 1624 | the same matching as `looking-at' and `string-match' without changing |
| 1624 | the match data. | 1625 | the match data. |
| 1625 | 1626 | ||
| 1627 | +++ | ||
| 1626 | *** The two new functions `make-serial-process' and | 1628 | *** The two new functions `make-serial-process' and |
| 1627 | `serial-process-configure' provide a Lisp interface to the new serial | 1629 | `serial-process-configure' provide a Lisp interface to the new serial |
| 1628 | port support (see Emacs changes, above). | 1630 | port support (see Emacs changes, above). |
| 1629 | 1631 | ||
| 1630 | ** Miscellaneous new variables | 1632 | ** Miscellaneous new variables |
| 1631 | 1633 | ||
| 1634 | +++ | ||
| 1632 | *** `this-command-keys-shift-translated' is non-nil if the key | 1635 | *** `this-command-keys-shift-translated' is non-nil if the key |
| 1633 | sequence invoking the current command was found by shift-translation. | 1636 | sequence invoking the current command was found by shift-translation. |
| 1634 | 1637 | ||