aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2008-10-21 14:45:34 +0000
committerEli Zaretskii2008-10-21 14:45:34 +0000
commit80e6b6df5e610ac878ce9751536ade0eb703ab42 (patch)
tree5065a705e3d18022f19f9deab2dfc5d2adfd1434
parentf46684418b8b7bc11a60cd9f46292ead18dc501a (diff)
downloademacs-80e6b6df5e610ac878ce9751536ade0eb703ab42.tar.gz
emacs-80e6b6df5e610ac878ce9751536ade0eb703ab42.zip
(Serial Ports): Fix wording and improve markup.
-rw-r--r--doc/lispref/ChangeLog2
-rw-r--r--doc/lispref/processes.texi164
-rw-r--r--etc/NEWS3
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 @@
12008-10-21 Eli Zaretskii <eliz@gnu.org> 12008-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
2371used similar to a subprocess or network process. You can send and 2371used similar to a subprocess or network process. You can send and
2372receive data and configure the serial port. A serial process object 2372receive data and configure the serial port. A serial process object
2373has no process ID, and you can't send signals to it. 2373has no process ID, you can't send signals to it, and the status codes
2374are 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
2375the process buffer close the connection, but this does not affect the 2376the process buffer close the connection, but this does not affect the
2376device connected to the serial port. 2377device 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}
2379for a process object representing a serial port. 2380for 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
2384Start a terminal-emulator for a serial port in a new buffer. 2385Start 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
2386could be @file{/dev/ttyS0} on Unix. On Windows, this could be 2387example, this could be @file{/dev/ttyS0} on Unix. On Windows, this
2387@file{COM1}, or @file{\\.\COM10} (double the backslashes in strings). 2388could be @file{COM1}, or @file{\\.\COM10} (double the backslashes in
2389Lisp 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
2390is a common value. The buffer is in Term mode; see @code{term-mode} 2392is a common value. The buffer is in Term mode; see @ref{Term Mode,,,
2391for the commands to use in that buffer. You can change the speed and 2393emacs, The GNU Emacs Manual}, for the commands to use in that buffer.
2392the configuration in the mode line menu. @end defun 2394You 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 2398This function creates a process and a buffer. Arguments are specified
2396are specified as keyword/argument pairs. The following arguments are 2399as keyword/argument pairs. Here's the list of the meaningful keywords:
2397defined:
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. 2403This is the name of the serial port. On Unix and GNU systems, this is
2402For example, this could be @file{/dev/ttyS0} on Unix. On Windows, 2404a file name such as @file{/dev/ttyS0}. On Windows, this could be
2403this 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}, 2409The speed of the serial port in bits per second. This function calls
2408which 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 2413The name of the process. If @var{name} is not given, @var{port} will
2412value of @var{port} is used. 2414serve 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 2417The buffer to associate with the process. The value could be either a
2416process. Process output goes at the end of that buffer, unless you 2418buffer or a string that names a buffer. Process output goes at the
2417specify an output stream or filter function to handle the output. If 2419end of that buffer, unless you specify an output stream or filter
2418@var{buffer} is not given, the value of @var{name} is used. 2420function to handle the output. If @var{buffer} is not given, the
2419 2421process buffer's name is taken from the value of the @code{:name}
2420@item :coding coding 2422keyword.
2423
2424@item :coding @var{coding}
2421If @var{coding} is a symbol, it specifies the coding system used for 2425If @var{coding} is a symbol, it specifies the coding system used for
2422both reading and writing for this process. If @var{coding} is a cons 2426both 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
2429to determine the coding systems from data itself.
2425 2430
2426@item :noquery bool 2431@item :noquery @var{query-flag}
2427When exiting Emacs, query the user if @var{bool} is @code{nil} and the 2432Initialize the process query flag to @var{query-flag}. @xref{Query
2428process is running. If @var{bool} is not given, query before exiting. 2433Before Exit}. The flags defaults to @code{nil} if unspecified.
2429 2434
2430@item :stop bool 2435@item :stop @var{bool}
2431Start process in the @code{stopped} state if @var{bool} is 2436Start process in the @code{stopped} state if @var{bool} is
2432non-@code{nil}. In the stopped state, a serial process does not 2437non-@code{nil}. In the stopped state, a serial process does not
2433accept incoming data, but you can send outgoing data. The stopped 2438accept incoming data, but you can send outgoing data. The stopped
2434state is cleared by @code{continue-process} and set by 2439state 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}
2438Install @var{filter} as the process filter. 2443Install @var{filter} as the process filter.
2439 2444
2440@item :sentinel sentinel 2445@item :sentinel @var{sentinel}
2441Install @var{sentinel} as the process sentinel. 2446Install @var{sentinel} as the process sentinel.
2442 2447
2443@item :plist plist 2448@item :plist @var{plist}
2444Install @var{plist} as the initial plist of the process. 2449Install @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
2478Configure a serial port. Arguments are specified as keyword/argument 2484This functions configures a serial port connection. Arguments are
2479pairs. Attributes that are not given are re-initialized from the 2485specified as keyword/argument pairs. Attributes that are not given
2480process's current configuration (available via the function 2486are re-initialized from the process's current configuration (available
2481@code{process-contact}) or set to reasonable default values. The 2487via the function @code{process-contact}) or set to reasonable default
2482following arguments are defined: 2488values. 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}
2489Any of these arguments can be given to identify the process that is to 2495Any of these arguments can be given to identify the process that is to
2490be configured. If none of these arguments is given, the current 2496be configured. If none of these arguments is given, the current
2491buffer's process is used. 2497buffer'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 2500The speed of the serial port in bits per second, also called @dfn{baud
2495called baud rate. Any value can be given for @var{speed}, but most 2501rate}. Any value can be given for @var{speed}, but most serial ports
2496serial ports work only at a few defined values between 1200 and 2502work only at a few defined values between 1200 and 115200, with 9600
2497115200, with 9600 being the most common value. If @var{speed} is 2503being 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 2504port is not configured any further, i.e., all other arguments are
2499other arguments are ignored. This may be useful for special serial 2505ignored. This may be useful for special serial ports such as
2500ports such as Bluetooth-to-serial converters which can only be 2506Bluetooth-to-serial converters which can only be configured through AT
2501configured through AT commands. A value of @code{nil} for @var{speed} 2507commands sent through the connection. A value of @code{nil} for
2502can 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. 2512The number of bits per byte, which can be 7 or 8. If @var{bytesize}
2507If @var{bytesize} is not given or @code{nil}, a value of 8 is used. 2513is 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 2516The 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
2512parity). If @var{parity} is not given, no parity is used. 2518parity). 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 2521The number of stopbits used to terminate a transmission
2516transmission. @var{stopbits} can be 1 or 2. If @var{stopbits} is not 2522of each byte. @var{stopbits} can be 1 or 2. If @var{stopbits} is not
2517given or @code{nil}, 1 stopbit is used. 2523given 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 2526The type of flow control to use for this connection, which is either
2521is 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 2528hardware flow control), or the symbol @code{sw} (use XON/XOFF software
2523XON/XOFF software flowcontrol). If @var{flowcontrol} is not given, no 2529flow control). If @var{flowcontrol} is not given, it defaults to no
2524flowcontrol is used. 2530flow 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
diff --git a/etc/NEWS b/etc/NEWS
index 81dd4930601..436ec1b4a3b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1566,6 +1566,7 @@ invisible-p to check whether it would cause the text to be invisible.
1566Convenient when checking invisibility of text with no buffer position 1566Convenient 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.
1623the same matching as `looking-at' and `string-match' without changing 1624the same matching as `looking-at' and `string-match' without changing
1624the match data. 1625the 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
1628port support (see Emacs changes, above). 1630port 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
1633sequence invoking the current command was found by shift-translation. 1636sequence invoking the current command was found by shift-translation.
1634 1637