Commits

Eugene Morozov  committed 482fafa

No longer use ljupdate package.

  • Participants
  • Parent commits a908006

Comments (0)

Files changed (15)

 ;; Recent files menu
 (recentf-mode)
 
-;; LiveJournal client
-(require 'ljupdate)
-
 ;; Easy browsing and editing of the kill-ring
 ;; URL: http://www.cis.ohio-state.edu/~walters/browse-kill-ring.el
 (require 'browse-kill-ring)

File packages/ljupdate/Makefile

-### Makefile --- byte-compile ljupdate and its dependencies
-
-## Configuration
-
-# choose one:
-EMACS=emacs -q --no-site-file
-# or
-#EMACS=xemacs -vanilla
-
-## Building
-
-SOURCE=lj-acct.el lj-compat.el lj-compose.el lj-custom.el lj-edit.el \
-	lj-fill.el lj-login.el lj-pcomplete.el lj-protocol.el lj-util.el
-TARGET=$(patsubst %.el,%.elc, $(SOURCE) ljupdate.el)
-TARBALL=ljupdate.tar.gz
-
-compile: $(TARGET)
-
-ljupdate.el: ljupdate.in $(SOURCE)
-	rm -f ljupdate.elc
-	cat ljupdate.in | sed -e "s/##revision##/`svnversion .`/" > ljupdate.el
-	@$(EMACS) -batch -l lj-maint.el -f lj-generate-autoloads ljupdate.el .
-
-## Distribution
-
-DISTFILES=$(patsubst %,ljupdate/%,$(SOURCE) lj-maint.el ljupdate.in \
-	ljupdate.el README COPYING Makefile)
-
-dist: $(TARBALL)
-
-$(TARBALL): $(SOURCE) lj-maint.el ljupdate.in ljupdate.el README \
-	COPYING Makefile
-	tar czvf $(TARBALL) -C .. $(DISTFILES)
-
-pub: $(TARBALL)
-	darcs push -va
-	scp $(TARBALL) rakim:/web/edward.oconnor.cx/html/code/ljupdate
-
-## Support for downloading required libraries
-
-THIRD_PARTY=http-cookies.el http-get.el http-post.el
-fetch: $(THIRD_PARTY)
-
-SAVANNAH_VIEWCVS=http://cvs.savannah.gnu.org/viewvc
-HTTP_EMACS_SITE=$(SAVANNAH_VIEWCVS)/*checkout*/http-emacs/http-emacs
-
-$(THIRD_PARTY):
-	curl -O $(HTTP_EMACS_SITE)/$*.el
-
-## Cleaning
-
-pretty:
-	@rm -f *~
-
-clean:
-	@rm -f $(TARGET)
-
-distclean: clean
-	@rm -f $(THIRD_PARTY) ljupdate.el $(TARBALL)
-
-## Workhorse
-
-.el.elc:
-	@$(EMACS) -batch -l lj-maint.el -f batch-byte-compile $*.el \
-		|| (echo "Perhaps you should specifcy LOAD_PATH to make?" \
-		"(e.g. \"gmake LOAD_PATH=~/elisp\".)" \
-		&& echo "Please see README for compilation instructions." \
-		&& exit 1)
-
-### Makefile ends here

File packages/ljupdate/lj-acct.el

-;;; lj-acct.el --- LiveJournal account handling code for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'lj-custom)
-
-;; backing store
-
-(defvar lj-acct-hash nil
-  "Hash in which internal account information is stored.")
-
-(defun lj-make-acct-hash ()
-  "Create a new value for variable `lj-acct-hash'."
-  (make-hash-table :test 'equal))
-
-(defun lj-acct-hash ()
-  "Return the hash table in which internal account information is stored.
-Will attempt to load our cached configuration if it is available."
-  (when (null lj-acct-hash)
-    (lj-cache-load))
-  (or lj-acct-hash
-      (setq lj-acct-hash (lj-make-acct-hash))))
-
-;; sever/user property getters/setters
-
-(defun lj-servers ()
-  "Return a list of LiveJournal servers that we know about."
-  (let ((servers '()))
-    (maphash (lambda (server server-hash)
-               (push server servers))
-             (lj-acct-hash))
-    (nreverse servers)))
-
-(defun lj-server-get (server property)
-  "Fetch the value of SERVER's PROPERTY."
-  (let ((server-hash (gethash server (lj-acct-hash))))
-    (when server-hash
-      (gethash property server-hash))))
-
-(defun lj-users (server)
-  "Return a list of users on SERVER whose accounts we can use."
-  (let ((server-hash (gethash server (lj-acct-hash)))
-        (users '()))
-    (when server-hash
-      (maphash (lambda (user user-hash)
-                 (when (and (stringp user)
-                            (hash-table-p user-hash))
-                   (push user users)))
-               server-hash)
-      users)))
-
-(defun lj-server-put (server property value)
-  "Set SERVER' value of PROPERTY to VALUE."
-  (let ((server-hash (gethash server (lj-acct-hash))))
-    (unless server-hash
-      (setq server-hash (make-hash-table :test 'equal))
-      (puthash server server-hash (lj-acct-hash)))
-    (puthash property value server-hash)))
-
-(defun lj-server-rem (server property)
-  "Remove SERVER's PROPERTY."
-  (let ((server-hash (gethash server (lj-acct-hash))))
-    (when server-hash
-      (remhash property server-hash))))
-
-(defun lj-user-get (server username property)
-  "Fetch SERVER's value of USERNAME's PROPERTY."
-  (let ((user-hash (lj-server-get server username)))
-    (when user-hash
-      (gethash property user-hash))))
-
-(defun lj-user-put (server username property value)
-  "Set SERVER's value of USERNAME's PROPERTY to VALUE."
-  (let ((user-hash (lj-server-get server username)))
-    (unless user-hash
-      (setq user-hash (make-hash-table :test 'equal))
-      (lj-server-put server username user-hash))
-    (puthash property value user-hash)))
-
-(defun lj-user-rem (server username property)
-  "Remove SERVER's USERNAME's PROPERTY."
-  (let ((user-hash (lj-server-get server username)))
-    (when user-hash
-      (remhash property user-hash))))
-
-;; serialization / deserialization routines
-
-(defun lj-hash-from-alist (alist)
-  "Return a new hash table with the same mappings as in ALIST."
-  (let ((hash (make-hash-table :test 'equal)))
-    (mapcar (lambda (element)
-              (puthash (car element) (cdr element) hash))
-            alist)
-    hash))
-
-(defun lj-alist-from-hash (hash)
-  "Return a new alist with the same mapping as in HASH."
-  (let ((alist '()))
-    (maphash (lambda (k v)
-               (push (cons k v) alist))
-             hash)
-    alist))
-
-;; loading and saving cache
-
-(defun lj-cache-file (&optional filename)
-  "Return the absolute path to FILENAME.
-If FILENAME is nil, returns the absolute path to the file named
-\"cache\" in `lj-cache-dir'."
-  (if filename
-      (expand-file-name filename)
-    (expand-file-name "cache" lj-cache-dir)))
-
-(defun lj-cache-load (&optional filename)
-  "Load server and user information out of cache FILENAME.
-We use our default cache location if FILENAME is nil."
-  (setq filename (lj-cache-file filename))
-  (when (file-readable-p filename)
-    (with-temp-buffer
-      (insert-file-contents filename)
-      (eval-buffer))))
-
-(defvar lj-cache-format 1
-  "Version of the cache file format.")
-
-(defun lj-cache-save-forms ()
-  "Return Lisp forms which would restore this ljupdate config if evalled."
-  (let ((forms '()))
-    (push '(setq lj-cache-format 1) forms)
-    (push '(setq lj-acct-hash (lj-make-acct-hash)) forms)
-    (maphash (lambda (server server-hash)
-               (push `(lj-server-put ,server :mood-max
-                                     ,(or (lj-server-get server :mood-max)
-                                          "0"))
-                     forms)
-               (push `(lj-server-put ,server :moods
-                                     ',(lj-server-get server :moods))
-                     forms)
-               (maphash (lambda (username user-hash)
-                          (when (stringp username)
-                            ;; handle users
-                            (mapc (lambda (field)
-                                    (let ((val (lj-user-get server username field)))
-                                      (when val
-                                        (push `(lj-user-put
-                                                ,server ,username ,field
-                                                ;; Conservatively quoting everything
-                                                ',val)
-                                              forms))))
-                                  '(:name :access :pics :friends-groups))
-                            (let ((pass (lj-user-get server username :password)))
-                              (when (and pass lj-cache-login-information)
-                                (push `(lj-user-put
-                                        ,server ,username :password
-                                        ,pass)
-                                      forms)))))
-                        server-hash))
-             (lj-acct-hash))
-    (nreverse forms)))
-
-(defun lj-make-directory (directory &optional parents modes)
-  "Create DIRECTORY.
-If PARENTS is non-null, create any parent directories as necessary.
-If MODES is null, 0700 are used."
-  (let ((umask (default-file-modes)))
-    (unwind-protect
-        (progn
-          (set-default-file-modes (or modes ?\700))
-          (make-directory directory parents))
-      (set-default-file-modes umask))))
-
-(defun lj-cache-save (&optional filename)
-  "Save server and user information out to cache FILENAME.
-We use our default cache location if FILENAME is nil."
-  (setq filename (lj-cache-file filename))
-  (let ((dir (file-name-directory filename)))
-    (unless (file-exists-p dir)
-      (lj-make-directory dir t))
-    (unless (file-directory-p dir)
-      (error "File `%s' is not a directory" dir)))
-  (unless (file-writable-p filename)
-    (error "Unable to write to `%s'" filename))
-  (find-file filename nil)
-  (delete-region (point-min) (point-max))
-  (insert ";; -*- emacs-lisp -*-\n"
-          ";; ljupdate configuration cache file\n")
-  (let ((standard-output (current-buffer)))
-    (mapc (lambda (form)
-            (prin1 form)
-            (terpri))
-          (lj-cache-save-forms)))
-  (save-buffer)
-  (kill-buffer (current-buffer)))
-
-(add-hook 'kill-emacs-hook 'lj-cache-save)
-
-(provide 'lj-acct)
-;;; lj-acct.el ends here

File packages/ljupdate/lj-compat.el

-;;; lj-compat.el --- Cross-Emacsen compatibility code for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'cl)
-
-;; This should probably be less of a hack.
-(defvar lj-coding-system (find-if 'coding-system-p '(utf-8 iso-8859-1))
-  "Coding system for use when talking to LiveJournal.")
-
-(if (fboundp 'warn)
-    (defalias 'lj-warn 'warn)
-  (defalias 'lj-warn 'message))
-
-(provide 'lj-compat)
-;;; lj-compat.el ends here

File packages/ljupdate/lj-compose.el

-;;; lj-compose.el --- post composition for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'cl)
-(require 'message)
-(require 'sendmail)
-
-(require 'lj-custom)
-(require 'lj-acct)
-(require 'lj-compat)
-(require 'lj-fill)
-(require 'lj-pcomplete)
-(require 'lj-protocol)
-(require 'lj-login)
-(require 'lj-util)
-
-(eval-when-compile
-  ;; for `viper-change-state'
-  (require 'viper-cmd)
-  ;; from viper-init.el
-  (defvar viper-current-state)
-  ;; from viper.el
-  (defvar viper-mode))
-
-;;; Utilities
-
-(defun lj-compose-fetch-field (field)
-  "Return this buffer's value of FIELD."
-  (save-excursion
-    (save-restriction
-      (widen)
-      (message-narrow-to-headers)
-      (message-fetch-field field))))
-
-(defun lj-this-header ()
-  "Return the header of line at point."
-  (save-excursion
-    (beginning-of-line)
-    (when (looking-at "\\([^:]+\\)[:]")
-      (match-string 1))))
-
-(defun lj-this-server ()
-  "Return the current value of the Server header."
-  (lj-compose-fetch-field "Server"))
-
-(defun lj-this-user ()
-  "Return the current value of the User header."
-  (lj-compose-fetch-field "User"))
-
-;;; Code for submitting this post to LiveJournal.
-
-(defun lj-compose-prepare-body ()
-  "Massage this buffer's body for submittal to LiveJournal and return as string."
-  (save-excursion
-    (save-restriction
-      (widen)
-      (message-goto-body)
-      (narrow-to-region (point) (point-max))
-      (run-hooks 'lj-compose-pre-prepare-body-hook)
-      (funcall lj-fill-function)
-      (run-hooks 'lj-compose-post-prepare-body-hook)
-      (buffer-substring-no-properties (point-min) (point-max)))))
-
-(defun lj-compose-submit ()
-  "Submit this entry to the server."
-  (interactive)
-  (let* ((buf (current-buffer))
-         ;; The text of the entry.
-         (event (lj-compose-prepare-body))
-
-         ;; Some convenience variables for oft-used headers
-         (server (lj-compose-fetch-field "Server"))
-         (user   (lj-compose-fetch-field "User"))
-
-         ;; The current time -- or use the specified time if it exists
-         (time-field (lj-compose-fetch-field "Time"))
-         (timestamp (if (eq nil time-field)
-                        ()
-                      (date-to-time (concat time-field " " (cadr (current-time-zone))))))
-
-         (time (split-string (format-time-string "%Y:%m:%d:%H:%M" timestamp) "[:]"))
-         (year (pop time))
-         (month (pop time))
-         (day (pop time))
-         (hour (pop time))
-         (minute (pop time))
-
-         ;; LJ Authentication information
-         challenge
-
-         ;; The actual request packet, and the response we receive from
-         ;; the server.
-         (request (list '("auth_method" . "challenge")
-                        '("ver"         . "1")
-                        (cons "year" year)
-                        (cons "mon" month)
-                        (cons "day" day)
-                        (cons "hour" hour)
-                        (cons "min" minute)
-                        (cons "event" event))))
-
-    ;; Build up the request packet.
-    (add-to-list 'request (cons "user" user))
-    (let ((itemid (lj-compose-fetch-field "Itemid")))
-      (if itemid
-          (progn (add-to-list 'request (cons "itemid" itemid))
-                 (add-to-list 'request '("mode" . "editevent")))
-        (add-to-list 'request '("mode" . "postevent"))))
-    (let ((subject (lj-compose-fetch-field "Subject")))
-      (when subject
-        (add-to-list 'request (cons "subject" subject))))
-
-    ;; FIXME: use moodid if available
-    (let ((mood (lj-compose-fetch-field "Mood")))
-      (when mood
-        (add-to-list 'request (cons "prop_current_mood" mood))))
-
-    (let ((location (lj-compose-fetch-field "Location")))
-      (when location
-        (add-to-list 'request (cons "prop_current_location" location))))
-
-    (let ((tags (lj-compose-fetch-field "Tags")))
-      (when tags
-        (add-to-list 'request (cons "prop_taglist" tags))))
-
-    (let ((music (lj-compose-fetch-field "Music")))
-      (when music
-        (add-to-list 'request (cons "prop_current_music" music))))
-
-    (let ((community (lj-compose-fetch-field "Community")))
-      (when community
-        (add-to-list 'request (cons "usejournal" community))))
-
-    (let ((picture (lj-compose-fetch-field "Picture")))
-      (when picture
-        (add-to-list 'request (cons "prop_picture_keyword" picture))))
-
-    (let ((comments (lj-compose-fetch-field "Allow-Comments")))
-      (when (and comments (string-match "[Nn][Oo]" comments))
-        (add-to-list 'request '("prop_opt_nocomments" . "1"))))
-
-    (let ((email (lj-compose-fetch-field "Receive-Mail-Notification")))
-      (when (and email (string-match "[Nn][Oo]" email))
-        (add-to-list 'request '("prop_opt_noemail" . "1"))))
-
-    (let* ((access (lj-compose-fetch-field "Access"))
-           (friends-group-number
-            (cdr (assoc access (lj-user-get server user :friends-groups)))))
-      (if (stringp access)
-          (cond ((string-match "public" access)
-                 (add-to-list 'request '("security" . "public")))
-                ((string-match "private" access)
-                 (add-to-list 'request '("security" . "private")))
-                ((string-match "friends" access)
-                 (add-to-list 'request '("allowmask" . "1"))
-                 (add-to-list 'request '("security" . "usemask")))
-                (friends-group-number
-                 (add-to-list 'request (cons "allowmask"
-                                             (lj-exp2 friends-group-number)))
-                 (add-to-list 'request '("security" . "usemask")))
-                (t
-                 (lj-warn
-                  "Unable to understand Access: %s; presuming private."
-                  access)
-                 (add-to-list 'request '("security" . "private"))))
-        (add-to-list 'request '("security" . "public"))))
-
-    ;; Actually talk to the LJ server.
-    (message "Connecting to `%s' as `%s'. Please wait." server user)
-    (setq challenge (lj-getchallenge server))
-
-    (add-to-list 'request (cons "auth_challenge" challenge))
-    (add-to-list 'request
-                 (cons "auth_response"
-                       (lj-md5 (concat challenge (lj-password server user)))))
-
-    (message "Submitting to `%s' as `%s'. Please wait." server user)
-
-    (let ((response (lj-protocol-send-request server request)))
-      (set-buffer buf)              ; return to the *LiveJournal* buffer
-      (if (and (hash-table-p response)
-               (string= (gethash "success" response) "OK"))
-          (progn
-            (set-buffer-modified-p nil)
-            (message "Successfully posted as %s." (gethash "url" response))
-            t)
-        (let ((errmsg (gethash "errmsg" response)))
-          (if errmsg
-              (message "Posting to %s failed: %s" server errmsg)
-            (message "Posting to %s failed!" server)))
-        nil))))
-
-(defun lj-compose-submit-then-exit ()
-  "Submit this entry to the server, and exit if successful."
-  (interactive)
-  (when (lj-compose-submit)
-    (quit-window)))
-
-;;; Code for handling the separator between headers and body.
-
-(defvar lj-compose-header/body-marker nil
-  "The marker between the lj message's header and body sections.
-Anything before this marker will be in `message-mode' and anything below
-in `html-mode'.")
-(make-variable-buffer-local 'lj-compose-header/body-marker)
-(put 'lj-compose-header/body-marker 'permanent-local t)
-
-(defun lj-compose-find-separator ()
-  "If non-null, the position of mail-header-separator in this buffer."
-  (save-excursion
-    (goto-char (point-min))
-    (re-search-forward (regexp-quote mail-header-separator) nil t)))
-
-(defun lj-compose-propertize-separator (&optional pos)
-  "Puts the `mail-header-separator' property on the header separator."
-  (save-excursion
-    (goto-char (or pos (lj-compose-find-separator)))
-    (let ((beg (line-beginning-position))
-          (end (line-end-position)))
-      (put-text-property beg end 'category 'mail-header-separator))))
-
-(defun lj-compose-mark-separator (&optional pos)
-  "Initialize `lj-compose-header/body-marker' "
-  (set (make-local-variable 'lj-compose-header/body-marker)
-       (let ((marker (make-marker))
-             (sep-pos (or pos (lj-compose-find-separator))))
-         (lj-compose-propertize-separator sep-pos)
-         (set-marker marker sep-pos)
-         marker)))
-
-;;; Major modes for editing LiveJournal posts.
-
-(defun lj-compose-check-mode ()
-  "Ensure we're using the correct major mode for this part of the buffer."
-  (let ((there (if (and (boundp 'lj-compose-header/body-marker)
-                        (markerp lj-compose-header/body-marker))
-                   (marker-position lj-compose-header/body-marker)
-                 (lj-compose-mark-separator)))
-        (here (point))
-        (lj-saved-viper-state (and (boundp 'viper-current-state)
-                                   viper-current-state)))
-    (cond ((and (< here there)
-                (not (eq major-mode 'lj-compose-header-mode)))
-           (lj-compose-header-mode))
-          ((and (> here there)
-                (not (eq major-mode 'lj-compose-body-mode)))
-           (lj-compose-body-mode)))
-    (when (and (boundp 'viper-mode) viper-mode)
-      (viper-change-state lj-saved-viper-state))))
-
-(define-derived-mode lj-compose-header-mode message-mode "LJ:H"
-  (mml-mode -1)
-  (set (make-local-variable 'message-auto-save-directory) "~/.ljupdate/drafts")
-  (lj-pcomplete-setup)
-  (define-key lj-compose-header-mode-map "\t" 'pcomplete)
-  (run-hooks 'lj-compose-common-hook)
-  (add-hook 'post-command-hook 'lj-compose-check-mode nil t))
-
-(define-derived-mode lj-compose-body-mode html-mode "LJ:B"
-  (run-hooks 'lj-compose-common-hook)
-  (add-hook 'post-command-hook 'lj-compose-check-mode nil t))
-
-;;;###autoload
-(defun lj-compose-mode ()
-  "Major mode for editing LiveJournal posts."
-  (lj-compose-mark-separator)
-  (lj-compose-check-mode))
-
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.lj\\'" . lj-compose-mode))
-
-;;; Key bindings.
-
-(define-key lj-compose-header-mode-map (kbd "C-c C-s") 'lj-compose-submit)
-(define-key lj-compose-body-mode-map (kbd "C-c C-s") 'lj-compose-submit)
-
-(define-key lj-compose-header-mode-map (kbd "C-c C-c") 'lj-compose-submit-then-exit)
-(define-key lj-compose-body-mode-map (kbd "C-c C-c") 'lj-compose-submit-then-exit)
-
-;; (define-key lj-compose-body-mode-map (kbd "C-c <TAB>") 'lj-complete-body)
-
-;; Ensure that unwanted Message bindings get shadowed.
-;; I should probably do this in a nicer way.
-(mapc (lambda (key)
-        (define-key lj-compose-header-mode-map key 'undefined))
-      (list (kbd "C-c C-a")     (kbd "C-c C-e")       (kbd "C-c C-f a")
-            (kbd "C-c C-f s")   (kbd "C-c C-f t")     (kbd "C-c C-f w")
-            (kbd "C-c C-f x")   (kbd "C-c C-f C-a")   (kbd "C-c C-f C-b")
-            (kbd "C-c C-f C-c") (kbd "C-c C-f C-d")   (kbd "C-c C-f C-f")
-            (kbd "C-c C-f C-k") (kbd "C-c C-f C-n")   (kbd "C-c C-f C-o")
-            (kbd "C-c C-f C-r") (kbd "C-c C-f C-t")   (kbd "C-c C-f C-u")
-            (kbd "C-c C-f <RET>")       ; (kbd "C-c C-f <TAB>")
-            (kbd "C-c C-j")     (kbd "C-c C-l")       (kbd "C-c C-n")
-            (kbd "C-c C-q")     (kbd "C-c C-r")       (kbd "C-c C-t")
-            (kbd "C-c C-u")     (kbd "C-c C-v")       (kbd "C-c C-w")
-            (kbd "C-c C-y")     (kbd "C-c C-z")       (kbd "C-c <ESC> f")
-            (kbd "C-c <ESC> h") (kbd "C-c <ESC> m")   (kbd "C-c <ESC> n")
-            (kbd "C-c <ESC> r") (kbd "C-c <ESC> y") ; (kbd "C-c <TAB>")
-            ))
-
-;; Ensure that unwanted HTML mode bindings get shadowed.
-(mapc (lambda (key)
-        (define-key lj-compose-body-mode-map key 'undefined))
-      (list (kbd "C-c C-v")))
-
-;;; `lj-compose' is the major interactive entry point into this file.
-
-;;;###autoload
-(defun lj-compose ()
-  "Compose a new LiveJournal post."
-  (interactive)
-
-  ;; Create the composition buffer.
-  (switch-to-buffer (get-buffer-create "*LiveJournal*"))
-
-  (unless (buffer-modified-p)
-    (delete-region (point-min) (point-max))
-    (lj-compose-populate-buffer)
-    (goto-char (point-min))
-    (lj-compose-header-mode)
-    (if (or lj-last-username lj-default-username)
-        (message-position-on-field "Subject")
-      (message-position-on-field "User"))))
-
-(defun lj-compose-populate-buffer (&optional values)
-  "Populate the current buffer as a LiveJournal post."
-  ;; Insert the essential headers.
-  (unless (hash-table-p values)
-    (setq values (make-hash-table)))
-  (insert "Server: " (or (gethash :server values)
-                         lj-last-server
-                         lj-default-server
-                         "www.livejournal.com")
-          "\n"
-
-          "User: " (or (gethash :username values)
-                       lj-last-username
-                       lj-default-username
-                       "")
-          "\n"
-
-          "Community: " (or (gethash :community values) "") "\n"
-          "Mood: " (or (gethash :mood values) "") "\n"
-          "Location: " (or (gethash :location values) "") "\n"
-          "Picture: " (or (gethash :picture values) "") "\n"
-          "Access: " (or (gethash :access values) "public") "\n"
-          "Subject: " (or (gethash :subject values) "") "\n"
-          "Tags: " (or (gethash :tags values) "") "\n")
-
-  ;; Give the user an opportunity to add additional headers to the
-  ;; buffer.
-  (insert lj-default-headers)
-  (run-hooks 'lj-compose-init-headers-hook)
-
-  (insert mail-header-separator)
-  (lj-compose-mark-separator)
-  (insert "\n")
-
-  (insert (gethash :body values ""))
-
-  ;; Give the user an opportunity to pre-populate the buffer in some
-  ;; way.
-  (run-hooks 'lj-compose-init-body-hook)
-
-  ;; The user hasn't actually done anything to this buffer, so it
-  ;; shouldn't be marked as modified.
-  (set-buffer-modified-p nil))
-
-(provide 'lj-compose)
-
-;;; lj-compose.el ends here

File packages/ljupdate/lj-custom.el

-;;; lj-custom.el --- Custom declarations for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(defgroup ljupdate nil
-  "Emacs LiveJournal client."
-  :group 'processes
-  :prefix "lj-"
-  :link '(url-link "http://edward.oconnor.cx/ljupdate/")
-  :link '(url-link "http://community.livejournal.com/ljupdate/"))
-
-(defcustom lj-cache-dir "~/.ljupdate"
-  "Directory in which ljupdate saves cached server information."
-  :group 'ljupdate
-  :type '(directory))
-
-(defcustom lj-cache-login-information nil
-  "If non-null, ljupdate will cache the md5 hashes of your paswords.
-You might enable this if you don't want to have to log in each time.
-However, be warned that ljupdate won't try to update its other cached
-information (your friends groups, your journal access list, etc.) if
-this is enabled."
-  :group 'ljupdate
-  :type '(boolean))
-
-(defcustom lj-fill-function 'lj-fill-by-paragraph
-  "We use this function to fill your post contents before sending.
-When this function is called, the buffer is narrowed to the body.
-Set this to `ignore' to send article contents to the server unaltered.
-See `lj-fill.el' for several possible values, or write your own!"
-  :group 'ljupdate
-  :type '(choice (const :tag "Raw (don't fill)" ignore)
-                 (const :tag "Default (by paragraph)" lj-fill-by-paragraph)
-                 (const :tag "Pipe through shell command"
-                        lj-fill-by-shell-command)
-                 (function)))
-
-(defcustom lj-fill-by-shell-command-command "cat"
-  "Shell command to pipe your LiveJournal post through.
-
-Your post will be filtered through this command.  The output is what will
-actually be posted to your LiveJournal.
-
-This only has an effect when you use \"Pipe through shell command\" as your
-Lj Fill Function, above."
-  :group 'ljupdate
-  :type '(string))
-
-(defcustom lj-default-server "www.livejournal.com"
-  "LiveJournal server to use by default in various contexts."
-  :group 'ljupdate
-  :type '(string))
-
-(defcustom lj-default-username nil
-  "Username to use by default in various contexts."
-  :group 'ljupdate
-  :type '(choice string (const nil)))
-
-(defcustom lj-compose-common-hook nil
-  "Normal hook run by `lj-compose-header-mode' and `lj-compose-body-mode'.
-Note that this hook will be run each time your cursor moves from the headers
-to the body and vice-versa."
-  :group 'ljupdate
-  :type 'hook)
-
-(defcustom lj-compose-init-headers-hook nil
-  "Hook to be run after headers have been added to a composition buffer.
-Use this hook to insert additional headers into the buffer. The point is
-left after the end of the headers."
-  :group 'ljupdate
-  :type 'hook)
-
-(defcustom lj-compose-init-body-hook nil
-  "Hook to be run after a new composition buffer has been initialized.
-Use this hook to insert initial contents into the body of the post. The
-point is left at the beginning of the body."
-  :group 'ljupdate
-  :type 'hook)
-
-(defcustom lj-compose-pre-prepare-body-hook nil
-  "Hook run by `lj-compose-prepare-body' before running `lj-fill-function'.
-The buffer is narrowed to the body when this hook is run."
-  :group 'ljupdate
-  :type 'hook)
-
-(defcustom lj-compose-post-prepare-body-hook nil
-  "Hook run by `lj-compose-prepare-body' after running `lj-fill-function'.
-The buffer is narrowed to the body when this hook is run."
-  :group 'ljupdate
-  :type 'hook)
-
-(defcustom lj-default-headers ""
-  "*A string containing header lines to be inserted in outgoing messages.
-It is inserted before you edit the message, so you can edit or delete
-these lines."
-  :group 'ljupdate
-  :type 'string)
-
-;; FIXME: use
-(defcustom lj-default-access-level "public"
-  "Current possible values are ``public'', ``private'', and ``friends''."
-  :group 'ljupdate
-  :type '(choice (const :tag "Public (anyone)" "public")
-                 (const :tag "Private (you only)" "private")
-                 (const :tag "Friends-only" "friends")))
-
-;; FIXME: use
-(defcustom lj-allow-comments "yes"
-  "Whether or not comments on your posts are allowed by default."
-  :group 'ljupdate
-  :type '(choice (const :tag "Allow comments" "yes")
-                 (const :tag "Disallow comments" "no")))
-
-;; FIXME: use
-(defcustom lj-default-mail-notification "yes"
-  "Non-nil if you should receive comment notification email by default."
-  :group 'ljupdate
-  :type '(choice (const :tag "Receive Mail Notification" "yes")
-                 (const :tag "Do Not Receive Mail Notification" "no")))
-
-(provide 'lj-custom)
-
-;;; lj-custom.el ends here

File packages/ljupdate/lj-edit.el

-;;; lj-edit.el --- post editing for ljupdate
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-;; Copyright (C) 2006 Paul Huff <paul.huff@gmail.com>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Author: Paul Huff <paul.huff@gmail.com>
-;; Keywords: convenience
-
-;; This file is an addition to ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-(require 'cl)
-(require 'message)
-(require 'sendmail)
-
-(require 'lj-compose)
-(require 'lj-custom)
-(require 'lj-acct)
-(require 'lj-fill)
-(require 'lj-pcomplete)
-(require 'lj-protocol)
-(require 'lj-login)
-(require 'lj-util)
-
-(defun lj-edit-post (&optional edit-itemid)
-  (interactive)
-  (message (if edit-itemid
-	       (concat "Editing id: " edit-itemid)
-	     "Editing last post."))
-  (let* ((edit-server (or lj-last-server lj-default-server
-                          "www.livejournal.com"))
-         (edit-username (or lj-last-username lj-default-username ""))
-         (edit-request (list '("mode" . "getevents")
-                             '("auth_method" . "challenge")
-                             '("ver" . "1")
-                             '("selecttype" . "one")
-                             (cons "itemid" (if edit-itemid 
-						edit-itemid
-					      "-1"))
-                             ))
-         (edit-challenge (lj-getchallenge edit-server)))
-    (when (string= edit-username "")
-      (setq edit-username (read-from-minibuffer (format "Username @%s: " edit-server))))
-    (add-to-list 'edit-request (cons "user" edit-username))
-    (add-to-list 'edit-request (cons "auth_challenge" edit-challenge))
-    (add-to-list 'edit-request
-                 (cons "auth_response"
-                       (lj-md5 (concat edit-challenge (lj-password edit-server edit-username)))))
-    (let ((edit-response (lj-protocol-send-request edit-server edit-request)))
-      (with-output-to-temp-buffer "lj-list"
-        (set-buffer "lj-list")
-        ;;        (lj-list-props response)
-        (if (not (eq (get-buffer "*LiveJournal*") nil))
-            (kill-buffer (get-buffer "*LiveJournal*")))
-        (lj-compose)
-        (goto-char (- 1 (lj-compose-find-separator)))
-        (lj-add-props edit-response edit-server edit-username)
-        (goto-char (+ 1 (lj-compose-find-separator)))
-        (insert (replace-regexp-in-string "\r" "" (decode-coding-string (string-make-unibyte (lj-html-decode-string (gethash "events_1_event" edit-response))) lj-coding-system)))
-	)))(delete-windows-on "lj-list"))
-
-(defun lj-add-prop (prop value)
-  (let ((found-field (message-position-on-field prop)))
-    (beginning-of-line)
-    (re-search-forward (concat "^" (regexp-quote prop) ":") nil t)
-    (kill-region (point) (line-end-position))
-    (insert (concat " " value))))
-
-(defun lj-add-props-helper (response n)
-  (if (> n 0)
-      (progn
-        (let ((prop_name (gethash (concat "prop_" (number-to-string n) "_name") response))
-              (prop_value (gethash (concat "prop_" (number-to-string n) "_value") response)))
-          (cond ((string= prop_name "current_mood") (lj-add-prop "Mood" prop_value))
-                ((string= prop_name "current_music") (lj-add-prop "Music" prop_value))
-                ((string= prop_name "taglist") (lj-add-prop "Tags" prop_value))
-                ((string= prop_name "picture_keyword") (lj-add-prop "Picture" prop_value))
-                ((and (string= prop_name "opt_nocomments") (string= prop_value "1"))
-                 (lj-add-prop "Allow-Comments" "no"))
-                ((and (string= prop_name "opt_noemail") (string= prop_value "1"))
-                 (lj-add-prop "Receive-Mail-Notification" "no"))
-                ))
-        (lj-add-props-helper response (- n 1)))))
-
-(defun lj-add-props (response edit-server edit-username)
-  (let ((subject (gethash "events_1_subject" response)))
-    (when subject
-      (lj-add-prop "Subject" subject)))
-  (let ((time (gethash "events_1_eventtime" response)))
-    (when time
-      (lj-add-prop "Time" time)))
-  (let ((itemid (gethash "events_1_itemid" response)))
-    (when itemid
-      (lj-add-prop "Itemid" itemid)))
-
-  (let* ((access (gethash "events_1_security" response))
-         (allowmask (gethash "events_1_allowmask" response)))
-    (if (stringp access)
-        (cond ((string-match "public" access)
-               (lj-add-prop "Access" "public"))
-              ((string-match "private" access)
-               (lj-add-prop "Access" "private"))
-              ((string-match "usemask" access)
-               (if (eq (truncate (log (string-to-number allowmask) 2)) 0)
-                   (lj-add-prop "Access" "friends")
-                 (lj-add-prop "Access" (car (rassoc (truncate (log (string-to-number allowmask) 2)) (lj-user-get edit-server edit-username :friends-groups)))))))))
-  (lj-add-props-helper response (string-to-number (gethash "prop_count" response))))
-;;;###autoload
-;; (defun lj-edit-submit ()
-;;   "Submit this entry to the server."
-;;   (interactive)
-;;   (let* ((buf (current-buffer))
-;;          ;; The text of the entry.
-;;          (event (lj-compose-prepare-body))
-
-;;          ;; Some convenience variables for oft-used headers
-;;          (server (lj-compose-fetch-field "Server"))
-;;          (user   (lj-compose-fetch-field "User"))
-;;          (itemid (lj-compose-fetch-field "Itemid"))
-;;          ;; The current time -- or use the specified time if it exists
-;;          (time (lj-compose-fetch-field "Time"))
-;;          (timestamp (if (eq nil time)
-;;                         ()
-;;                       (date-to-time (concat time " " (cadr (current-time-zone))))))
-
-;;          (time (split-string (format-time-string "%Y:%m:%d:%H:%M" timestamp) "[:]"))
-;;          (year (pop time))
-;;          (month (pop time))
-;;          (day (pop time))
-;;          (hour (pop time))
-;;          (minute (pop time))
-
-;;          ;; LJ Authentication information
-;;          challenge
-
-;;          ;; The actual request packet, and the response we receive from
-;;          ;; the server.
-;;          (request (list '("mode"        . "editevent")
-;;                         '("auth_method" . "challenge")
-;;                         '("ver"         . "1")
-;;                         (cons "itemid" itemid)
-;;                         (cons "year" year)
-;;                         (cons "mon" month)
-;;                         (cons "day" day)
-;;                         (cons "hour" hour)
-;;                         (cons "min" minute)
-;;                         (cons "event" event))))
-
-;;     ;; Build up the request packet.
-;;     (add-to-list 'request (cons "user" user))
-
-;;     (let ((subject (lj-compose-fetch-field "Subject")))
-;;       (when subject
-;;         (add-to-list 'request (cons "subject" subject))))
-;;     ;; FIXME: use moodid if available
-;;     (let ((mood (lj-compose-fetch-field "Mood")))
-;;       (when mood
-;;         (add-to-list 'request (cons "prop_current_mood" mood))))
-
-;;     (let ((tags (lj-compose-fetch-field "Tags")))
-;;       (when tags
-;;         (add-to-list 'request (cons "prop_taglist" tags))))
-
-;;     (let ((music (lj-compose-fetch-field "Music")))
-;;       (when music
-;;         (add-to-list 'request (cons "prop_current_music" music))))
-
-;;     (let ((community (lj-compose-fetch-field "Community")))
-;;       (when community
-;;         (add-to-list 'request (cons "usejournal" community))))
-
-;;     (let ((picture (lj-compose-fetch-field "Picture")))
-;;       (when picture
-;;         (add-to-list 'request (cons "prop_picture_keyword" picture))))
-
-;;     (let ((comments (lj-compose-fetch-field "Allow-Comments")))
-;;       (when (and comments (string-match "[Nn][Oo]" comments))
-;;         (add-to-list 'request '("prop_opt_nocomments" . "1"))))
-
-;;     (let ((email (lj-compose-fetch-field "Receive-Mail-Notification")))
-;;       (when (and email (string-match "[Nn][Oo]" email))
-;;         (add-to-list 'request '("prop_opt_noemail" . "1"))))
-
-;;     (let* ((access (lj-compose-fetch-field "Access"))
-;;            (friends-group-number
-;;             (cdr (assoc access (lj-user-get server user :friends-groups)))))
-;;       (if (stringp access)
-;;           (cond ((string-match "public" access)
-;;                  (add-to-list 'request '("security" . "public")))
-;;                 ((string-match "private" access)
-;;                  (add-to-list 'request '("security" . "private")))
-;;                 ((string-match "friends" access)
-;;                  (add-to-list 'request '("allowmask" . "1"))
-;;                  (add-to-list 'request '("security" . "usemask")))
-;;                 (friends-group-number
-;;                  (add-to-list 'request (cons "allowmask"
-;;                                              (lj-exp2 friends-group-number)))
-;;                  (add-to-list 'request '("security" . "usemask")))
-;;                 (t
-;;                  (warn "Unable to understand Access: %s; presuming private.")
-;;                  (add-to-list 'request '("security" . "private"))))
-;;         (add-to-list 'request '("security" . "public"))))
-
-;;     ;; Actually talk to the LJ server.
-;;     (message "Connecting to `%s' as `%s'. Please wait." server user)
-;;     (setq challenge (lj-getchallenge server))
-
-;;     (add-to-list 'request (cons "auth_challenge" challenge))
-;;     (add-to-list 'request
-;;                  (cons "auth_response"
-;;                        (lj-md5 (concat challenge (lj-password server user)))))
-
-;;     (message "Submitting to `%s' as `%s'. Please wait." server user)
-
-;;     (let ((response (lj-protocol-send-request server request)))
-;;       (set-buffer buf) ; return to the *LiveJournal* buffer
-;;       (if (and (hash-table-p response)
-;;                (string= (gethash "success" response) "OK"))
-;;           (progn
-;;             (set-buffer-modified-p nil)
-;;             (message "Successfully posted as %s." (gethash "url" response))
-;;             t)
-;;         (let ((errmsg (gethash "errmsg" response)))
-;;           (if errmsg
-;;               (message "Posting to %s failed: %s" server errmsg)
-;;             (message "Posting to %s failed!" server)))
-;;         nil))))
-
-(defun lj-html-decode-string (string)
-  (interactive)
-  (let ((string (replace-regexp-in-string "%\\([0-9A-F]\\{2\\}\\)" (lambda (match) (char-to-string (string-to-number (substring match 1) 16))) string)))
-    (replace-regexp-in-string "+" " " string)))
-
-(defun lj-list-props (response n)
-  (interactive)
-  (if (> n 0)
-      (progn
-        (insert (gethash (concat "prop_" (number-to-string n) "_name") response))
-        (insert "\t")
-        (insert (gethash (concat "prop_" (number-to-string n) "_value") response))
-        (insert "\n")
-        (lj-list-props response (- n 1)))))
-
-(defun lj-insert-entry-into-entry-list (hash n)
-  (lexical-let* ((event_string (concat "events_" (number-to-string n)))
-                 (event_subject (concat event_string "_subject"))
-                 (event_time (concat event_string "_eventtime"))
-                 (event_itemid_string (concat event_string "_itemid"))
-                 (event_itemid (gethash event_itemid_string hash))
-                 (button_start -1)
-                 (button_end -1)
-                 (which_event n))
-    (if (<= n (string-to-number (gethash "events_count" hash)))
-        (progn
-          (insert-button (concat (gethash event_time hash) " - "
-                                 (if (gethash event_subject hash)
-                                     (gethash event_subject hash)
-                                   "(no subject)")) 'action (lambda (event) (lj-edit-post event_itemid)))
-          (insert "\n")
-          (lj-insert-entry-into-entry-list hash (+ n 1))))))
-
-(defun lj-get-last-n (n)
-  (let* ((server (or lj-last-server lj-default-server
-                     "www.livejournal.com"))
-         (username (or lj-last-username lj-default-username ""))
-         (request (list '("mode" . "getevents")
-                        '("auth_method" . "challenge")
-                        '("ver" . "1")
-                        '("selecttype" . "lastn")
-                        (cons "howmany" (number-to-string n))))
-         (challenge (lj-getchallenge server)))
-    (when (string= username "")
-      (setq username (read-from-minibuffer (format "Username @%s: " server))))
-    (add-to-list 'request (cons "user" username))
-    (add-to-list 'request (cons "auth_challenge" challenge))
-    (add-to-list 'request
-                 (cons "auth_response"
-                       (lj-md5 (concat challenge (lj-password server username)))))
-    (let ((response (lj-protocol-send-request server request)))
-      (with-output-to-temp-buffer "lj-list"
-        (set-buffer "lj-list")
-        (lj-insert-entry-into-entry-list response 1)
-        (print-help-return-message)))))
-
-;;;###autoload
-(defun lj-browse-entries ()
-  (interactive)
-  (lj-get-last-n 10))
-
-;;;###autoload
-(defalias 'lj-edit-last 'lj-edit-post)
-
-(provide 'lj-edit)
-
-(provide 'lj-edit)
-
-;;; lj-edit.el ends here

File packages/ljupdate/lj-fill.el

-;;; lj-fill.el --- various filling methods for livejournal posts
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-;; The intent is for several different filling methods to live here.
-;; Currently, there are only two recommended values of
-;; `lj-fill-function': `lj-fill-by-paragraph' and `ignore'.
-;; Read the `lj-fill-function' doc string for more.
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'lj-custom)
-
-(defvar lj-fill-by-paragraph-fill-column 10000
-  "*Value to be used for `fill-column' by `lj-fill-by-paragraph'.")
-
-(defvar lj-fill-flush-empty-lines-flag t
-  "*Non-nil means that `lj-fill-by-paragraph' will remove blank lines.")
-
-(defvar lj-fill-inter-paragraph-newline-count 2
-  "*How many newlines to use in between paragraphs.
-Yuo probably want this to be at least 1.")
-
-(defun lj-fill-by-paragraph ()
-  "Fills your LiveJournal post while assuming you wrote text with auto fill.
-
-Assumes that consecutive non-blank lines are paragraphs, unfills them,
-and kills any extra blank lines. If your posts are predominately text,
-with little to no markup, this is probably the behavior you will like.
-
-This is like the default filling behavior of the old ljupdate code. If
-you didn't like it then, you won't like it now. You may want to fiddle
-with the values of `lj-fill-by-paragraph-fill-column',
-`lj-fill-flush-empty-lines-flag', and/or
-`lj-fill-inter-paragraph-newline-count' in order to produce the sort of
-behavior you'd like this function to exhibit. Or, you may change the
-value of `lj-fill-function' to a function more to your liking (e.g.
-`ignore')."
-  ;; Fill paragraphs
-  (goto-char (point-min))
-  (let ((fill-column lj-fill-by-paragraph-fill-column))
-    (fill-paragraph nil)
-    (while (zerop (forward-paragraph 1))
-      (fill-paragraph nil)))
-  ;; Kill blank lines
-  (when lj-fill-flush-empty-lines-flag
-    (flush-lines "^$" (point-min) (point-max)))
-  ;; Restore paragraph separation
-  (goto-char (point-min))
-  (let ((newlines (make-string lj-fill-inter-paragraph-newline-count ?\n)))
-    (while (search-forward "\n" nil t)
-      (replace-match newlines))))
-
-(defun lj-fill-by-shell-command ()
-  "Filters your LiveJournal post through a shell command."
-  (shell-command-on-region (point-min) (point-max)
-                           lj-fill-by-shell-command-command t))
-
-
-(provide 'lj-fill)
-;;; lj-fill.el ends here

File packages/ljupdate/lj-login.el

-;;; lj-login.el --- lj protocol login support for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'cl)
-
-(require 'lj-compat)
-(require 'lj-custom)
-(require 'lj-acct)
-(require 'lj-protocol)
-(require 'lj-util)
-
-;; from ljupdate.el
-(eval-when-compile (defvar lj-client-version))
-
-(defvar lj-last-server nil
-  "The last LJ server we used during this Emacs session.")
-
-(defvar lj-last-username nil
-  "The last LJ username we used during this Emacs session.")
-
-(defun lj-process-login-response (server username info)
-  "Process SERVER's login information returned when we logged in as USERNAME.
-Argument INFO is the bundle of values returned by the server."
-
-  (let ((name (gethash "name" info))
-        (access-count (lj-number (gethash "access_count" info 0)))
-        (pickw-count (lj-number (gethash "pickw_count" info 0)))
-        (frgrp-maxnum (lj-number (gethash "frgrp_maxnum" info 0)))
-        (mood-count (lj-number (gethash "mood_count" info 0)))
-        (message (gethash "message" info)))
-
-    (when message
-      (message "%s" message)
-      (sit-for 2))
-
-    (when name
-      (lj-user-put server username :name name))
-
-    (let ((access-list '()))
-      (dotimes (access-num access-count)
-        (let ((name (gethash (format "access_%d" (1+ access-num)) info)))
-          (push name access-list)))
-      (lj-user-put server username :access access-list))
-
-    (let ((pickw-list '()))
-      (dotimes (pickw-num pickw-count)
-        (let ((name (gethash (format "pickw_%d" (1+ pickw-num)) info)))
-          (push name pickw-list)))
-      (lj-user-put server username :pics pickw-list))
-
-    (let ((frgrp-alist '()))
-      (dotimes (frgrp-num frgrp-maxnum)
-        (let ((name (gethash (format "frgrp_%d_name" (1+ frgrp-num)) info))
-              (sort (gethash (format "frgrp_%d_sortorder" (1+ frgrp-num)) info)))
-          (when name
-            (push (cons name (1+ frgrp-num)) frgrp-alist))))
-      (lj-user-put server username :friends-groups frgrp-alist))
-
-    (let ((mood-max (or (lj-number (lj-server-get server :mood-max)) 0))
-          (mood-alist (lj-server-get server :moods)))
-      (dotimes (mood-num mood-count)
-        (let ((name (gethash (format "mood_%d_name" (1+ mood-num)) info))
-              (id (lj-number (or (gethash (format "mood_%d_id" (1+ mood-num)) info)
-                                 0))))
-          (when (> id mood-max)
-            (lj-server-put server :mood-max id))
-          (push (cons name id) mood-alist)))
-      (lj-server-put server :moods mood-alist))))
-
-(defun lj-attempt-login-once (server username password)
-  "Try to log in to SERVER with USERNAME and PASSWORD.
-Returns a boolean indicating whether or not the login attempt succeeded.
-PASSWORD is the downcased MD5sum of the user's password."
-  (message "Logging into `%s' as `%s'. Please wait." server username)
-
-  (let ((challenge (lj-getchallenge server)))
-    (let* ((auth-response (lj-md5 (concat challenge password)))
-           (response
-            (lj-protocol-send-request
-             server
-             `(("mode"           . "login")
-               ("ver"            . ,(if (eq lj-coding-system 'utf-8)
-                                        "1"
-                                      "0"))
-               ("clientversion"  . ,lj-client-version)
-               ("user"           . ,username)
-               ("auth_method"    . "challenge")
-               ("auth_challenge" . ,challenge)
-               ("auth_response"  . ,auth-response)
-               ("getmoods"       . ,(format "%s"
-                                            (or (lj-server-get server :mood-max)
-                                                0)))
-               ("getpickws"      . "1"))))) ; get userpics
-      (if (hash-table-p response)
-          (cond ((string= (gethash "success" response) "OK")
-                 (lj-process-login-response server username response)
-                 t)
-                ((string= (gethash "success" response) "FAIL")
-                 (message "Logging into `%s' failed; error message is `%s'."
-                          server (gethash "errmsg" response))
-                 nil)
-		(t
-                 (message
-		  "Logging into `%s' failed (empty response); please try again later."
-		  server)))
-        (message "Logging into `%s' failed (null response); please try again later."
-                 server)
-        nil))))
-
-(defun lj-attempt-login (server username explicit-login)
-  "Attempt to log into SERVER (as USERNAME) once.
-
-If EXPLICIT-LOGIN is non-nil, the user has requested this login
-explicitly, so we message useful feedback to the echo area."
-  (let ((tries 0)
-        (logged-in nil)
-        (password nil))
-    (while (and (not logged-in) (< tries 3))
-      (setq password
-            (lj-md5 (read-passwd
-                     (format "Password for %s@%s: " username server))))
-      (setq tries (+ tries 1)
-            logged-in (lj-attempt-login-once server username password)))
-    (if logged-in
-        (progn
-          (setq lj-last-username username
-                lj-last-server   server)
-          (lj-user-put server username :password password)
-          (when explicit-login
-            (message "Successfully logged in as %s@%s." username server))
-          password)
-      (when explicit-login
-        (message "Login failure for %s@%s." username server)
-        nil))))
-
-(defun lj-read-server ()
-  "Read a server name from the user."
-  (let ((guess (or lj-last-server lj-default-server "www.livejournal.com")))
-    (completing-read "Server: "
-                     (mapcar (lambda (item) (cons item item))
-                             (lj-servers))
-                     nil nil guess nil guess nil)))
-
-(defun lj-read-username (&optional server)
-  "Read a username (of SERVER, if supplied) from the user."
-  (completing-read "Username: "
-                   (mapcar (lambda (item) (cons item item))
-                           (lj-users (or server
-                                         lj-last-server
-                                         lj-default-server)))
-                   nil nil lj-default-username nil lj-default-username nil))
-
-(defun lj-read-server-username-pair ()
-  "Read a server and a username at that server from the user."
-  (let ((server (lj-read-server)))
-    (list server (lj-read-username server))))
-
-;;;###autoload
-(defun lj-login (server username)
-  "Logs into SERVER as USERNAME, and return the md5sum of USERNAME's password."
-  (interactive (lj-read-server-username-pair))
-  (or (lj-user-get server username :password)
-      (lj-attempt-login server username (interactive-p))
-      (error "Unable to log into %s as %s" server username)))
-
-;;;###autoload
-(defun lj-logout (server username)
-  "Logs off of SERVER (as USERNAME)."
-  (interactive (lj-read-server-username-pair))
-  (lj-user-rem server username :password))
-
-;; Internally, I call this to get the password for the given user@host.
-;; So let's make code calling this easier to read.
-;;;###autoload
-(defalias 'lj-password 'lj-login)
-
-(provide 'lj-login)
-
-;;; lj-login.el ends here

File packages/ljupdate/lj-maint.el

-;;; lj-maint.el --- compilation and maintenance hacks for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-;; `load-path' frobbing; used for compiling
-
-(add-to-list 'load-path default-directory)
-(mapc (lambda (dir) (add-to-list 'load-path dir))
-      (parse-colon-path (getenv "LOAD_PATH")))
-
-;; autoload generation; used to create `ljupdate.el'
-
-(defvar generated-autoload-file)
-(defvar command-line-args-left)
-(defun lj-generate-autoloads ()
-  "Generate autoloads for ljupdate."
-  (interactive)
-  (require 'autoload)
-  (setq generated-autoload-file
-        (expand-file-name (car command-line-args-left) default-directory))
-  (setq command-line-args-left (cdr command-line-args-left))
-  (batch-update-autoloads))
-
-(defun lj-debug-response (response)
-  "Dump RESPONSE into a buffer so we can look at it."
-  (switch-to-buffer (get-buffer-create "*LJ DEBUG*"))
-  (maphash (lambda (k v) (insert (format "%s\n%s\n" k v))) response))
-
-(provide 'lj-maint)
-
-;;; lj-maint.el ends here

File packages/ljupdate/lj-pcomplete.el

-;;; lj-pcomplete.el --- programmable completion for ljupdate composition buffers
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'pcomplete)
-
-(defun lj-pcomplete-setup ()
-  "Configure this buffer for programmable completion."
-  (set (make-local-variable 'pcomplete-termination-string) "")
-  (set (make-local-variable 'pcomplete-ignore-case) t)
-  (set (make-local-variable 'pcomplete-use-paring) nil)
-  (set (make-local-variable 'pcomplete-parse-arguments-function)
-       'lj-pcomplete-parse-header-arguments)
-  (set (make-local-variable 'pcomplete-command-name-function)
-       'lj-this-header))
-
-;; header completion
-
-(defun pcomplete/lj-compose-header-mode/Subject ()
-  "Attempt to complete the Subject header."
-  (pcomplete-here nil))
-
-(defun pcomplete/lj-compose-header-mode/Mood ()
-  "Attempt to complete the Mood header."
-  (pcomplete-here (sort (mapcar 'car (lj-server-get (lj-this-server) :moods))
-                        'string-lessp)
-                  nil nil t))
-
-(defun pcomplete/lj-compose-header-mode/Server ()
-  "Attempt to complete the Server header."
-  (pcomplete-here (sort (lj-servers) 'string-lessp)
-                  nil nil t))
-
-(defun pcomplete/lj-compose-header-mode/User ()
-  "Attempt to complete the User header."
-  (pcomplete-here (sort (lj-users (lj-this-server)) 'string-lessp)
-                  nil nil t))
-
-(defun pcomplete/lj-compose-header-mode/Community ()
-  "Attempt to complete the Community header."
-  (pcomplete-here (sort (copy-list (lj-user-get (lj-this-server)
-                                                (lj-this-user)
-                                                :access))
-                        'string-lessp)
-                  nil nil t))
-
-(defun pcomplete/lj-compose-header-mode/Picture ()
-  "Attempt to complete the Picture header."
-  (pcomplete-here (sort (copy-list (lj-user-get (lj-this-server)
-                                                (lj-this-user)
-                                                :pics))
-                        'string-lessp)
-                  nil nil t))
-
-(defun pcomplete/lj-compose-header-mode/Access ()
-  "Attempt to complete the Access header."
-  (pcomplete-here (sort
-                   (append
-                    (list "public" "private" "friends")
-                    (mapcar 'car
-                            (lj-user-get (lj-this-server)
-                                         (lj-this-user)
-                                         :friends-groups)))
-                   'string-lessp)
-                  nil nil t))
-
-;; pcomplete support code
-
-(defun lj-pcomplete-parse-header-arguments ()
-  "Return a list of parsed whitespace-separated arguments.
-These are the words from the beginning of the line up to where point is
-right now."
-  (let* ((start (save-excursion (beginning-of-line) (point)))
-	 (end (point))
-	 args beginnings)
-    (save-excursion
-      (if (< (skip-chars-backward " \t\n" start) 0)
-	  (setq args '("")
-		beginnings (list end)))
-      (setq end (point))
-      (while (< (skip-chars-backward "^ \t\n" start) 0)
-	(setq beginnings (cons (point) beginnings)
-	      args (cons (buffer-substring-no-properties
-			  (point) end)
-			 args))
-	(skip-chars-backward " \t\n" start)
-	(setq end (point))))
-    (cons args beginnings)))
-
-(provide 'lj-pcomplete)
-;;; lj-pcomplete.el ends here

File packages/ljupdate/lj-protocol.el

-;;; lj-protocol.el --- "flat" protocol support for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'http-post)
-
-(require 'lj-compat)
-(require 'lj-util)
-
-(defun lj-protocol-server-url (hostname)
-  "Return the URL to the LJ protocol's \"flat\" interface on HOSTNAME."
-  (concat "http://" hostname "/interface/flat"))
-
-(defsubst lj-this-line ()
-  "Return a string containing the current line in the current buffer."
-  (buffer-substring-no-properties (line-beginning-position)
-                                  (line-end-position)))
-
-(defun lj-protocol-send-request (server request)
-  "Send to SERVER a REQUEST via the LiveJournal protocol.
-If the request succeeds, this returns a hash table whose keys and values
-contain the server's response. Or, if the request was unsuccessful, this
-returns nil ."
-  (let ((process (http-post (lj-protocol-server-url server) request
-                            lj-coding-system '(("Connection" . "close"))
-                            'ignore 1.0 nil " *LiveJournal response*")))
-    (while (accept-process-output process))
-    (with-current-buffer (process-buffer process)
-      ;; (if (and (stringp http-status-code) (= http-status-code 200)) ; HTTP 200 OK
-      (let ((response (make-hash-table :test 'equal))
-	    (have-frobbed nil))
-        (goto-char (point-min))
-        (let ((on-variable-name-line t)
-              var)
-          (while (< (point) (point-max))
-            (cond (on-variable-name-line (setq var (lj-this-line)))
-                  (t
-		   (puthash var (decode-coding-string (string-make-unibyte (lj-this-line)) lj-coding-system) response)
-                   (setq have-frobbed t)))
-            (forward-line 1)
-            (setq on-variable-name-line (not on-variable-name-line))))
-        (if have-frobbed
-            (prog1 response
-              (kill-buffer (current-buffer)))
-          (rename-buffer "*LiveJournal debug*"))))))
-
-(defun lj-getchallenge (server)
-  "Get an authentication challenge from SERVER."
-  (let* ((response (lj-protocol-send-request
-                    server '(("mode" . "getchallenge"))))
-         (challenge (and (hash-table-p response) (gethash "challenge" response))))
-    (unless (stringp challenge)
-      (error "Unable to connect to %s" server))
-    challenge))
-
-(provide 'lj-protocol)
-
-;;; lj-protocol.el ends here

File packages/ljupdate/lj-util.el

-;;; lj-util.el --- misc elisp utilities for ljupdate
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'md5)
-
-(require 'lj-compat)
-
-(defun lj-md5 (string)
-  "MD5s STRING and downcases the result.
-The LiveJournal server code doesn't accept upcased MD5sums. Case
-sensitivity is dumb."
-  (downcase (md5 string nil nil lj-coding-system)))
-
-(defun lj-number (thing)
-  "Convert THING to a number, if necessary."
-  (cond ((numberp thing) thing)
-        ((stringp thing) (string-to-number thing))
-        (t 0)))
-
-(defun lj-exp2 (n)
-  "Return a string representation of 2^N for 0 <= N <= 30."
-  (cond ((or (< n 0) (> n 30))
-         (signal 'args-out-of-range n))
-	((< n 27) (number-to-string (lsh 1 n)))
-        ;; Emacs integers aren't 32-bit quantities, so we cheat.
-	((= n 27) "134217728")
-	((= n 28) "268435456")
-	((= n 29) "536870912")
-	((= n 30) "1073741824")))
-
-(provide 'lj-util)
-
-;;; lj-util.el ends here

File packages/ljupdate/ljupdate.el

-;;; ljupdate.el --- a LiveJournal client for Emacs -*- emacs-lisp -*-
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>
-;; Keywords: convenience
-
-;; This file is part of ljupdate, a LiveJournal client for Emacs.
-
-;; ljupdate is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; {at your option} any later version.
-
-;; ljupdate is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING, or type `C-h C-c'. If
-;; not, write to the Free Software Foundation at this address:
-
-;;   Free Software Foundation
-;;   51 Franklin Street, Fifth Floor
-;;   Boston, MA 02110-1301
-;;   USA
-
-;;; Commentary:
-;;
-
-;;; History:
-;;
-
-;;; Code:
-
-(require 'lj-custom)
-
-(defconst lj-client-revision "24"
-  "The Subversion revision of your ljupdate.")
-
-(defun lj-client-version ()
-  (format "%sEmacs-ljupdate/4.0.%s"
-          (cond ((featurep 'sxemacs) "SX")
-                ((featurep 'xemacs) "X")
-                (t ""))
-          ;; `lj-client-revision' might be a simple number, or it might
-          ;; match X:YM?S?, where X and Y are revision numbers.
-          (apply 'max
-                 (mapcar 'string-to-number
-                         (split-string lj-client-revision "[:MS]")))))
-
-(defconst lj-client-version (lj-client-version)
-  "The client version to report to the server.")
-
-(provide 'ljupdate)
-
-;;; Generated autoloads follow (made by autoload.el).
-;;; ljupdate.in ends here
-
-;;;### (autoloads (lj-browse-entries lj-html-decode-string) "lj-edit"
-;;;;;;  "lj-edit.el" (18774 54482))
-;;; Generated autoloads from lj-edit.el
-
-(autoload (quote lj-html-decode-string) "lj-edit" "\
-Not documented
-
-\(fn STRING)" t nil)
-
-(autoload (quote lj-browse-entries) "lj-edit" "\
-Not documented
-
-\(fn)" t nil)
-
-(defalias (quote lj-edit-last) (quote lj-edit-post))
-
-;;;***
-
-;;;### (autoloads (lj-logout lj-login) "lj-login" "lj-login.el" (18774
-;;;;;;  54482))
-;;; Generated autoloads from lj-login.el
-
-(autoload (quote lj-login) "lj-login" "\
-Logs into SERVER as USERNAME, and return the md5sum of USERNAME's password.
-
-\(fn SERVER USERNAME)" t nil)
-
-(autoload (quote lj-logout) "lj-login" "\
-Logs off of SERVER (as USERNAME).
-
-\(fn SERVER USERNAME)" t nil)
-
-(defalias (quote lj-password) (quote lj-login))
-
-;;;***
-
-;;;### (autoloads nil nil ("lj-acct.el" "lj-compat.el" "lj-custom.el"
-;;;;;;  "lj-fill.el" "lj-maint.el" "lj-pcomplete.el" "lj-protocol.el"
-;;;;;;  "lj-util.el") (18774 54790 117355))
-
-;;;***
-
-;;;### (autoloads (lj-compose lj-compose-mode) "lj-compose" "lj-compose.el"
-;;;;;;  (18774 54482))
-;;; Generated autoloads from lj-compose.el
-
-(autoload (quote lj-compose-mode) "lj-compose" "\
-Major mode for editing LiveJournal posts.
-
-\(fn)" nil nil)
-
-(add-to-list (quote auto-mode-alist) (quote ("\\.lj\\'" . lj-compose-mode)))
-
-(autoload (quote lj-compose) "lj-compose" "\
-Compose a new LiveJournal post.
-
-\(fn)" t nil)
-
-;;;***

File packages/ljupdate/ljupdate.in

-;;; ljupdate.el --- a LiveJournal client for Emacs -*- emacs-lisp -*-
-
-;; Copyright (C) 2002, 2003, 2004, 2005 Edward O'Connor <ted@oconnor.cx>
-
-;; Author: Edward O'Connor <ted@oconnor.cx>