|
|
@@ -29,8 +29,8 @@
|
|
|
;; Emacs Chrome plugin. This is my first attempt at doing something
|
|
|
;; with sockets in Emacs. I based it on the following examples:
|
|
|
;;
|
|
|
-;; http://www.emacswiki.org/emacs/EmacsEchoServer
|
|
|
-;; http://nullprogram.com/blog/2009/05/17/
|
|
|
+;; http://www.emacswiki.org/emacs/EmacsEchoServer
|
|
|
+;; http://nullprogram.com/blog/2009/05/17/
|
|
|
;;
|
|
|
;; To use it ensure the file is in your load-path and add something
|
|
|
;; like the following examples to your .emacs:
|
|
|
@@ -38,36 +38,32 @@
|
|
|
;; To open pages for editing in new buffers in your existing Emacs
|
|
|
;; instance:
|
|
|
;;
|
|
|
-;; (if (locate-library "edit-server")
|
|
|
-;; (progn
|
|
|
-;; (require 'edit-server)
|
|
|
-;; (setq edit-server-new-frame nil)
|
|
|
-;; (edit-server-start)))
|
|
|
+;; (when (require 'edit-server nil t)
|
|
|
+;; (setq edit-server-new-frame nil)
|
|
|
+;; (edit-server-start))
|
|
|
;;
|
|
|
;; To open pages for editing in new frames using a running emacs
|
|
|
;; started in --daemon mode:
|
|
|
;;
|
|
|
-;; (if (and (daemonp) (locate-library "edit-server"))
|
|
|
-;; (progn
|
|
|
-;; (require 'edit-server)
|
|
|
-;; (edit-server-start)))
|
|
|
+;; (when (and (require 'edit-server nil t) (daemonp))
|
|
|
+;; (edit-server-start))
|
|
|
;;
|
|
|
;; Buffers are edited in `text-mode' by default; to use a different
|
|
|
-;; mode, change `edit-server-default-major-mode' or customize
|
|
|
-;; `edit-server-url-major-mode-alist' to specify major modes based on
|
|
|
-;; the remote URL:
|
|
|
+;; major mode, change `edit-server-default-major-mode' or customize
|
|
|
+;; `edit-server-url-major-mode-alist' to specify major modes based
|
|
|
+;; on the remote URL:
|
|
|
;;
|
|
|
-;; (setq edit-server-url-major-mode-alist
|
|
|
-;; '(("github\\.com" . markdown-mode)))
|
|
|
+;; (setq edit-server-url-major-mode-alist
|
|
|
+;; '(("github\\.com" . markdown-mode)))
|
|
|
;;
|
|
|
;; Alternatively, set the mode in `edit-server-start-hook'. For
|
|
|
;; example:
|
|
|
;;
|
|
|
;; (add-hook 'edit-server-start-hook
|
|
|
;; (lambda ()
|
|
|
-;; (if (string-match "github.com" (buffer-name))
|
|
|
-;; (markdown-mode))))
|
|
|
-;;
|
|
|
+;; (when (string-match "github.com" (buffer-name))
|
|
|
+;; (markdown-mode))))
|
|
|
+
|
|
|
|
|
|
;;; Code:
|
|
|
|