annotate lisp/lpr.el @ 94414:d86cb59eea9f

2008-04-27 Carsten Dominik <dominik@science.uva.nl> * org/org.el (org-html-level-start): Always have id's in HTML (org-export-as-html): Use `org-link-protocols' to retrieve the export form of the link. (org-add-link-type): Final parameter renamed from PUBLISH. Better documentation of how it is to be used. Avoid double entries for the same link type. (org-add-link-props): New function. (org-modules-loaded): New variable. (org-load-modules-maybe, org-set-modules): New function. (org-modules): New option. (org-mode, org-cycle, orgstruct-mode, org-run-like-in-org-mode) (orgtbl-mode, org-store-link, org-insert-link-global) (org-open-at-point): Call `org-load-modules-maybe'. (org-search-view): Add more text properties. (org-agenda-schedule, org-agenda-deadline): Allow also in search-type agendas. (org-search-view): Order of arguments has been changed. Interpret prefix-arg as TODO-ONLY. (org-agenda, org-run-agenda-series, org-agenda-manipulate-query): Take new argument order of `org-search-view' into account. (org-todo-only): New variable. (org-search-syntax-table): New variable and function. (org-search-view): Do the search with the special syntax table. (define-obsolete-function-alias): Make work with XEmacs. (org-add-planning-info): Use old date as default when modifying an existing deadline or scheduled item. (org-agenda-compute-time-span): Make argument N optional. (org-agenda-format-date-aligned): Require `cal-iso'. (org-agenda-list): Include week into into agenda heading, don't list it at each date (only on Mondays). (org-read-date-analyze): Define local variable `iso-date'. (org-agenda-format-date-aligned): Remove dependency on `calendar-time-from-absolute'. (org-remember-apply-template, org-go-to-remember-target): Interpret filenames relative to `org-directory'. (org-complete): Silently fail when trying to complete keywords that don't have a default value. (org-get-current-options): Added a #+DATE: option. (org-additional-option-like-keywords): Removed "DATE:" from the list of additional keywords. (org-export-as-html): Removed (current-time) as unnecessary second argument of `format-time-string'. (org-clock-find-position): Handle special case at end of buffer. (org-agenda-day-view): New argument DAY-OF-YEAR, pass it on to `org-agenda-change-time-span'. (org-agenda-week-view): New argument ISO-WEEK, pass it on to `org-agenda-change-time-span'. (org-agenda-month-view): New argument MONTH, pass it on to `org-agenda-change-time-span'. (org-agenda-year-view): New argument YEAR, pass it on to `org-agenda-change-time-span'. (org-agenda-change-time-span): New optional argument N, pass it on to `org-agenda-compute-time-span'. (org-agenda-compute-time-span): New argument N, interpret it by changing the starting day. (org-small-year-to-year): New function. (org-scheduled-past-days): Respect `org-scheduled-past-days'. (org-auto-repeat-maybe): Make sure that repeating dates are pushed into the future, and that the shift is at least one interval, never 0. (org-update-checkbox-count): Fix bug with checkbox counting. (org-add-note): New command. (org-add-log-setup): Renamed from `org-add-log-maybe'. (org-log-note-headings): New entry for plain notes (i.e. notes not related to state changes or clocking). (org-get-org-file): Check for availability of `remember-data-file'. (org-cached-entry-get): Allow a regexp value for `org-use-property-inheritance'. (org-use-property-inheritance): Allow regexp value. Fix bug in customization type. (org-use-tag-inheritance): Allow a list and a regexp value for this variable. (org-scan-tags, org-get-tags-at): Implement selective tag inheritance. (org-entry-get): Respect value `selective' for the INHERIT argument. (org-tag-inherit-p, org-property-inherit-p): New functions. (org-agenda-format-date-aligned): Allow 10 characters for weekday, to acomodate German locale. (org-add-archive-files): New function. (org-agenda-files): New argument `ext', to get archive files as well. (org-tbl-menu): Protect the use of variables that are only available when org-table.el gets loaded. (org-read-agenda-file-list): Error if `org-agenda-files' is a single directory. (org-open-file): Allow a batch process to trigger waiting after executing a system command. (org-store-link): Link to headline when there is not target and no region in an org-mode buffer when creating a link. (org-link-types-re): New variable. (org-make-link-regexps): Compute `org-link-types-re'. (org-make-link-description-function): New option. (org-agenda-date, org-agenda-date-weekend): New faces. (org-archive-sibling-heading): New option. (org-archive-to-archive-sibling): New function. (org-iswitchb): New command. (org-buffer-list): New function. (org-agenda-columns): Also try the #+COLUMNS line in the buffer associated with the entry at point (or with the first entry in the agenda view). (org-modules): Add entry for org-bibtex.el. (org-completion-fallback-command): Moved into `org-completion' group. (org-clock-heading-function): Moved to `org-progress' group. (org-auto-repeat-maybe): Make sure that a note can be enforces if `org-log-repeat' is `note'. (org-modules): Allow additional symbols for external packages. (org-ctrl-c-ctrl-c): Allow for `org-clock-overlays' to be undefined. (org-clock-goto): Hide drawers after showing an entry with `org-clock-goto.' (org-shiftup, org-shiftdown, org-shiftright, org-shiftleft): Try also a clocktable block shift. (org-clocktable-try-shift): New function. (org-columns-hscoll-title): New function. (org-columns-previous-hscroll): New variable. (org-columns-full-header-line-format): New variable. (org-columns-display-here-title, org-columns-remove-overlays): Install `org-columns-hscoll-title' in post-command-hook. * org/org.el: Split into many small files. * org/org-agenda.el: New file, split off from org.el. * org/org-archive.el: New file, split off from org.el. * org/org-bbdb.el: New file. * org/org-bibtex.el: New file, split off from org.el. * org/org-clock.el: New file, split off from org.el. * org/org-colview.el: New file, split off from org.el. * org/org-compat.el: New file, split off from org.el. * org/org-exp.el: New file, split off from org.el. * org/org-faces.el: New file, split off from org.el. * org/org-gnus.el: New file, split off from org.el. * org/org-info.el: New file, split off from org.el. * org/org-infojs.el: New file. * org/org-irc.el: New file. * org/org-macs.el: New file, split off from org.el. * org/org-mew.el: New file. * org/org-mhe.el: New file, split off from org.el. * org/org-publish.el: New file, split off from org.el. * org/org-remember.el: New file, split off from org.el. * org/org-rmail.el: New file, split off from org.el. * org/org-table.el: New file, split off from org.el. * org/org-vm.el: New file, split off from org.el. * org/org-wl.el: New file, split off from org.el. 2008-04-27 Jason Riedy <jason@acm.org> * lisp/org-table.el (orgtbl-to-generic): Add a :remove-nil-lines parameter that supresses lines that evaluate to NIL. (orgtbl-get-fmt): New inline function for picking apart formats that may be lists. (orgtbl-apply-fmt): New inline function for applying formats that may be functions. (orgtbl-eval-str): New inline function for strings that may be functions. (orgtbl-format-line, orgtbl-to-generic): Use and document. (orgtbl-to-latex, orgtbl-to-texinfo): Document. (*orgtbl-llfmt*, *orgtbl-llstart*) (*orgtbl-llend*): Dynamic variables for last-line formatting. (orgtbl-format-section): Shift formatting to support detecting the last line and formatting it specially. (orgtbl-to-generic): Document :ll* formats. Set to the non-ll formats unless overridden. (orgtbl-to-latex): Suggest using :llend to suppress the final \\. (*orgtbl-table*, *orgtbl-rtn*): Dynamically bound variables to hold the input collection of lines and output formatted text. (*orgtbl-hline*, *orgtbl-sep*, *orgtbl-fmt*, *orgtbl-efmt*, (*orgtbl-lfmt*, *orgtbl-lstart*, *orgtbl-lend*): Dynamically bound format parameters. (orgtbl-format-line): New function encapsulating formatting for a single line. (orgtbl-format-section): Similar for each section. Rebinding the dynamic vars customizes the formatting for each section. (orgtbl-to-generic): Use orgtbl-format-line and orgtbl-format-section. (org-get-param): Now unused, so delete. (orgtbl-gather-send-defs): New function to gather all the SEND definitions before a table. (orgtbl-send-replace-tbl): New function to find the RECEIVE corresponding to the current name. (orgtbl-send-table): Use the previous two functions and implement multiple destinations for each table. * doc/org.texi (A LaTeX example): Note that fmt may be a one-argument function, and efmt may be a two-argument function. (Radio tables): Document multiple destinations. 2008-04-27 Carsten Dominik <dominik@science.uva.nl> * org/org-agenda.el (org-add-to-diary-list): New function. (org-prefix-has-effort): New variable. (org-sort-agenda-noeffort-is-high): New option. (org-agenda-columns-show-summaries) (org-agenda-columns-compute-summary-properties): New options. (org-format-agenda-item): Compute the duration of the item. (org-agenda-weekend-days): New variable. (org-agenda-list, org-timeline): Use the proper faces for dates in the agenda and timeline buffers. (org-agenda-archive-to-archive-sibling): New command. (org-agenda-start-with-clockreport-mode): New option. (org-agenda-clockreport-parameter-plist): New option. (org-agenda-clocktable-mode): New variable. (org-agenda-deadline-leaders): Allow a function value for the deadline leader. (org-agenda-get-deadlines): Deal with new function value. * lisp/org-clock.el (org-clock): New customization group. (org-clock-into-drawer, org-clock-out-when-done) (org-clock-in-switch-to-state, org-clock-heading-function): Moved into the new group. (org-clock-out-remove-zero-time-clocks): New option. (org-clock-out): Use `org-clock-out-remove-zero-time-clocks'. (org-dblock-write:clocktable): Allow a Lisp form for the scope parameter. (org-dblock-write:clocktable): Fixed bug with total time calculation. (org-dblock-write:clocktable): Request the unrestricted list of files. (org-get-clocktable): New function. (org-dblock-write:clocktable): Make sure :tstart and :tend can not only be strings but also integers (an absolute day number) and lists (m d y). * org/org-colview.el (org-columns-next-allowed-value) (org-columns-edit-value): Limit the effort for updatig in the agenda to recomputing a single file. (org-columns-compute): Only write property value if it has changed. This avoids raising the buffer-change-flag unnecessarily. (org-agenda-colview-summarize) (org-agenda-colview-compute): New functions. (org-agenda-columns): Call `org-agenda-colview-summarize'. * org/org-exp.el (org-export-run-in-background): New option. (org-export-icalendar): Allow a batch process to trigger waiting after executing a system command. (org-export-preprocess-string): Renamed-from `org-cleaned-string-for-export'. (org-export-html-style): Made target class look like normal text. (org-export-as-html): Make use of the better proprocessing in `org-cleaned-string-for-export'. (org-cleaned-string-for-export): Better treatment of heuristic targets, many more internal links will now work in HTML export. (org-get-current-options): Incorporate LINK_UP, LINK_HOME, and INFOJS. (org-export-inbuffer-options-extra): New variable. (org-export-options-filters): New hook. (org-infile-export-plist): Find also the settings keywords in `org-export-inbuffer-options-extra'. (org-infile-export-plist): Allow multiple #+OPTIONS lines and multiple #+INFOJS_OPT lines. (org-export-html-handle-js-options): New function. (org-export-html-infojs-setup): New option. (org-export-as-html): Call `org-export-html-handle-js-options'. Add autoload to all entry points. (org-skip-comments): Function removed. * org/org-table.el (org-table-make-reference): Extra parenthesis around single fields, to make sure that algebraic formulas get correctly interpreted by calc. (org-table-current-column): No longer interactive. * org/org-export-latex.el (org-export-latex-preprocess): Renamed from `org-export-latex-cleaned-string'. 2008-04-27 Bastien Guerry <bzg@altern.org> * org/org-publish.el (org-publish-get-base-files-1): New function. (org-publish-get-base-files): Use it. (org-publish-temp-files): New variable. Don't require 'dired-aux anymore. (org-publish-initial-buffer): New variable. (org-publish-org-to, org-publish): Use it. (org-publish-get-base-files-1): Bug fix: get the proper list of files when recursing thru a directory. (org-publish-get-base-files): Use the :exclude property to skip both files and directories.
author Carsten Dominik <dominik@science.uva.nl>
date Sun, 27 Apr 2008 18:33:39 +0000
parents 1e3a407766b9
children ee5932bf781d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38412
253f761ad37b Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents: 36420
diff changeset
1 ;;; lpr.el --- print Emacs buffer on line printer
659
505130d1ddf8 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 617
diff changeset
2
64762
41bb365f41c4 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64091
diff changeset
3 ;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2002, 2003,
79721
73661ddc7ac7 Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78236
diff changeset
4 ;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
846
20674ae6bf52 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 811
diff changeset
5
38412
253f761ad37b Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents: 36420
diff changeset
6 ;; Maintainer: FSF
253f761ad37b Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents: 36420
diff changeset
7 ;; Keywords: unix
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 659
diff changeset
8
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
78236
9355f9b7bbff Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 78021
diff changeset
13 ;; the Free Software Foundation; either version 3, or (at your option)
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 ;; any later version.
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13894
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64091
6fb026ad601f Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 64015
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
6fb026ad601f Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 64015
diff changeset
24 ;; Boston, MA 02110-1301, USA.
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25
2307
10e417efb12a Added or corrected Commentary sections
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 1671
diff changeset
26 ;;; Commentary:
10e417efb12a Added or corrected Commentary sections
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 1671
diff changeset
27
35743
4db4ab2d1dd4 (lpr-windows-system, lpr-lp-system): Add autoload cookies.
Gerd Moellmann <gerd@gnu.org>
parents: 35724
diff changeset
28 ;; Commands to send the region or a buffer to your printer. Entry points
45461
f016f29dad07 Fix typo.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 38412
diff changeset
29 ;; are `lpr-buffer', `print-buffer', `lpr-region', or `print-region'; option
22679
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
30 ;; variables include `printer-name', `lpr-switches' and `lpr-command'.
2307
10e417efb12a Added or corrected Commentary sections
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 1671
diff changeset
31
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 659
diff changeset
32 ;;; Code:
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33
35743
4db4ab2d1dd4 (lpr-windows-system, lpr-lp-system): Add autoload cookies.
Gerd Moellmann <gerd@gnu.org>
parents: 35724
diff changeset
34 ;;;###autoload
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
35 (defvar lpr-windows-system
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
36 (memq system-type '(emx win32 w32 mswindows ms-dos windows-nt)))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
37
35743
4db4ab2d1dd4 (lpr-windows-system, lpr-lp-system): Add autoload cookies.
Gerd Moellmann <gerd@gnu.org>
parents: 35724
diff changeset
38 ;;;###autoload
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
39 (defvar lpr-lp-system
87595
4c6c79916238 * configure.in: Remove references to unsupported systems.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 78236
diff changeset
40 (memq system-type '(usg-unix-v hpux irix)))
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
41
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
42
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
43 (defgroup lpr nil
64015
d2af21b7c1a4 (lpr): Finish `defgroup' description with period.
Juanma Barranquero <lekktu@gmail.com>
parents: 52401
diff changeset
44 "Print Emacs buffer on line printer."
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
45 :group 'wp)
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
46
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
47
22679
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
48 ;;;###autoload
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
49 (defcustom printer-name
79907
b1054d4fe6c7 (printer-name): Do not set on MS Windows.
Jason Rumney <jasonr@gnu.org>
parents: 79721
diff changeset
50 (and (memq system-type '(emx ms-dos)) "PRN")
22679
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
51 "*The name of a local printer to which data is sent for printing.
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
52 \(Note that PostScript files are sent to `ps-printer-name', which see.\)
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
53
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
54 On Unix-like systems, a string value should be a name understood by
24091
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
55 lpr's -P option; otherwise the value should be nil.
22679
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
56
24091
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
57 On MS-DOS and MS-Windows systems, a string value is taken as the name of
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
58 a printer device or port, provided `lpr-command' is set to \"\".
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
59 Typical non-default settings would be \"LPT1\" to \"LPT3\" for parallel
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
60 printers, or \"COM1\" to \"COM4\" or \"AUX\" for serial printers, or
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
61 \"//hostname/printer\" for a shared network printer. You can also set
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
62 it to the name of a file, in which case the output gets appended to that
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
63 file. If you want to discard the printed output, set this to \"NUL\"."
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
64 :type '(choice :menu-tag "Printer Name"
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
65 :tag "Printer Name"
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
66 (const :tag "Default" nil)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
67 ;; could use string but then we lose completion for files.
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
68 (file :tag "Name"))
22679
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
69 :group 'lpr)
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
70
269
2ca8cdb96a9f *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 262
diff changeset
71 ;;;###autoload
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
72 (defcustom lpr-switches nil
13803
e0bae9f528fe (lpr-switches, lpr-add-switches): Doc fixes.
Karl Heuer <kwzh@gnu.org>
parents: 11831
diff changeset
73 "*List of strings to pass as extra options for the printer program.
22679
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
74 It is recommended to set `printer-name' instead of including an explicit
08902da4c832 (printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 21569
diff changeset
75 switch on this list.
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
76 See `lpr-command'."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
77 :type '(repeat (string :tag "Argument"))
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
78 :group 'lpr)
5267
f7ea27a729b8 (lpr-headers-switches): Treat hpux like usg-unix-v.
Richard M. Stallman <rms@gnu.org>
parents: 5004
diff changeset
79
36420
213d5ac23246 (lpr-add-switches): Default to t on gnu/linux.
Richard M. Stallman <rms@gnu.org>
parents: 36419
diff changeset
80 (defcustom lpr-add-switches (memq system-type '(berkeley-unix gnu/linux))
213d5ac23246 (lpr-add-switches): Default to t on gnu/linux.
Richard M. Stallman <rms@gnu.org>
parents: 36419
diff changeset
81 "*Non-nil means construct `-T' and `-J' options for the printer program.
13803
e0bae9f528fe (lpr-switches, lpr-add-switches): Doc fixes.
Karl Heuer <kwzh@gnu.org>
parents: 11831
diff changeset
82 These are made assuming that the program is `lpr';
e0bae9f528fe (lpr-switches, lpr-add-switches): Doc fixes.
Karl Heuer <kwzh@gnu.org>
parents: 11831
diff changeset
83 if you are using some other incompatible printer program,
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
84 this variable should be nil."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
85 :type 'boolean
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
86 :group 'lpr)
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
88 (defcustom lpr-printer-switch
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
89 (if lpr-lp-system
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
90 "-d "
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
91 "-P")
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
92 "*Printer switch, that is, something like \"-P\", \"-d \", \"/D:\", etc.
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
93 This switch is used in conjunction with `printer-name'."
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
94 :type '(choice :menu-tag "Printer Name Switch"
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
95 :tag "Printer Name Switch"
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
96 (const :tag "None" nil)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
97 (string :tag "Printer Switch"))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
98 :group 'lpr)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
99
1068
2fee5d1fe47e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 922
diff changeset
100 ;;;###autoload
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
101 (defcustom lpr-command
24091
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
102 (cond
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
103 (lpr-windows-system
24091
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
104 "")
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
105 (lpr-lp-system
24091
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
106 "lp")
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
107 (t
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
108 "lpr"))
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
109 "*Name of program for printing a file.
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
110
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
111 On MS-DOS and MS-Windows systems, if the value is an empty string then
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
112 Emacs will write directly to the printer port named by `printer-name'.
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
113 The programs `print' and `nprint' (the standard print programs on
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
114 Windows NT and Novell Netware respectively) are handled specially, using
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
115 `printer-name' as the destination for output; any other program is
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
116 treated like `lpr' except that an explicit filename is given as the last
1874c3236349 (printer-name): Update docstring about usage on MS-DOS
Andrew Innes <andrewi@gnu.org>
parents: 23264
diff changeset
117 argument."
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
118 :type 'string
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
119 :group 'lpr)
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120
10637
6e25c10f6fe8 (lpr-headers-switches): Default is nil.
Richard M. Stallman <rms@gnu.org>
parents: 10054
diff changeset
121 ;; Default is nil, because that enables us to use pr -f
6e25c10f6fe8 (lpr-headers-switches): Default is nil.
Richard M. Stallman <rms@gnu.org>
parents: 10054
diff changeset
122 ;; which is more reliable than pr with no args, which is what lpr -p does.
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
123 (defcustom lpr-headers-switches nil
13894
eeee95f4d989 (lpr-page-header-switches, lpr-headers-switches): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 13803
diff changeset
124 "*List of strings of options to request page headings in the printer program.
10637
6e25c10f6fe8 (lpr-headers-switches): Default is nil.
Richard M. Stallman <rms@gnu.org>
parents: 10054
diff changeset
125 If nil, we run `lpr-page-header-program' to make page headings
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
126 and print the result."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
127 :type '(repeat (string :tag "Argument"))
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
128 :group 'lpr)
5267
f7ea27a729b8 (lpr-headers-switches): Treat hpux like usg-unix-v.
Richard M. Stallman <rms@gnu.org>
parents: 5004
diff changeset
129
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
130 (defcustom print-region-function nil
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 "Function to call to print the region on a printer.
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
132 See definition of `print-region-1' for calling conventions."
35969
db288677db54 (print-region-function): Fix :type.
Dave Love <fx@gnu.org>
parents: 35743
diff changeset
133 :type '(choice (const nil) function)
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
134 :group 'lpr)
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
136 (defcustom lpr-page-header-program "pr"
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
137 "*Name of program for adding page headers to a file."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
138 :type 'string
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
139 :group 'lpr)
9187
8cf9181c119e (print-region-1): Use them instead of just pr.
Richard M. Stallman <rms@gnu.org>
parents: 8598
diff changeset
140
17813
2e13bced7aff (lpr-page-header-switches): Use -F, not -f.
Richard M. Stallman <rms@gnu.org>
parents: 17695
diff changeset
141 ;; Berkeley systems support -F, and GNU pr supports both -f and -F,
2e13bced7aff (lpr-page-header-switches): Use -F, not -f.
Richard M. Stallman <rms@gnu.org>
parents: 17695
diff changeset
142 ;; So it looks like -F is a better default.
78021
e12f9e8fde4d (lpr-page-header-switches): Move %s to separate element for correct
Glenn Morris <rgm@gnu.org>
parents: 75347
diff changeset
143 (defcustom lpr-page-header-switches '("-h" "%s" "-F")
73027
575850f5bd53 Adjust X-URL
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 72747
diff changeset
144 "*List of strings to use as options for the page-header-generating program.
78021
e12f9e8fde4d (lpr-page-header-switches): Move %s to separate element for correct
Glenn Morris <rgm@gnu.org>
parents: 75347
diff changeset
145 If `%s' appears in any of the strings, it is substituted by the page title.
e12f9e8fde4d (lpr-page-header-switches): Move %s to separate element for correct
Glenn Morris <rgm@gnu.org>
parents: 75347
diff changeset
146 Note that for correct quoting, `%s' should normally be a separate element.
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
147 The variable `lpr-page-header-program' specifies the program to use."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
148 :type '(repeat string)
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 14188
diff changeset
149 :group 'lpr)
9187
8cf9181c119e (print-region-1): Use them instead of just pr.
Richard M. Stallman <rms@gnu.org>
parents: 8598
diff changeset
150
256
7e4c7ef44243 *** empty log message ***
Roland McGrath <roland@gnu.org>
parents: 216
diff changeset
151 ;;;###autoload
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 (defun lpr-buffer ()
27007
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
153 "Print buffer contents without pagination or page headers.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
154 See the variables `lpr-switches' and `lpr-command'
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
155 for customization of the printer command."
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 (interactive)
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 (print-region-1 (point-min) (point-max) lpr-switches nil))
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158
256
7e4c7ef44243 *** empty log message ***
Roland McGrath <roland@gnu.org>
parents: 216
diff changeset
159 ;;;###autoload
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 (defun print-buffer ()
26219
af8d23cd7220 (print-buffer): Doc-string fix.
Gerd Moellmann <gerd@gnu.org>
parents: 24091
diff changeset
161 "Paginate and print buffer contents.
27007
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
162
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
163 The variable `lpr-headers-switches' controls how to paginate.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
164 If it is nil (the default), we run the `pr' program (or whatever program
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
165 `lpr-page-header-program' specifies) to paginate.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
166 `lpr-page-header-switches' specifies the switches for that program.
26219
af8d23cd7220 (print-buffer): Doc-string fix.
Gerd Moellmann <gerd@gnu.org>
parents: 24091
diff changeset
167
27007
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
168 Otherwise, the switches in `lpr-headers-switches' are used
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
169 in the print command itself; we expect them to request pagination.
49597
e88404e8f2cf Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 45461
diff changeset
170
27007
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
171 See the variables `lpr-switches' and `lpr-command'
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
172 for further customization of the printer command."
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 (interactive)
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 (print-region-1 (point-min) (point-max) lpr-switches t))
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175
256
7e4c7ef44243 *** empty log message ***
Roland McGrath <roland@gnu.org>
parents: 216
diff changeset
176 ;;;###autoload
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 (defun lpr-region (start end)
27007
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
178 "Print region contents without pagination or page headers.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
179 See the variables `lpr-switches' and `lpr-command'
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
180 for customization of the printer command."
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 (interactive "r")
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182 (print-region-1 start end lpr-switches nil))
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
183
256
7e4c7ef44243 *** empty log message ***
Roland McGrath <roland@gnu.org>
parents: 216
diff changeset
184 ;;;###autoload
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 (defun print-region (start end)
27007
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
186 "Paginate and print the region contents.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
187
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
188 The variable `lpr-headers-switches' controls how to paginate.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
189 If it is nil (the default), we run the `pr' program (or whatever program
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
190 `lpr-page-header-program' specifies) to paginate.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
191 `lpr-page-header-switches' specifies the switches for that program.
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
192
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
193 Otherwise, the switches in `lpr-headers-switches' are used
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
194 in the print command itself; we expect them to request pagination.
49597
e88404e8f2cf Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 45461
diff changeset
195
27007
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
196 See the variables `lpr-switches' and `lpr-command'
2d337fafb392 (lpr-buffer, print-buffer, lpr-region, print-region): Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 26219
diff changeset
197 for further customization of the printer command."
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198 (interactive "r")
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 (print-region-1 start end lpr-switches t))
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 (defun print-region-1 (start end switches page-headers)
8113
6a12a2845ccc (print-region-1): Essentially undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 8021
diff changeset
202 ;; On some MIPS system, having a space in the job name
6a12a2845ccc (print-region-1): Essentially undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 8021
diff changeset
203 ;; crashes the printer demon. But using dashes looks ugly
6a12a2845ccc (print-region-1): Essentially undo previous change.
Richard M. Stallman <rms@gnu.org>
parents: 8021
diff changeset
204 ;; and it seems to annoying to do for that MIPS system.
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
205 (let ((name (concat (buffer-name) " Emacs buffer"))
8020
23deb92071c6 (print-region-1): Don't include a space in the job name.
Richard M. Stallman <rms@gnu.org>
parents: 7300
diff changeset
206 (title (concat (buffer-name) " Emacs buffer"))
21569
c1f86e273a38 (print-region-1): Stop using binary-process-{in,out}put,
Eli Zaretskii <eliz@gnu.org>
parents: 20278
diff changeset
207 ;; Make pipes use the same coding system as
c1f86e273a38 (print-region-1): Stop using binary-process-{in,out}put,
Eli Zaretskii <eliz@gnu.org>
parents: 20278
diff changeset
208 ;; writing the buffer to a file would.
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
209 (coding-system-for-write (or coding-system-for-write
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
210 buffer-file-coding-system))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
211 (coding-system-for-read (or coding-system-for-read
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
212 buffer-file-coding-system))
10708
8a15461d4f64 (print-region-1): Include print options in echo area msgs.
Richard M. Stallman <rms@gnu.org>
parents: 10700
diff changeset
213 (width tab-width)
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
214 nswitches
10708
8a15461d4f64 (print-region-1): Include print options in echo area msgs.
Richard M. Stallman <rms@gnu.org>
parents: 10700
diff changeset
215 switch-string)
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 (save-excursion
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
217 (and page-headers lpr-headers-switches
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
218 ;; It's possible to use an lpr option to get page headers.
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
219 (setq switches (append (if (stringp lpr-headers-switches)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
220 (list lpr-headers-switches)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
221 lpr-headers-switches)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
222 switches)))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
223 (setq nswitches (lpr-flatten-list
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
224 (mapcar 'lpr-eval-switch ; Dynamic evaluation
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
225 switches))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
226 switch-string (if switches
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
227 (concat " with options "
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
228 (mapconcat 'identity switches " "))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
229 ""))
10708
8a15461d4f64 (print-region-1): Include print options in echo area msgs.
Richard M. Stallman <rms@gnu.org>
parents: 10700
diff changeset
230 (message "Spooling%s..." switch-string)
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 (if (/= tab-width 8)
10700
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
232 (let ((new-coords (print-region-new-buffer start end)))
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
233 (setq start (car new-coords)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
234 end (cdr new-coords)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
235 tab-width width)
4446
ff1f9d7addd9 (print-region-1): Make END a marker so untabify relocates it.
Richard M. Stallman <rms@gnu.org>
parents: 2382
diff changeset
236 (save-excursion
ff1f9d7addd9 (print-region-1): Make END a marker so untabify relocates it.
Richard M. Stallman <rms@gnu.org>
parents: 2382
diff changeset
237 (goto-char end)
ff1f9d7addd9 (print-region-1): Make END a marker so untabify relocates it.
Richard M. Stallman <rms@gnu.org>
parents: 2382
diff changeset
238 (setq end (point-marker)))
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 (untabify (point-min) (point-max))))
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240 (if page-headers
5267
f7ea27a729b8 (lpr-headers-switches): Treat hpux like usg-unix-v.
Richard M. Stallman <rms@gnu.org>
parents: 5004
diff changeset
241 (if lpr-headers-switches
10708
8a15461d4f64 (print-region-1): Include print options in echo area msgs.
Richard M. Stallman <rms@gnu.org>
parents: 10700
diff changeset
242 ;; We handled this above by modifying SWITCHES.
8a15461d4f64 (print-region-1): Include print options in echo area msgs.
Richard M. Stallman <rms@gnu.org>
parents: 10700
diff changeset
243 nil
10637
6e25c10f6fe8 (lpr-headers-switches): Default is nil.
Richard M. Stallman <rms@gnu.org>
parents: 10054
diff changeset
244 ;; Run a separate program to get page headers.
10700
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
245 (let ((new-coords (print-region-new-buffer start end)))
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
246 (apply 'call-process-region (car new-coords) (cdr new-coords)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
247 lpr-page-header-program t t nil
72747
4dea9a34fd2e (lpr-page-header-switches): Page title switch is one of them.
Eli Zaretskii <eliz@gnu.org>
parents: 68651
diff changeset
248 (mapcar (lambda (e) (format e title))
4dea9a34fd2e (lpr-page-header-switches): Page title switch is one of them.
Eli Zaretskii <eliz@gnu.org>
parents: 68651
diff changeset
249 lpr-page-header-switches)))
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
250 (setq start (point-min)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
251 end (point-max))))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
252 (apply (or print-region-function 'call-process-region)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
253 (nconc (list start end lpr-command
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
254 nil nil nil)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
255 (and lpr-add-switches
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
256 (list "-J" name))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
257 ;; These belong in pr if we are using that.
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
258 (and lpr-add-switches lpr-headers-switches
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
259 (list "-T" title))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
260 (and (stringp printer-name)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
261 (list (concat lpr-printer-switch
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
262 printer-name)))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
263 nswitches))
4446
ff1f9d7addd9 (print-region-1): Make END a marker so untabify relocates it.
Richard M. Stallman <rms@gnu.org>
parents: 2382
diff changeset
264 (if (markerp end)
ff1f9d7addd9 (print-region-1): Make END a marker so untabify relocates it.
Richard M. Stallman <rms@gnu.org>
parents: 2382
diff changeset
265 (set-marker end nil))
10708
8a15461d4f64 (print-region-1): Include print options in echo area msgs.
Richard M. Stallman <rms@gnu.org>
parents: 10700
diff changeset
266 (message "Spooling%s...done" switch-string))))
155
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267
5dfb6532c1b1 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268 ;; This function copies the text between start and end
10700
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
269 ;; into a new buffer, makes that buffer current.
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
270 ;; It returns the new range to print from the new current buffer
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
271 ;; as (START . END).
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
272
5267
f7ea27a729b8 (lpr-headers-switches): Treat hpux like usg-unix-v.
Richard M. Stallman <rms@gnu.org>
parents: 5004
diff changeset
273 (defun print-region-new-buffer (ostart oend)
10700
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
274 (if (string= (buffer-name) " *spool temp*")
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
275 (cons ostart oend)
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
276 (let ((oldbuf (current-buffer)))
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
277 (set-buffer (get-buffer-create " *spool temp*"))
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
278 (widen)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
279 (erase-buffer)
10700
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
280 (insert-buffer-substring oldbuf ostart oend)
f6f235bc26ba (print-region-new-buffer): Return new start and end.
Richard M. Stallman <rms@gnu.org>
parents: 10670
diff changeset
281 (cons (point-min) (point-max)))))
659
505130d1ddf8 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 617
diff changeset
282
2382
030b76db285a (printify-buffer) Added, debugged from Roland McGrath's printify-buffer code
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2307
diff changeset
283 (defun printify-region (begin end)
17695
5788aa5f0fd0 (printify-region): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 17414
diff changeset
284 "Replace nonprinting characters in region with printable representations.
5788aa5f0fd0 (printify-region): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 17414
diff changeset
285 The printable representations use ^ (for ASCII control characters) or hex.
5788aa5f0fd0 (printify-region): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 17414
diff changeset
286 The characters tab, linefeed, space, return and formfeed are not affected."
2382
030b76db285a (printify-buffer) Added, debugged from Roland McGrath's printify-buffer code
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2307
diff changeset
287 (interactive "r")
030b76db285a (printify-buffer) Added, debugged from Roland McGrath's printify-buffer code
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2307
diff changeset
288 (save-excursion
52098
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
289 (save-restriction
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
290 (narrow-to-region begin end)
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
291 (goto-char (point-min))
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
292 (let (c)
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
293 (while (re-search-forward "[\^@-\^h\^k\^n-\^_\177-\377]" nil t)
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
294 (setq c (preceding-char))
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
295 (delete-backward-char 1)
64015
d2af21b7c1a4 (lpr): Finish `defgroup' description with period.
Juanma Barranquero <lekktu@gmail.com>
parents: 52401
diff changeset
296 (insert (if (< c ?\s)
52098
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
297 (format "\\^%c" (+ c ?@))
6e131215906b printify-region fix
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 49597
diff changeset
298 (format "\\%02x" c))))))))
35724
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
299
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
300 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
301 ;; Functions hacked from `ps-print' package.
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
302
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
303 ;; Dynamic evaluation
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
304 (defun lpr-eval-switch (arg)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
305 (cond ((stringp arg) arg)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
306 ((functionp arg) (apply arg nil))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
307 ((symbolp arg) (symbol-value arg))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
308 ((consp arg) (apply (car arg) (cdr arg)))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
309 (t nil)))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
310
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
311 ;; `lpr-flatten-list' is defined here (copied from "message.el" and
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
312 ;; enhanced to handle dotted pairs as well) until we can get some
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
313 ;; sensible autoloads, or `flatten-list' gets put somewhere decent.
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
314
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
315 ;; (lpr-flatten-list '((a . b) c (d . e) (f g h) i . j))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
316 ;; => (a b c d e f g h i j)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
317
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
318 (defun lpr-flatten-list (&rest list)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
319 (lpr-flatten-list-1 list))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
320
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
321 (defun lpr-flatten-list-1 (list)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
322 (cond
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
323 ((null list) (list))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
324 ((consp list)
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
325 (append (lpr-flatten-list-1 (car list))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
326 (lpr-flatten-list-1 (cdr list))))
f2e26e453776 XEmacs compatibility and doc fixes from Vinicius Jose Latorre
Eli Zaretskii <eliz@gnu.org>
parents: 30101
diff changeset
327 (t (list list))))
2382
030b76db285a (printify-buffer) Added, debugged from Roland McGrath's printify-buffer code
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 2307
diff changeset
328
11831
7e5af94d9527 Add provide call.
Karl Heuer <kwzh@gnu.org>
parents: 10708
diff changeset
329 (provide 'lpr)
7e5af94d9527 Add provide call.
Karl Heuer <kwzh@gnu.org>
parents: 10708
diff changeset
330
93975
1e3a407766b9 Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 88056
diff changeset
331 ;; arch-tag: 21c3f821-ebec-4ca9-ac67-a81e4b75c62a
659
505130d1ddf8 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 617
diff changeset
332 ;;; lpr.el ends here