1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

320 Commits

Author SHA1 Message Date
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
Juanma Barranquero
3e70541aed This fixes bug#4197 (merged to bug#865, though not identical).
* server.el (server-auth-dir): Add docstring note about FAT32.
  (server-ensure-safe-dir): Accept FAT32 directories as "safe",
  but warn against using them.
2009-09-19 14:56:04 +00:00
Juanma Barranquero
d75541671f * server.el (server-ensure-safe-dir): Pass 'integer
to `file-attributes', as suggested.
2009-09-18 16:55:21 +00:00
Glenn Morris
597e2240ab Use default-value rather than default-enable-multibyte-characters. 2009-09-03 06:54:57 +00:00
Glenn Morris
e6ce8c4239 Use forward-line rather than goto-line. 2009-08-22 19:29:18 +00:00
Chong Yidong
2d25aa5a90 * server.el (server-buffer-done): Prevent kill-buffer from
prompting by clearing the buffer modification flag (Bug#3696).
2009-06-29 03:25:10 +00:00
Stefan Monnier
ba528748a1 * server.el (server-process-filter): Use expand-file-name rather than
command-line-normalize-file-name so as to use the `dir' when provided.
* emacsclient.c (main): Always pass cwd via "-dir".  Pass the file
names without prepending cwd to them, so Emacs uses its customary
rules to determine how to interpret the file name.
2009-03-10 14:08:52 +00:00
Miles Bader
a20878b6d8 Rename system-process-attributes' to process-attributes'
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1553
2009-02-23 05:06:36 +00:00
Chong Yidong
c31ee0038d (server-start): Make the warning more verbose (Bug#2395). 2009-02-20 02:16:25 +00:00
Juanma Barranquero
abab01f2e8 * server.el (server-with-environment): Don't fail for negative entries in ENV. 2009-02-11 09:22:59 +00:00
Chong Yidong
035426050b Add comment. 2009-02-07 21:59:35 +00:00
Stefan Monnier
7197f5de6f (server-execute): Enable quit. 2009-02-07 16:24:36 +00:00
Chong Yidong
77c4d02405 (server-name): Make it a defcustom. 2009-01-23 04:52:40 +00:00