Mercurial > hg > xemacs-beta
comparison lisp/hm--html-menus/hm--html-not-standard.el @ 46:6a22abad6937 r19-15
Import from CVS: tag r19-15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:55:31 +0200 |
parents | 8b8b7f3559a2 |
children |
comparison
equal
deleted
inserted
replaced
45:7705b7aa3b8a | 46:6a22abad6937 |
---|---|
43 (interactive (list | 43 (interactive (list |
44 (completing-read | 44 (completing-read |
45 "Include Command: " | 45 "Include Command: " |
46 hm--html-server-side-include-command-with-parameter-alist) | 46 hm--html-server-side-include-command-with-parameter-alist) |
47 (read-string "Parameterlist sepearted by '?': "))) | 47 (read-string "Parameterlist sepearted by '?': "))) |
48 (let ((start (point))) | 48 (if (string= command "") |
49 (error "ERROR: No command specified !") | |
50 (if (string= parameter "") | |
51 (error "ERROR: No parameter specified !") | |
52 (if (= ?| (string-to-char command)) | |
53 (if (= ?? (string-to-char parameter)) | |
54 (insert "<INC SRVURL \"" command parameter "\">") | |
55 (insert "<INC SRVURL \"" command "?" parameter "\">")) | |
56 (if (= ?? (string-to-char parameter)) | |
57 (insert "<INC SRVURL \"|" command parameter "\">") | |
58 (insert "<INC SRVURL \"|" command "?" parameter "\">")))))) | |
59 | |
60 | |
61 (defun hm--html-add-server-side-include-command-with-isindex-parameter | |
62 (command) | |
63 "This function adds a server side include command directive in the buffer. | |
64 The include command uses the \"isindex\"- parameter for the specified command." | |
65 (interactive (list | |
66 (completing-read "Include Command: " | |
67 hm--html-server-side-include-command-alist))) | |
68 (hm--html-add-server-side-include-command command t)) | |
69 | |
70 | |
71 (defun hm--html-add-server-side-include-command (command &optional srvurl) | |
72 "This function adds a server side include command directive in the buffer. | |
73 The directive is only supported by the NCSA http daemon. | |
74 If SRVURL is t, then the attribute srvurl instead of srv is used for the | |
75 include command. With srvurl, the include command uses the \"isindex\"- | |
76 parameter for the specified command." | |
77 (interactive (list | |
78 (completing-read "Include Command: " | |
79 hm--html-server-side-include-command-alist))) | |
80 (let ((attribute (if srvurl "SRVURL" "SRV"))) | |
49 (if (string= command "") | 81 (if (string= command "") |
50 (error "ERROR: No command specified !") | 82 (error "ERROR: No command specified !") |
51 (if (string= parameter "") | 83 (if (= ?| (string-to-char command)) |
52 (error "ERROR: No parameter specified !") | 84 (insert "<INC " attribute" \"" command "\">") |
53 (if (= ?| (string-to-char command)) | 85 (insert "<INC " attribute " \"|" command "\">"))))) |
54 (if (= ?? (string-to-char parameter)) | 86 |
55 (insert "<INC SRVURL \"" command parameter "\">") | 87 |
56 (insert "<INC SRVURL \"" command "?" parameter "\">")) | 88 (defun hm--html-add-server-side-include-file (file) |
57 (if (= ?? (string-to-char parameter)) | 89 "This function adds a server side include file directive in the buffer. |
58 (insert "<INC SRVURL \"|" command parameter "\">") | 90 The directive is only supported by the NCSA http daemon." |
59 (insert "<INC SRVURL \"|" command "?" parameter "\">"))) | 91 (interactive "FInclude File: ") |
60 (html-maybe-deemphasize-region (1+ start) (1- (point))))))) | 92 (if (string= file "") |
93 (error "ERROR: No filename specified !") | |
94 (insert "<INC SRV \"" file "\">"))) | |
61 | 95 |
62 | 96 |
63 (defun hm--html-add-plaintext () | 97 (defun hm--html-add-plaintext () |
64 "Adds the HTML tags for plaintext." | 98 "Adds the HTML tags for plaintext." |
65 (interactive) | 99 (interactive) |