From: MORIOKA Tomohiko Date: Sun, 4 Apr 2010 23:44:10 +0000 (+0900) Subject: (chise-wiki-edit-url): Changed to "edit.cgi". X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90c0d949658a701fa1899d8b9e906739ac190002;p=chise%2Fest.git (chise-wiki-edit-url): Changed to "edit.cgi". (www-format-value): Add new optional argument `without-edit'; modify for `www-format-apply-value'. (www-format-apply-value): Add new optional argument `without-edit'; modify for `www-format-eval-list'. (www-format-eval-feature-value): Add new optional arguments `without-tags' and `without-edit'; modify for `www-format-apply-value' and `www-format-eval-list'. (www-format-eval-unit): Add new optional arguments `without-tags' and `without-edit'; modify for `www-format-eval-feature-value', `www-format-apply-value' and `www-format-eval-list'; specify 'without- tags and 'without-edit for `www-format-eval-list' in href part of `link'. (www-format-eval-list): Add new optional arguments `without-tags' and `without-edit'; modify for `www-format-eval-unit'. --- diff --git a/cwiki-common.el b/cwiki-common.el index ed37b7c..fa6a4e8 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -2,7 +2,7 @@ (require 'char-db-util) (defvar chise-wiki-view-url "view.cgi") -(defvar chise-wiki-edit-url "edit/edit.cgi") +(defvar chise-wiki-edit-url "edit.cgi") (defvar chise-wiki-bitmap-glyphs-url "http://chise.zinbun.kyoto-u.ac.jp/glyphs") @@ -465,11 +465,13 @@ (www-format-value-as-S-exp value))) (defun www-format-value (object feature-name - &optional value format without-tags) + &optional value format + without-tags without-edit) (unless value (setq value (www-char-feature object feature-name))) (www-format-apply-value object feature-name - format nil value nil nil without-tags) + format nil value nil nil + without-tags without-edit) ) @@ -703,7 +705,7 @@ (defun www-format-apply-value (object feature-name format props value &optional uri-char uri-feature - without-tags) + without-tags without-edit) (let (ret) (setq ret (cond @@ -718,7 +720,8 @@ ((eq format 'wiki-text) (if without-tags (www-xml-format-list value) - (www-format-eval-list value object feature-name nil uri-char)) + (www-format-eval-list value object feature-name nil uri-char + without-tags without-edit)) ) ((eq format 'S-exp) (www-format-encode-string @@ -742,7 +745,9 @@ (www-format-value-default value without-tags) )) ) - (if (or without-tags (eq (plist-get props :mode) 'peek)) + (if (or without-tags + without-edit + (eq (plist-get props :mode) 'peek)) ret (format "%s " @@ -752,7 +757,8 @@ (defun www-format-eval-feature-value (char feature-name - &optional format lang uri-char value) + &optional format lang uri-char value + without-tags without-edit) (unless value (setq value (www-char-feature char feature-name))) (unless format @@ -762,7 +768,8 @@ (www-format-apply-value char feature-name format nil value - uri-char (www-uri-encode-feature-name feature-name)) + uri-char (www-uri-encode-feature-name feature-name) + without-tags without-edit) ) ((consp format) (cond ((null (cdr format)) @@ -770,14 +777,17 @@ (www-format-apply-value char feature-name (car format) (nth 1 format) value - uri-char (www-uri-encode-feature-name feature-name)) + uri-char (www-uri-encode-feature-name feature-name) + without-tags without-edit) ) (t - (www-format-eval-list format char feature-name lang uri-char) + (www-format-eval-list format char feature-name lang uri-char + without-tags without-edit) ))))) (defun www-format-eval-unit (exp char feature-name - &optional lang uri-char value) + &optional lang uri-char value + without-tags without-edit) (unless value (setq value (www-char-feature char feature-name))) (unless uri-char @@ -792,11 +802,13 @@ (if (eq (car exp) 'value) (www-format-eval-feature-value char feature-name (plist-get (nth 1 exp) :format) - lang uri-char value) + lang uri-char value + without-tags without-edit) (www-format-apply-value char feature-name (car exp) (nth 1 exp) value - uri-char (www-uri-encode-feature-name feature-name))) + uri-char (www-uri-encode-feature-name feature-name) + without-tags without-edit)) ) ((eq (car exp) 'name) (format "%s" @@ -811,26 +823,32 @@ >%s" (www-format-eval-list (plist-get (nth 1 exp) :ref) - char feature-name lang uri-char) + char feature-name lang uri-char + 'without-tags 'without-edit) (www-format-eval-list (nthcdr 2 exp) - char feature-name lang uri-char))) + char feature-name lang uri-char + without-tags without-edit))) (t (format "<%s >%s" (car exp) (www-format-eval-list (nthcdr 2 exp) char feature-name - lang uri-char) + lang uri-char + without-tags without-edit) (car exp))))))) (defun www-format-eval-list (format-list char feature-name - &optional lang uri-char) + &optional lang uri-char + without-tags without-edit) (if (consp format-list) (mapconcat (lambda (exp) - (www-format-eval-unit exp char feature-name lang uri-char)) + (www-format-eval-unit exp char feature-name lang uri-char + nil without-tags without-edit)) format-list "") - (www-format-eval-unit format-list char feature-name lang uri-char))) + (www-format-eval-unit format-list char feature-name lang uri-char + nil without-tags without-edit))) ;;; @ XML generator