unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18487: `server-running-p' not autoloaded
@ 2014-09-16 20:11 Emilio Lopes
  2014-09-17 19:43 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Emilio Lopes @ 2014-09-16 20:11 UTC (permalink / raw)
  To: 18487

The function `server-running-p' is not autoloaded.  That means that
the following code in
the user's init-file will result in an error:

    (unless (or noninteractive
                (server-running-p))
      (server-start))

On the other hand, `server-start' doesn't signal an error if called
when a server process is already running.
So the test using `server-running-p' is indeed not necessary (anymore?).

Anyway, the following patch adds the `autoload cookie' for `server-running-p':

--- lisp/ChangeLog    2014-09-16 00:28:28 +0000
+++ lisp/ChangeLog    2014-09-16 13:36:04 +0000
@@ -1,3 +1,7 @@
+2014-09-16  Emilio C. Lopes  <eclig@gmx.net>
+
+    * server.el (server-running-p): add autoload cookie.
+
 2014-09-16  Stefan Monnier  <monnier@iro.umontreal.ca>

     * msb.el (msb--make-keymap-menu, msb-menu-bar-update-buffers):

=== modified file 'lisp/server.el'
--- lisp/server.el    2014-07-08 19:15:28 +0000
+++ lisp/server.el    2014-09-16 13:36:04 +0000
@@ -704,6 +704,7 @@
       (file-error
        (message "No connection file %S" file)))))

+;;;###autoload
 (defun server-running-p (&optional name)
   "Test whether server NAME is running.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#18487: `server-running-p' not autoloaded
  2014-09-16 20:11 bug#18487: `server-running-p' not autoloaded Emilio Lopes
@ 2014-09-17 19:43 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2014-09-17 19:43 UTC (permalink / raw)
  To: Emilio Lopes; +Cc: 18487

Emilio Lopes wrote:

> The function `server-running-p' is not autoloaded.  That means that
> the following code in
> the user's init-file will result in an error:
>
>     (unless (or noninteractive
>                 (server-running-p))
>       (server-start))

Since it's not interactive, why does it matter?
Ie, just stick a (require 'server) in there.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-17 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16 20:11 bug#18487: `server-running-p' not autoloaded Emilio Lopes
2014-09-17 19:43 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).