[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 16/16: Miscellaneous cleanup.
From: |
Stefan Monnier |
Subject: |
[elpa] 16/16: Miscellaneous cleanup. |
Date: |
Wed, 15 Oct 2014 21:06:00 +0000 |
monnier pushed a commit to branch master
in repository elpa.
commit e7e02c2582a38a60395c4fc05dc261407946905e
Author: Stefan Monnier <address@hidden>
Date: Wed Oct 15 16:47:38 2014 -0400
Miscellaneous cleanup.
* 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'.
---
packages/muse/cgi.el | 13 +++++++------
packages/muse/htmlize-hack.el | 2 +-
packages/muse/muse-backlink.el | 4 ++--
packages/muse/muse-blosxom.el | 5 +++--
packages/muse/muse-html.el | 6 ++++--
packages/muse/muse-project.el | 22 ++++++++++++++--------
packages/muse/muse-publish.el | 4 +++-
7 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/packages/muse/cgi.el b/packages/muse/cgi.el
index 936b33f..0e85a52 100644
--- a/packages/muse/cgi.el
+++ b/packages/muse/cgi.el
@@ -1,6 +1,6 @@
;;; 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 <address@hidden>
;; Michael Olson <address@hidden> (slight modifications)
@@ -120,11 +120,12 @@
;; 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)))
diff --git a/packages/muse/htmlize-hack.el b/packages/muse/htmlize-hack.el
index e623946..61627b6 100644
--- a/packages/muse/htmlize-hack.el
+++ b/packages/muse/htmlize-hack.el
@@ -2,7 +2,7 @@
;; 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")
diff --git a/packages/muse/muse-backlink.el b/packages/muse/muse-backlink.el
index bc21ddd..d5b7ebd 100644
--- a/packages/muse/muse-backlink.el
+++ b/packages/muse/muse-backlink.el
@@ -1,6 +1,6 @@
;;; 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 <address@hidden>
@@ -261,7 +261,7 @@ The parent buffer of the forthcomingly visited muse page.")
(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)
diff --git a/packages/muse/muse-blosxom.el b/packages/muse/muse-blosxom.el
index 78038d7..d7bce9c 100644
--- a/packages/muse/muse-blosxom.el
+++ b/packages/muse/muse-blosxom.el
@@ -1,6 +1,6 @@
;;; 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 <address@hidden>
@@ -258,7 +258,8 @@ The page will be initialized with the current date and
TITLE."
(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: "
diff --git a/packages/muse/muse-html.el b/packages/muse/muse-html.el
index 6a9356b..2473025 100644
--- a/packages/muse/muse-html.el
+++ b/packages/muse/muse-html.el
@@ -1,6 +1,6 @@
;;; 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.
@@ -667,7 +667,9 @@ This tag requires htmlize 1.34 or later in order to work."
(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
diff --git a/packages/muse/muse-project.el b/packages/muse/muse-project.el
index 7489706..d609735 100644
--- a/packages/muse/muse-project.el
+++ b/packages/muse/muse-project.el
@@ -1,6 +1,6 @@
;;; 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.
@@ -86,11 +86,13 @@ has been modified via the customize interface.")
;; 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)))))
@@ -123,10 +125,13 @@ Muse can make use of."
;; 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)))
@@ -942,7 +947,8 @@ prompting for one."
(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))))))
diff --git a/packages/muse/muse-publish.el b/packages/muse/muse-publish.el
index ec6e176..cbcd415 100644
--- a/packages/muse/muse-publish.el
+++ b/packages/muse/muse-publish.el
@@ -1,6 +1,6 @@
;;; 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.
@@ -845,6 +845,8 @@ the file is published no matter what."
(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.
- [elpa] 05/16: * packages/shen-mode/inf-shen.el: Don't require `cl'. (shen-remember-functions): Avoid `flet'., (continued)
- [elpa] 05/16: * packages/shen-mode/inf-shen.el: Don't require `cl'. (shen-remember-functions): Avoid `flet'., Stefan Monnier, 2014/10/15
- [elpa] 08/16: * packages/uni-confusables/uni-confusables.el: Fix up comment convention. * packages/uni-confusables/gen-confusables.el (gen-confusables-write): Idem., Stefan Monnier, 2014/10/15
- [elpa] 06/16: * packages/trie/trie.el (edebug-prin1, edebug-prin1-to-string): Use advice-add when available., Stefan Monnier, 2014/10/15
- [elpa] 09/16: * GNUmakefile (%-pkg.el): Silence the emacs command line again. (all-in-place): Remove debug message., Stefan Monnier, 2014/10/15
- [elpa] 10/16: * packages/f90-interface-browser/f90-interface-browser.el (f90-fontify-arglist): Use font-lock-ensure when available., Stefan Monnier, 2014/10/15
- [elpa] 11/16: * packages/flylisp/flylisp.el (jit-lock-start): Declare., Stefan Monnier, 2014/10/15
- [elpa] 12/16: * packages/jgraph-mode/jgraph-mode.el: Use lexical-binding. (jgraph-extract-commands): Avoid add-to-list on local var., Stefan Monnier, 2014/10/15
- [elpa] 13/16: * packages/markchars/markchars.el (markchars-mode): Use font-lock-flush when available., Stefan Monnier, 2014/10/15
- [elpa] 14/16: * packages/vlf/vlf-occur.el, vlf-search.el, vlf-write.el (tramp-verbose): Declare., Stefan Monnier, 2014/10/15
- [elpa] 07/16: * packages/tNFA/tNFA.el (tNFA--DFA-state-create): Avoid add-to-list on local var., Stefan Monnier, 2014/10/15
- [elpa] 16/16: Miscellaneous cleanup.,
Stefan Monnier <=
- [elpa] 15/16: * packages/js2-mode/js2-imenu-extras.el: Use Unix-style EOL., Stefan Monnier, 2014/10/15