Stefan Monnier
e5248ac91d
* lisp/server.el (server--on-display-p): New function.
...
(server--on-display-p): Use it.
2012-04-04 13:13:00 -04:00
Andreas Schwab
ad0bf5b6db
* server.el (server-eval-at): Handle non-tcp connections. Decode
...
result string.
2012-03-11 18:54:16 +01:00
Andreas Schwab
e29ab36b48
Define -print-nonl client command
...
* lib-src/emacsclient.c (main): Handle -print-nonl command.
* lisp/server.el (server-msg-size): New constant.
(server-reply-print): New function.
(server-eval-and-print): Use it.
(server-eval-at): Use server-quote-arg and server-unquote-arg.
Handle -print-nonl.
2012-03-11 18:53:07 +01:00
Martin Rudalics
1dba6978b8
Fix last fix of server-unselect-display
2012-02-08 17:48:25 +01:00
Martin Rudalics
451077ade5
In server-unselect-display make sure that buffer is live before killing it
2012-02-08 15:59:05 +01:00
Martin Rudalics
ffb6157ecc
In server-unselect-display don't inadvertently kill current buffer. (Bug#10729)
...
* server.el (server-unselect-display): Don't inadvertently kill
the current buffer. (Bug#10729)
2012-02-08 09:02:17 +01:00
Glenn Morris
953cebf5a8
server.el doc fixes
...
* lisp/server.el (server-auth-dir): Doc fix.
(server-eval-at): Doc fix. Give an explicit error if !server-use-tcp.
* etc/NEWS: Markup.
2012-02-01 23:48:39 -08:00
Glenn Morris
acaf905b11
Add 2012 to FSF copyright years for Emacs files
2012-01-05 01:46:05 -08:00
Juanma Barranquero
520fca41d6
Fix emacsclient bug where "-n -c" does not open a new frame on Windows.
...
* lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0;
instead, treat both -c and -t as always requesting a new "tty" frame,
and let server.el decide which kind is actually required.
Reported by Uwe Siart <usenet@siart.de> in this thread:
http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00303.html
* lisp/server.el (server-delete-client): On Windows, do not try to delete
the only terminal.
(server-process-filter): On Windows, treat requests for a tty frame as
if they were for a GUI frame if the running server is in GUI mode.
2011-12-04 18:13:01 +01:00
Stefan Monnier
28109f4996
* lisp/server.el (server-eval-and-print): Allow C-g.
...
Fixes: debbugs:6585
2011-11-22 10:18:56 -05:00
Chong Yidong
06e21633a4
Fix minor mode docstrings for the new meaning of a nil ARG.
...
* abbrev.el (abbrev-mode):
* allout.el (allout-mode):
* autoinsert.el (auto-insert-mode):
* autoarg.el (autoarg-mode, autoarg-kp-mode):
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode):
* battery.el (display-battery-mode):
* composite.el (global-auto-composition-mode)
(auto-composition-mode):
* delsel.el (delete-selection-mode):
* desktop.el (desktop-save-mode):
* dired-x.el (dired-omit-mode):
* dirtrack.el (dirtrack-mode):
* doc-view.el (doc-view-minor-mode):
* double.el (double-mode):
* electric.el (electric-indent-mode, electric-pair-mode):
* emacs-lock.el (emacs-lock-mode):
* epa-hook.el (auto-encryption-mode):
* follow.el (follow-mode):
* font-core.el (font-lock-mode):
* frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
* help.el (temp-buffer-resize-mode):
* hilit-chg.el (highlight-changes-mode)
(highlight-changes-visible-mode):
* hi-lock.el (hi-lock-mode):
* hl-line.el (hl-line-mode, global-hl-line-mode):
* icomplete.el (icomplete-mode):
* ido.el (ido-everywhere):
* image-file.el (auto-image-file-mode):
* image-mode.el (image-minor-mode):
* iswitchb.el (iswitchb-mode):
* jka-cmpr-hook.el (auto-compression-mode):
* linum.el (linum-mode):
* longlines.el (longlines-mode):
* master.el (master-mode):
* mb-depth.el (minibuffer-depth-indicate-mode):
* menu-bar.el (menu-bar-mode):
* minibuf-eldef.el (minibuffer-electric-default-mode):
* mouse-sel.el (mouse-sel-mode):
* msb.el (msb-mode):
* mwheel.el (mouse-wheel-mode):
* outline.el (outline-minor-mode):
* paren.el (show-paren-mode):
* recentf.el (recentf-mode):
* reveal.el (reveal-mode, global-reveal-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* ruler-mode.el (ruler-mode):
* savehist.el (savehist-mode):
* scroll-all.el (scroll-all-mode):
* scroll-bar.el (scroll-bar-mode):
* server.el (server-mode):
* shell.el (shell-dirtrack-mode):
* simple.el (auto-fill-mode, transient-mark-mode)
(visual-line-mode, overwrite-mode, binary-overwrite-mode)
(line-number-mode, column-number-mode, size-indication-mode)
(auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
* strokes.el (strokes-mode):
* time.el (display-time-mode):
* t-mouse.el (gpm-mouse-mode):
* tool-bar.el (tool-bar-mode):
* tooltip.el (tooltip-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* view.el (view-mode):
* whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.
* emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
autogenerated docstring.
2011-10-19 08:54:24 -04:00
Chong Yidong
7a1ff57fac
* lisp/server.el (server-port): Doc fix.
2011-08-28 14:46:38 -04:00
Juanma Barranquero
b768cdcd31
lisp/server.el: Catch quit and close the connection (bug#8942).
2011-07-05 00:40:03 +02:00
Juanma Barranquero
56e6cc31de
lisp/server.el (server-eval-and-print): Return any result, even nil.
2011-07-04 03:04:29 +02:00
Andreas Rottmann
18a4ce5ea1
Allow emacsclient to set parameters of new graphical frames (bug#5864)
...
* lib-src/emacsclient.c (longopts, decode_options, main): Add frame-parameters.
* lisp/server.el (server-create-window-system-frame): Add parameters arg.
(server-process-filter): Doc fix. Handle frame-parameters.
* doc/emacs/misc.texi (emacsclient Options): Mention --frame-parameters.
* doc/man/emacsclient.1: Mention --frame-parameters.
* etc/NEWS: Mention this.
2011-06-25 11:05:48 -07:00
Stefan Monnier
2403c841a8
Silence various byte-compiler warnings.
...
* lisp/emacs-lisp/byte-run.el (make-obsolete-variable): New argument
`access-type' and new obsolescence format.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Adjust to
new format.
(byte-compile-check-variable): New `access-type' argument.
Only warn if the access-type is obsolete.
(byte-compile-dynamic-variable-bind, byte-compile-variable-ref)
(byte-compile-variable-set): Adjust callers.
* lisp/help-fns.el (describe-variable): Adjust to new obsolescence format.
* lisp/mail/sendmail.el (mail-mailer-swallows-blank-line): Only mark
setting it as obsolete.
* lisp/simple.el (minibuffer-completing-symbol):
* lisp/font-lock.el (font-lock-beginning-of-syntax-function): Only mark read
access as obsolete.
* lisp/minibuffer.el (minibuffer-completing-file-name): Don't make it
obsolete yet.
* lisp/international/quail.el (quail-mouse-choose-completion): Remove unused
code referring to obsolete var.
(quail-choose-completion-string): Remove.
* lisp/server.el (server-clients-with, server-kill-buffer-query-function)
(server-kill-emacs-query-function): Silence "unused `proc'" warnings.
* lisp/proced.el (proced-send-signal):
* lisp/emacs-lisp/lisp.el (lisp-complete-symbol):
Replace completion-annotate-function with completion-extra-properties.
2011-06-01 16:32:04 -03:00
Lars Magne Ingebrigtsen
84621b7162
Decode &_ => SPC in the reply.
2011-05-02 04:33:11 +02:00
Lars Magne Ingebrigtsen
e793a9404d
Implement and document `server-eval-at'.
2011-05-02 04:06:53 +02:00
Stefan Monnier
cafdcef32d
Merge from trunk
2011-03-21 12:42:16 -04:00
Glenn Morris
09d9db2c49
Merge from emacs-23; up to 2010-06-03T22:16:02Z!dann@ics.uci.edu
2011-03-12 11:19:47 -08:00
Eli Zaretskii
2920e68d73
Fix comparisons of file ownership on MS-Windows for the Administrator user.
...
lisp/files.el (file-ownership-preserved-p): Pass `integer' as an
explicit 2nd argument to `file-attributes'. If the file's owner
is the Administrators group on Windows, and the current user is
Administrator, consider that a match.
lisp/server.el (server-ensure-safe-dir): Consider server directory
safe on MS-Windows if its owner is the Administrators group while
the current Emacs user is Administrator. Use `=' to compare
numerical UIDs, since they could be integers or floats.
2011-03-11 14:19:08 +02:00
Stefan Monnier
d032d5e7df
* doc/lispref/variables.texi (Scope): Mention the availability of lexbind.
...
(Lexical Binding): New node.
* doc/lispref/eval.texi (Eval): Add `eval's new `lexical' arg.
* lisp/emacs-lisp/cconv.el (cconv-liftwhen): Increase threshold.
(cconv-closure-convert-rec): Convert interactive spec in empty lexenv.
(cconv-analyse-use): Improve unused vars warnings.
(cconv-analyse-form): Analyze interactive spec in empty lexenv.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Always byte-compile
the interactive spec in lexical-binding mode.
(byte-compile-refresh-preloaded): Don't reload byte-compiler files.
* lisp/custom.el (custom-initialize-default): Use defvar.
(custom-declare-variable): Set the special-variable-p flag.
* lisp/help-fns.el (help-make-usage): Drop leading underscores.
* lisp/dired.el (dired-revert, dired-make-relative): Mark unused args.
(dired-unmark-all-files): Remove unused var `query'.
(dired-overwrite-confirmed): Declare.
(dired-restore-desktop-buffer): Don't use dynamically scoped arg names.
* lisp/mpc.el: Mark unused args.
(mpc--faster-toggle): Remove unused var `songnb'.
* lisp/server.el (server-kill-buffer-running): Move before first use.
* lisp/minibuffer.el: Mark unused args.
* src/callint.c (quotify_arg): Simplify the logic.
(Fcall_interactively): Use lexical binding when evaluating the
interactive spec of a lexically bound function.
2011-03-01 00:03:24 -05:00
Stefan Monnier
c530e1c2a3
Merge from trunk
2011-02-11 21:27:53 -05:00
Stefan Monnier
59003be943
* lisp/server.el (server-process-filter): Use pcase.
2011-02-10 14:41:44 -05:00
Igor Kuzmin
94d11cb577
* lisp/emacs-lisp/cconv.el: New file.
...
* lisp/emacs-lisp/bytecomp.el: Use cconv.
(byte-compile-file-form, byte-compile):
Call cconv-closure-convert-toplevel when requested.
* lisp/server.el:
* lisp/mpc.el:
* lisp/emacs-lisp/pcase.el:
* lisp/doc-view.el:
* lisp/dired.el: Use lexical-binding.
2011-02-10 13:53:49 -05:00
Glenn Morris
95df8112a0
Refill some long/short copyright headers.
2011-01-26 00:36:39 -08:00
Glenn Morris
73b0cd5003
Convert consecutive FSF copyright years to ranges.
2011-01-24 20:08:28 -08:00
Stefan Monnier
77ab81d054
Merge from emacs-23
2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3
Add 2011 to FSF/AIST copyright years.
2011-01-02 15:50:46 -08:00
Stefan Monnier
4a47c27573
Merge from emacs-23
2010-11-17 22:54:14 -05:00
Ulrich Mueller
bf6442c345
* lisp/server.el (server-force-stop): Ensure the server is stopped (Bug#7409).
2010-11-16 15:09:47 -05:00
Stefan Monnier
d607b96bc2
Merge from emacs-23
2010-11-09 15:07:10 -05:00
Chong Yidong
381d186f82
Prevent server-mode from issuing a prompt in kill-emacs-hook.
...
* server.el (server-start): New arg INHIBIT-PROMPT prevents asking
user for confirmation.
(server-force-stop): Use it.
(server-start): Use server-force-stop for kill-emacs-hook, to
avoid user interaction while killing Emacs.
2010-10-31 23:35:06 -04:00
Glenn Morris
7d3e38433d
* server.el (server-host, server-port, server-auth-dir): Autoload risky.
2010-10-26 23:42:15 -07:00
Peter Oliver
c79b0b1c8c
Add server-port option. (Bug#854)
...
* lisp/server.el (server-port): New option.
(server-start): Use server-port.
2010-10-26 00:40:07 -07:00
Juanma Barranquero
4628bef1ee
Merge changes from emacs-23 branch.
2010-10-08 12:14:47 +02:00
Chong Yidong
2a847524ab
* lisp/server.el (server-process-filter, server-return-error): Give
...
emacsclient time to shut down after receiving an error string.
* etc/NEWS: Document tweak to emacsclient exit status.
2010-10-02 20:03:44 -04:00
Juanma Barranquero
a16f5f64c7
lisp/server.el (server-start): For compatibility, revert part of 2010-09-30T02:53:26Z!lekktu@gmail.com.
2010-10-01 03:28:45 +02:00
Juanma Barranquero
968ef9b4da
lisp/server.el: Use just one way to pass the Emacs PID to emacsclient.
...
* lib-src/emacsclient.c (get_server_config): Don't read Emacs pid from
the authentication file.
* lisp/server.el (server-start): Don't write pid to the authentication file.
(server-create-tty-frame): Don't send pid.
(server-process-filter): Send pid at the start of every connection.
2010-09-30 04:53:26 +02:00
Juanma Barranquero
2b7ba565a6
lisp/server.el (server-process-filter): Doc fix.
2010-09-29 15:24:55 +02:00
Juanma Barranquero
ba3033ee40
Fix bug#6781: Use 127.0.0.1 for local hosts, not "localhost".
...
* lisp/server.el (server-start): Revert part of 2010-08-08 change. Using
address 127.0.0.1 for local host is now done in Fmake_network_process.
* src/process.c (Fmake_network_process): When arg :host is 'local,
use address 127.0.0.1, not name "localhost".
2010-09-25 02:32:09 +02:00
David Reitter
38dbc4d81a
server.el (server-visit-files): Run pre-command-hook and
...
post-command-hook for each buffer while it is current
(Bug#6910).
(server-execute): Do not run hooks here.
2010-08-26 09:46:19 -04:00
Chong Yidong
7815fe1985
Merge changes from emacs-23 branch
2010-08-08 17:12:29 -04:00
Juanma Barranquero
d5b8058fb0
* server.el (server-start): Force IPv4 and use literal 127.0.0.1.
2010-08-03 15:04:20 +02:00
Leo Liu
9f982e22fa
* server.el (server-start): Simplify loop.
2010-08-03 14:22:23 +02:00
Chong Yidong
0191e222e3
Add --parent-id argument to emacsclient.
...
* lib-src/emacsclient.c (longopts, decode_options, print_help_and_exit):
New arg `-parent-id'.
(main): Send parent-id to Emacs.
* lisp/server.el (server-process-filter): Receive parent-id argument
from emacsclient.
(server-create-window-system-frame): New arg. Pass parent-id as
frame parameter.
2010-05-29 19:50:47 -04:00
Chong Yidong
f1a5d776c4
Change delete-by-moving-to-trash so Lisp calls explicitly request trashing.
...
* src/fileio.c (Fdelete_file): Change meaning of optional arg to mean
whether to trash.
(internal_delete_file, Frename_file): Callers changed.
(delete_by_moving_to_trash): Doc fix.
(Fdelete_directory_internal): Don't move to trash.
* src/callproc.c (delete_temp_file):
* src/buffer.c (Fkill_buffer): Callers changed.
* src/lisp.h: Update prototype.
* lisp/diff.el (diff-sentinel):
* lisp/epg.el (epg--make-temp-file, epg-decrypt-string)
(epg-verify-string, epg-sign-string, epg-encrypt-string):
* lisp/jka-compr.el (jka-compr-partial-uncompress)
(jka-compr-call-process, jka-compr-write-region):
* lisp/server.el (server-sentinel): Remove optional arg from
delete-file, reverting 2010-05-03 change.
* lisp/dired.el (dired-delete-file): New arg TRASH.
(dired-internal-do-deletions): New arg TRASH. Use progress
reporter.
(dired-do-flagged-delete, dired-do-delete): Use trash.
* lisp/files.el (delete-directory): New arg TRASH.
* lisp/speedbar.el (speedbar-item-delete): Allow trashing.
* lisp/net/ange-ftp.el (ange-ftp-del-tmp-name, ange-ftp-delete-file)
(ange-ftp-rename-remote-to-remote)
(ange-ftp-rename-local-to-remote)
(ange-ftp-rename-remote-to-local, ange-ftp-load)
(ange-ftp-compress, ange-ftp-uncompress): Remove optional arg from
`delete-file'.
(ange-ftp-delete-directory): Add optional arg to `delete-file', to
allow trashing.
* lisp/net/tramp-compat.el (tramp-compat-delete-file): Rewrite to
handle new TRASH arg of `delete-file'.
* lisp/net/tramp-fish.el (tramp-fish-handle-delete-directory)
(tramp-fish-handle-delete-file)
(tramp-fish-handle-make-symbolic-link)
(tramp-fish-handle-process-file): Use null TRASH arg in
`tramp-compat-delete-file' call.
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Use null TRASH
arg in `tramp-compat-delete-file' call.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
(tramp-gvfs-handle-write-region): Use null TRASH arg in
`tramp-compat-delete-file' call.
* lisp/net/tramp-imap.el (tramp-imap-handle-delete-file): Rename arg.
(tramp-imap-do-copy-or-rename-file): Use null TRASH arg in
`tramp-compat-delete-file' call.
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
(tramp-smb-handle-write-region): Use null TRASH arg in
tramp-compat-delete-file call.
(tramp-smb-handle-delete-directory): Use tramp-compat-delete-file.
(tramp-smb-handle-delete-file): Rename arg.
* lisp/net/tramp.el (tramp-handle-delete-file): Change FORCE arg to TRASH.
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-process-file, tramp-handle-call-process-region)
(tramp-handle-shell-command, tramp-handle-file-local-copy)
(tramp-handle-insert-file-contents, tramp-handle-write-region)
(tramp-delete-temp-file-function): Use null TRASH arg in
tramp-compat-delete-file call.
2010-05-27 19:30:11 -04:00
Chong Yidong
53967e09ad
Add optional arg to delete-file to force deletion (Bug#6070).
...
* eval.c (internal_condition_case_n): Rename from
internal_condition_case_2.
(internal_condition_case_2): New function.
* xdisp.c (safe_call): Use internal_condition_case_n.
* fileio.c (Fdelete_file, internal_delete_file): New arg FORCE.
(internal_delete_file, Frename_file): Callers changed.
* buffer.c (Fkill_buffer):
* callproc.c (delete_temp_file): Callers changed (Bug#6070).
* lisp.h: Update prototypes.
* diff.el (diff-sentinel):
* epg.el (epg--make-temp-file, epg-decrypt-string)
(epg-verify-string, epg-sign-string, epg-encrypt-string):
* jka-compr.el (jka-compr-partial-uncompress)
(jka-compr-call-process, jka-compr-write-region, jka-compr-load):
* server.el (server-sentinel): Use delete-file's new FORCE arg
(Bug#6070).
2010-05-03 11:01:21 -04:00
Chong Yidong
84716442f0
Avoid using trash for certain temp files (Bug#6070).
...
* server.el (server-sentinel, server-start, server-force-delete):
* jka-compr.el (jka-compr-partial-uncompress)
(jka-compr-call-process, jka-compr-write-region, jka-compr-load):
* epg.el (epg--make-temp-file, epg-decrypt-string)
(epg-encrypt-string, epg-verify-string, epg-sign-string):
* diff.el (diff-sentinel): Bind delete-by-moving-to-trash to nil
before deleting (Bug#6070).
2010-04-30 22:19:40 -04:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00