Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
9b1d7c34
Commit
9b1d7c34
authored
Nov 21, 2007
by
Vinicius Jose Latorre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ps-lpr-switches docstring fix.
parent
b541ccb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
lisp/ChangeLog
lisp/ChangeLog
+6
-0
lisp/ps-print.el
lisp/ps-print.el
+37
-3
No files found.
lisp/ChangeLog
View file @
9b1d7c34
2007-11-21 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* ps-print.el (ps-lpr-switches): Docstring fix.
(ps-string-list): New fun.
(ps-do-despool): Code fix.
2007-11-21 Juanma Barranquero <lekktu@gmail.com>
* w32-fns.el: Undo 2007-11-21 change by Dan Nicolaescu.
...
...
lisp/ps-print.el
View file @
9b1d7c34
...
...
@@ -14,7 +14,7 @@
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
(
defconst
ps-print-version
"6.8.1"
"ps-print.el, v 6.8.1 <2007/11/
09
vinicius>
"ps-print.el, v 6.8.1 <2007/11/
21
vinicius>
Vinicius's last change version -- this file may have been edited as part of
Emacs without changes to the version number. When reporting bugs, please also
...
...
@@ -1788,7 +1788,28 @@ an explicit filename is given as the last argument."
:group
'ps-print-printer
)
(
defcustom
ps-lpr-switches
lpr-switches
"*A list of extra switches to pass to `ps-lpr-command'."
"*List of extra switches to pass to `ps-lpr-command'.
The list element can be:
string it should be an option for `ps-lpr-command' (which see).
For example: \"-o Duplex=DuplexNoTumble\"
symbol it can be a function or variable symbol. If it's a function
symbol, it should be a function with no argument. The result
of the function or the variable value should be a string or a
list of strings.
list the header should be a symbol function and the tail is the
arguments for this function. This function should return a
string or a list of strings.
Any other value is silently ignored.
It is recommended to set `ps-printer-name' (which see) instead of including an
explicit switch on this list.
See `ps-lpr-command'."
:type
'
(
repeat
:tag
"PostScript lpr Switches"
(
choice
:menu-tag
"PostScript lpr Switch"
:tag
"PostScript lpr Switch"
...
...
@@ -6859,10 +6880,23 @@ If FACE is not a valid face name, use default face."
(and (fboundp 'start-process) 0)
nil
(ps-flatten-list ; dynamic evaluation
(mapcar 'ps-eval-switch ps-lpr-switches)))))
(ps-string-list
(mapcar 'ps-eval-switch ps-lpr-switches))))))
(and ps-razzle-dazzle (message "
Printing...done
")))
(kill-buffer ps-spool-buffer)))
(defun ps-string-list (arg)
(let (lstr)
(dolist (elm arg)
(cond ((stringp elm)
(setq lstr (cons elm lstr)))
((listp elm)
(let ((s (ps-string-list elm)))
(when s
(setq lstr (cons s lstr)))))
(t ))) ; ignore any other value
(nreverse lstr)))
;; Dynamic evaluation
(defun ps-eval-switch (arg)
(cond ((stringp arg) arg)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment