* muse/muse-publish.el (muse-current-output-style): Declare.
* muse/muse-project.el (muse-project-set-variables): Only call
make-local-hook if it exists.
* muse/muse-html.el (muse-html-src-tag): Use font-lock-ensure
when available.
* muse/muse-project.el (muse-project-alist-get, muse-project-alist-set):
* muse/muse-blosxom.el (muse-blosxom-new-entry): Avoid add-to-list
on local var.
* muse/htmlize-hack.el: Require `cl' at run-time as well.
* muse/cgi.el (cgi-decode): Avoid `flet'.
;;; cgi.el -- Using Emacs for CGI scripting
-;; Copyright (C) 2000, 2006, 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2006, 2012, 2014 Free Software Foundation, Inc.
;; Author: Eric Marsden <emarsden@laas.fr>
;; Michael Olson <mwolson@gnu.org> (slight modifications)
;; Substrings are plus-decoded and then URI-decoded.
(defun cgi-decode (q)
(when q
- (flet ((split-= (str)
- (let ((pos (or (cgi-position ?= str) 0)))
- (cons (cgi-decode-string (substring str 0 pos))
- (cgi-decode-string (substring str (+ pos 1)))))))
- (mapcar #'split-= (split-string q "&")))))
+ (let ((split-=
+ (lambda (str)
+ (let ((pos (or (cgi-position ?= str) 0)))
+ (cons (cgi-decode-string (substring str 0 pos))
+ (cgi-decode-string (substring str (+ pos 1))))))))
+ (mapcar split-= (split-string q "&")))))
(defun cgi-lose (fmt &rest args)
(let ((why (apply #'format fmt args)))
;; To use it, add the path to this directory to your load path and
;; add (require 'htmlize-hack) to your Emacs init file.
-(eval-when-compile (require 'cl))
+(require 'cl)
(if t (require 'htmlize)) ; Don't load during compilation.
(when (equal htmlize-version "1.34")
;;; muse-backlink.el --- backlinks for Muse
-;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2014
;; Free Software Foundation, Inc.
;; Author: Jim Ottaway <j.ottaway@lse.ac.uk>
(save-buffer)
(when muse-backlink-parent-buffer
(with-current-buffer muse-backlink-parent-buffer
- (font-lock-fontify-buffer))))
+ (font-lock-fontify-buffer)))) ;FIXME: Why? --Stef
(setq muse-backlink-links nil
muse-backlink-parent-buffer nil
muse-backlink-pending nil)
;;; muse-blosxom.el --- publish a document tree for serving by (py)Blosxom
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2014
;; Free Software Foundation, Inc.
;; Author: Michael Olson <mwolson@gnu.org>
(tags nil))
(while (progn (setq tag (read-string "Tag (RET to continue): "))
(not (string= tag "")))
- (add-to-list 'tags tag t))
+ (unless (member tag tags)
+ (setq tags (append tags (list tag)))))
tags)
(funcall muse-completing-read-function
"Category: "
;;; muse-html.el --- publish to HTML and XHTML
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2014
;; Free Software Foundation, Inc.
;; This file is part of Emacs Muse. It is not part of GNU Emacs.
(if (functionp mode)
(funcall mode)
(fundamental-mode))
- (font-lock-fontify-buffer)
+ (if (fboundp 'font-lock-ensure)
+ (font-lock-ensure)
+ (font-lock-fontify-buffer))
;; silence the byte-compiler
(when (fboundp 'htmlize-region-for-paste)
;; transform the region to HTML
;;; muse-project.el --- handle Muse projects
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2014
;; Free Software Foundation, Inc.
;; This file is part of Emacs Muse. It is not part of GNU Emacs.
;; Turn settings of first part into cons cells, symbol->string
(while head
(cond ((stringp (car head))
- (add-to-list 'res (car head) t)
+ (unless (member (car head) res)
+ (setq res (append res (list (car head)))))
(setq head (cdr head)))
((symbolp (car head))
- (add-to-list 'res (list (symbol-name (car head))
- (cadr head)) t)
+ (let ((x (list (symbol-name (car head)) (cadr head))))
+ (unless (member x res)
+ (setq res (append res (list x)))))
(setq head (cddr head)))
(t
(setq head (cdr head)))))
;; Turn cons cells into flat list, string->symbol
(while head
(cond ((stringp (car head))
- (add-to-list 'res (car head) t))
+ (unless (member (car head) res)
+ (setq res (append res (list (car head))))))
((consp (car head))
- (add-to-list 'res (intern (caar head)) t)
- (add-to-list 'res (car (cdar head)) t)))
+ (let ((x (intern (caar head)))
+ (y (car (cdar head))))
+ (unless (member x res) (setq res (append res (list x))))
+ (unless (member y res) (setq res (append res (list y)))))))
(setq head (cdr head)))
(setcdr (car val) (cons res (cdr (cdar val)))))
(let ((styles (cdar val)))
(setq sym (car vars))
(setq custom-set (or (get sym 'custom-set) 'set))
(setq var (if (eq (get sym 'custom-type) 'hook)
- (make-local-hook sym)
+ (if (fboundp 'make-local-hook)
+ (make-local-hook sym))
(make-local-variable sym)))
(funcall custom-set var (car (cdr vars)))
(setq vars (cdr (cdr vars))))))
;;; muse-publish.el --- base publishing implementation
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2014
;; Free Software Foundation, Inc.
;; This file is part of Emacs Muse. It is not part of GNU Emacs.
(muse-style-run-hooks :final style file output-path target)))
t))))
+(defvar muse-current-output-style)
+
;;;###autoload
(defun muse-publish-this-file (style output-dir &optional force)
"Publish the currently-visited file.