]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/CachedMarkup.php
add SpellCheck support
[SourceForge/phpwiki.git] / lib / CachedMarkup.php
1 <?php 
2 rcs_id('$Id: CachedMarkup.php,v 1.51 2007-01-20 11:24:53 rurban Exp $');
3 /* Copyright (C) 2002 Geoffrey T. Dairiki <dairiki@dairiki.org>
4  * Copyright (C) 2004,2005,2006,2007 $ThePhpWikiProgrammingTeam
5  *
6  * This file is part of PhpWiki.
7  * 
8  * PhpWiki is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  * 
13  * PhpWiki is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with PhpWiki; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 include_once("lib/Units.php");
24
25 class CacheableMarkup extends XmlContent {
26
27     function CacheableMarkup($content, $basepage) {
28         $this->_basepage = $basepage;
29         $this->_buf = '';
30         $this->_content = array();
31         $this->_append($content);
32         if ($this->_buf != '')
33             $this->_content[] = $this->_buf;
34         unset($this->_buf);
35     }
36
37     function pack() {
38         if (function_exists('gzcompress'))
39             return gzcompress(serialize($this), 9);
40         return serialize($this);
41
42         // FIXME: probably should implement some sort of "compression"
43         //   when no gzcompress is available.
44     }
45
46     function unpack($packed) {
47         if (!$packed)
48             return false;
49
50         // ZLIB format has a five bit checksum in it's header.
51         // Lets check for sanity.
52         if (((ord($packed[0]) * 256 + ord($packed[1])) % 31 == 0)
53              and (substr($packed,0,2) == "\037\213") 
54                   or (substr($packed,0,2) == "x\332"))   // 120, 218
55         {
56             if (function_exists('gzuncompress')) {
57                 // Looks like ZLIB.
58                 $data = gzuncompress($packed);
59                 return unserialize($data);
60             } else {
61                 // user our php lib. TESTME
62                 include_once("ziplib.php");
63                 $zip = new ZipReader($packed);
64                 list(,$data,$attrib) = $zip->readFile();
65                 return unserialize($data);
66             }
67         }
68         if (substr($packed,0,2) == "O:") {
69             // Looks like a serialized object
70             return unserialize($packed);
71         }
72         if (preg_match("/^\w+$/", $packed))
73             return $packed;
74         // happened with _BackendInfo problem also.
75         trigger_error("Can't unpack bad cached markup. Probably php_zlib extension not loaded.", 
76                       E_USER_WARNING);
77         return false;
78     }
79     
80     /** Get names of wikipages linked to.
81      *
82      * @return array of hashes { linkto=>pagename, relation=>pagename }
83      */
84     function getWikiPageLinks() {
85         $links = array();
86         foreach ($this->_content as $item) {
87             if (!isa($item, 'Cached_DynamicContent'))
88                 continue;
89             if (!($item_links = $item->getWikiPageLinks($this->_basepage)))
90                 continue;
91             $links = array_merge($links, $item_links);
92         }
93         // array_unique has a bug with hashes! 
94         // set_links checks for duplicates, array_merge does not
95         //return array_unique($links);
96         return $links;
97     }
98
99     /** Get link info.
100      *
101      * This is here to support the XML-RPC listLinks() method.
102      *
103      * @return array
104      * Returns an array of hashes.
105      */
106     function getLinkInfo() {
107         $link = array();
108         foreach ($this->_content as $link) {
109             if (! isa($link, 'Cached_Link'))
110                 continue;
111             $info = $link->getLinkInfo($this->_basepage);
112             $links[$info->href] = $info;
113         }
114         return array_values($links);
115     }
116
117     function _append($item) {
118         if (is_array($item)) {
119             foreach ($item as $subitem)
120                 $this->_append($subitem);
121         }
122         elseif (!is_object($item)) {
123             $this->_buf .= $this->_quote((string) $item);
124         }
125         elseif (isa($item, 'Cached_DynamicContent')) {
126             if ($this->_buf) {
127                 $this->_content[] = $this->_buf;
128                 $this->_buf = '';
129             }
130             $this->_content[] = $item;
131         }
132         elseif (isa($item, 'XmlElement')) {
133             if ($item->isEmpty()) {
134                 $this->_buf .= $item->emptyTag();
135             }
136             else {
137                 $this->_buf .= $item->startTag();
138                 foreach ($item->getContent() as $subitem)
139                     $this->_append($subitem);
140                 $this->_buf .= "</$item->_tag>";
141
142                 if (!isset($this->_description) and $item->getTag() == 'p')
143                     $this->_glean_description($item->asString());
144             }
145             if (!$item->isInlineElement())
146                 $this->_buf .= "\n";
147         }
148         elseif (isa($item, 'XmlContent')) {
149             foreach ($item->getContent() as $item)
150                 $this->_append($item);
151         }
152         elseif (method_exists($item, 'asXML')) {
153             $this->_buf .= $item->asXML();
154         }
155         elseif (method_exists($item, 'asString')) {
156             $this->_buf .= $this->_quote($item->asString());
157         }
158         else {
159             $this->_buf .= sprintf("==Object(%s)==", get_class($item));
160         }
161     }
162
163     function _glean_description($text) {
164         static $two_sentences;
165         if (!$two_sentences) {
166             $two_sentences = pcre_fix_posix_classes("[.?!][\")]*\s+[\"(]*[[:upper:])]"
167                                                     . ".*"
168                                                     . "[.?!][\")]*\s*[\"(]*([[:upper:])]|$)");
169         }
170         
171         if (!isset($this->_description) and preg_match("/$two_sentences/sx", $text))
172             $this->_description = preg_replace("/\s*\n\s*/", " ", trim($text));
173     }
174
175     /**
176      * Guess a short description of the page.
177      *
178      * Algorithm:
179      *
180      * This algorithm was suggested on MeatballWiki by
181      * Alex Schroeder <kensanata@yahoo.com>.
182      *
183      * Use the first paragraph in the page which contains at least two
184      * sentences.
185      *
186      * @see http://www.usemod.com/cgi-bin/mb.pl?MeatballWikiSuggestions
187      *
188      * @return string
189      */
190     function getDescription () {
191         return isset($this->_description) ? $this->_description : '';
192     }
193     
194     function asXML () {
195         $xml = '';
196         $basepage = $this->_basepage;
197         
198         foreach ($this->_content as $item) {
199             if (is_string($item)) {
200                 $xml .= $item;
201             }
202             elseif (is_subclass_of($item, 
203                                    check_php_version(5) 
204                                      ? 'Cached_DynamicContent' 
205                                      : 'cached_dynamiccontent'))
206             {
207                 $val = $item->expand($basepage, $this);
208                 $xml .= $val->asXML();
209             }
210             else {
211                 $xml .= $item->asXML();
212             }
213         }
214         return $xml;
215     }
216
217     function printXML () {
218         $basepage = $this->_basepage;
219         // _content might be changed from a plugin (CreateToc)
220         for ($i=0; $i < count($this->_content); $i++) {
221             $item = $this->_content[$i];
222             if (is_string($item)) {
223                 print $item;
224             }
225             elseif (is_subclass_of($item, 
226                                    check_php_version(5) 
227                                      ? 'Cached_DynamicContent' 
228                                      : 'cached_dynamiccontent')) 
229             {   // give the content the chance to know about itself or even 
230                 // to change itself
231                 $val = $item->expand($basepage, $this);
232                 $val->printXML();
233             }
234             else {
235                 $item->printXML();
236             }
237         }
238     }
239 }       
240
241 /**
242  * The base class for all dynamic content.
243  *
244  * Dynamic content is anything that can change even when the original
245  * wiki-text from which it was parsed is unchanged.
246  */
247 class Cached_DynamicContent {
248
249     function cache(&$cache) {
250         $cache[] = $this;
251     }
252
253     function expand($basepage, &$obj) {
254         trigger_error("Pure virtual", E_USER_ERROR);
255     }
256
257     function getWikiPageLinks($basepage) {
258         return false;
259     }
260 }
261
262 class XmlRpc_LinkInfo {
263     function XmlRpc_LinkInfo($page, $type, $href, $relation = '') {
264         $this->page = $page;
265         $this->type = $type;
266         $this->href = $href;
267         $this->relation = $relation;
268         //$this->pageref = str_replace("/RPC2.php", "/index.php", $href);
269     }
270 }
271
272 class Cached_Link extends Cached_DynamicContent {
273
274     function isInlineElement() {
275         return true;
276     }
277
278     /** Get link info (for XML-RPC support)
279      *
280      * This is here to support the XML-RPC listLinks method.
281      * (See http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=WikiRPCInterface)
282      */
283     function getLinkInfo($basepage) {
284         return new XmlRpc_LinkInfo($this->_getName($basepage),
285                                    $this->_getType(),
286                                    $this->_getURL($basepage),
287                                    $this->_getRelation($basepage));
288     }
289     
290     function _getURL($basepage) {
291         return $this->_url;
292     }
293     function __getRelation($basepage) {
294         return $this->_relation;
295     }
296 }
297
298 class Cached_WikiLink extends Cached_Link {
299
300     function Cached_WikiLink ($page, $label = false, $anchor = false) {
301         $this->_page = $page;
302         if ($anchor)
303             $this->_anchor = $anchor;
304         if ($label and $label != $page)
305             $this->_label = $label;
306         $this->_basepage = false;    
307     }
308
309     function _getType() {
310         return 'internal';
311     }
312     
313     function getPagename($basepage) {
314         $page = new WikiPageName($this->_page, $basepage);
315         if ($page->isValid()) return $page->name;
316         else return false;
317     }
318
319     function getWikiPageLinks($basepage) {
320         if ($basepage == '') return false;
321         if ($link = $this->getPagename($basepage)) 
322             return array(array('linkto' => $link, 'relation' => 0));
323         else return false;
324     }
325
326     function _getName($basepage) {
327         return $this->getPagename($basepage);
328     }
329
330     function _getURL($basepage) {
331         return WikiURL($this->getPagename($basepage));
332         //return WikiURL($this->getPagename($basepage), false, 'abs_url');
333     }
334
335     function expand($basepage, &$markup) {
336         $this->_basepage = $basepage;
337         $label = isset($this->_label) ? $this->_label : false;
338         $anchor = isset($this->_anchor) ? (string)$this->_anchor : '';
339         $page = new WikiPageName($this->_page, $basepage, $anchor);
340         if ($page->isValid()) return WikiLink($page, 'auto', $label);
341         else return HTML($label);
342     }
343
344     function asXML() {
345         $label = isset($this->_label) ? $this->_label : false;
346         $anchor = isset($this->_anchor) ? (string)$this->_anchor : '';
347         //TODO: need basepage for subpages like /Remove (within CreateTOC)
348         $page = new WikiPageName($this->_page, $this->_basepage, $anchor);
349         $link = WikiLink($page, 'auto', $label);
350         return $link->asXML();
351     }
352
353     function asString() {
354         if (isset($this->_label))
355             return $this->_label;
356         return $this->_page;
357     }
358 }
359
360 class Cached_WikiLinkIfKnown extends Cached_WikiLink
361 {
362     function Cached_WikiLinkIfKnown ($moniker) {
363         $this->_page = $moniker;
364     }
365
366     function expand($basepage, &$markup) {
367         return WikiLink($this->_page, 'if_known');
368     }
369 }    
370
371 class Cached_SpellCheck extends Cached_WikiLink
372 {
373     function Cached_SpellCheck ($word, $suggs) {
374         $this->_page = $word;
375         $this->suggestions = $suggs;
376     }
377
378     function expand($basepage, &$markup) {
379         $link = HTML::a(array('class' => 'spell-wrong', 
380                               'title' => 'SpellCheck: '.join(', ', $this->suggestions),
381                               'name' => $this->_page), 
382                         $this->_page);
383         return $link;
384     }
385 }    
386     
387 class Cached_PhpwikiURL extends Cached_DynamicContent
388 {
389     function Cached_PhpwikiURL ($url, $label) {
390         $this->_url = $url;
391         if ($label)
392             $this->_label = $label;
393     }
394
395     function isInlineElement() {
396         return true;
397     }
398
399     function expand($basepage, &$markup) {
400         $label = isset($this->_label) ? $this->_label : false;
401         return LinkPhpwikiURL($this->_url, $label, $basepage);
402     }
403
404     function asXML() {
405         $label = isset($this->_label) ? $this->_label : false;
406         $link = LinkPhpwikiURL($this->_url, $label);
407         return $link->asXML();
408     }
409
410     function asString() {
411         if (isset($this->_label))
412             return $this->_label;
413         return $this->_url;
414     }
415 }    
416
417 /*
418  * Relations (::) are named links to pages.
419  * Attributes (:=) are named metadata per page, "named links to numbers with units". 
420  * We don't want to exhaust the linktable with numbers,
421  * since this would create empty pages per each value, 
422  * so we don't store the attributes as full relationlink. 
423  * But we do store the attribute name as relation with an empty pagename 
424  * to denote that this is an attribute, 
425  * and to enable a fast listRelations mode=attributes
426  */
427 class Cached_SemanticLink extends Cached_WikiLink {
428
429     function Cached_SemanticLink ($url, $label=false) {
430         $this->_url = $url;
431         if ($label && $label != $url)
432             $this->_label = $label;
433         $this->_expandurl($this->_url);
434     }
435
436     function isInlineElement() {
437         return true;
438     }
439
440     function getPagename($basepage) {
441         if (!isset($this->_page)) return false;
442         $page = new WikiPageName($this->_page, $basepage);
443         if ($page->isValid()) return $page->name;
444         else return false;
445     }
446
447     /* add relation to the link table.
448      * attributes have the _relation, but not the _page set. 
449      */
450     function getWikiPageLinks($basepage) {
451         if ($basepage == '') return false;
452         if (!isset($this->_page) and isset($this->_attribute)) {
453             // an attribute, we store it in the basepage now.
454             $page = $GLOBALS['request']->getPage($basepage);    
455             $page->setAttribute($this->_relation, $this->_attribute);
456             return array(array('linkto' => '', 'relation' => $this->_relation));
457             //return false;
458         }
459         if ($link = $this->getPagename($basepage)) 
460             return array(array('linkto' => $link, 'relation' => $this->_relation));
461         else
462             return false;
463     }
464
465     function _expandurl($url) {
466         $m = array();
467         if (!preg_match('/^ ([^:]+) (:[:=]) (.+) $/x', $url, $m)) {
468             return HTML::strong(array('class' => 'rawurl'),
469                                 HTML::u(array('class' => 'baduri'),
470                                         _("BAD semantic relation link")));
471         }
472         $this->_relation = urldecode($m[1]);
473         $is_attribute = ($m[2] == ':=');
474         if ($is_attribute) {
475             $this->_attribute = urldecode($m[3]);
476             // since this stored in the markup cache, we are extra sensible 
477             // not to store false empty stuff.
478             $units = new Units();
479             if (!DISABLE_UNITS and !$units->errcode) 
480             {
481                 $this->_attribute_base = $units->Definition($this->_attribute);
482                 $this->_unit = $units->baseunit($this->_attribute);
483             }
484         } else {
485             $this->_page = urldecode($m[3]);
486         }
487         return $m;
488     }
489
490     function _expand($url, $label = false) {
491         $m = $this->_expandurl($url);
492         $class = 'wiki';
493         // do not link to the attribute value, but to the attribute
494         $is_attribute = ($m[2] == ':=');
495         if ($label) {
496             return HTML::span
497                 (
498                  HTML::a(array('href'  => WikiURL($is_attribute ? $this->_relation : $this->_page),
499                                'class' => "wiki ".($is_attribute ? "attribute" : "relation"),
500                                'title' => $is_attribute 
501                                    ? (isset($this->_attribute_base) ? ("Attribute base value: ").$this->_attribute_base 
502                                                                     : ("Attribute value: ").$this->_attribute)
503                                    : sprintf(_("Relation %s to page %s"), $this->_relation, $this->_page)),
504                          $label)
505                  );
506         } elseif ($is_attribute) {
507             return HTML::span
508                 (
509                  HTML::a(array('href'  => WikiURL($this->_relation),
510                                'class' => "wiki attribute",
511                                'title' => "Attribute base value: " .$this->_attribute_base),
512                          $url)
513                  );
514         } else {
515             return HTML::span
516                 (
517                  HTML::a(array('href'  => WikiURL($this->_relation),
518                                'class' => "wiki relation"),
519                          $this->_relation),
520                  HTML::strong($m[2]),
521                  HTML::a(array('href'  => WikiURL($this->_page),
522                                'class' => "wiki"),
523                          $this->_page)
524                  );
525         }
526     }
527
528     function expand($basepage, &$markup) {
529         $label = isset($this->_label) ? $this->_label : false;
530         return $this->_expand($this->_url, $label);
531     }
532
533     function asXML() {
534         $label = isset($this->_label) ? $this->_label : false;
535         $link = $this->_expand($this->_url, $label);
536         return $link->asXML();
537     }
538
539     function asString() {
540         if (isset($this->_label))
541             return $this->_label;
542         return $this->_url;
543     }
544 }
545     
546 class Cached_ExternalLink extends Cached_Link {
547
548     function Cached_ExternalLink($url, $label=false) {
549         $this->_url = $url;
550         if ($label && $label != $url)
551             $this->_label = $label;
552     }
553
554     function _getType() {
555         return 'external';
556     }
557     
558     function _getName($basepage) {
559         $label = isset($this->_label) ? $this->_label : false;
560         return ($label and is_string($label)) ? $label : $this->_url;
561     }
562
563     function expand($basepage, &$markup) {
564         global $request;
565
566         $label = isset($this->_label) ? $this->_label : false;
567         $link = LinkURL($this->_url, $label);
568
569         if (GOOGLE_LINKS_NOFOLLOW) {
570             // Ignores nofollow when the user who saved the page was authenticated. 
571             $page = $request->getPage($basepage);
572             $current = $page->getCurrentRevision(false);
573             if (!$current->get('author_id'))
574                 $link->setAttr('rel', 'nofollow');
575         }
576         return $link;
577     }
578
579     function asString() {
580         if (isset($this->_label))
581             return $this->_label;
582         return $this->_url;
583     }
584 }
585
586 class Cached_InterwikiLink extends Cached_ExternalLink {
587     
588     function Cached_InterwikiLink($link, $label=false) {
589         $this->_link = $link;
590         if ($label)
591             $this->_label = $label;
592     }
593
594     function getPagename($basepage) {
595         list ($moniker, $page) = split (":", $this->_link, 2);
596         $page = new WikiPageName($page, $basepage);
597         if ($page->isValid()) return $page->name;
598         else return false;
599     }
600
601     function getWikiPageLinks($basepage) {
602         if ($basepage == '') return false;
603         /* ":DontStoreLink" */
604         if (substr($this->_link,0,1) == ':') return false;
605         /* store only links to valid pagenames */
606         if ($link = $this->getPagename($basepage)) 
607             return array(array('linkto' => $link, 'relation' => 0));
608         else return false; // dont store external links
609     }
610
611     function _getName($basepage) {
612         $label = isset($this->_label) ? $this->_label : false;
613         return ($label and is_string($label)) ? $label : $this->_link;
614     }
615     
616     /* there may be internal interwiki links also */
617     function _getType() {
618         return $this->getPagename(false) ? 'internal' : 'external';
619     }
620
621     function _getURL($basepage) {
622         $link = $this->expand($basepage, $this);
623         return $link->getAttr('href');
624     }
625
626     function expand($basepage, &$markup) {
627         $intermap = getInterwikiMap();
628         $label = isset($this->_label) ? $this->_label : false;
629         return $intermap->link($this->_link, $label);
630     }
631
632     function asString() {
633         if (isset($this->_label))
634             return $this->_label;
635         return $this->_link;
636     }
637 }
638
639 // Needed to put UserPages to backlinks. Special method to markup userpages with icons
640 // Thanks to PhpWiki:DanFr for finding this bug. 
641 // Fixed since 1.3.8, prev. versions had no userpages in backlinks
642 class Cached_UserLink extends Cached_WikiLink {
643     function expand($basepage, &$markup) {
644         $label = isset($this->_label) ? $this->_label : false;
645         $anchor = isset($this->_anchor) ? (string)$this->_anchor : '';
646         $page = new WikiPageName($this->_page, $basepage, $anchor);
647         $link = WikiLink($page, 'auto', $label);
648         // $link = HTML::a(array('href' => $PageName));
649         $link->setContent(PossiblyGlueIconToText('wikiuser', $this->_page));
650         $link->setAttr('class', 'wikiuser');
651         return $link;
652     }
653 }
654
655 /**
656  * 1.3.13: Previously stored was only _pi. 
657  * A fresh generated cache has now ->name and ->args also.
658  * main::isActionPage only checks the raw content.
659  */
660 class Cached_PluginInvocation extends Cached_DynamicContent {
661
662     function Cached_PluginInvocation ($pi) {
663         $this->_pi = $pi;
664         $loader = $this->_getLoader();
665         if (is_array($plugin_cmdline = $loader->parsePI($pi)) and $plugin_cmdline[1]) {
666             $this->pi_name = $plugin_cmdline[0]; // plugin, plugin-form, plugin-list, plugin-link
667             $this->name = $plugin_cmdline[1]->getName();
668             $this->args = $plugin_cmdline[2];
669         }
670     }
671
672     function setTightness($top, $bottom) {
673         $this->_tightenable = 0;
674         if ($top) $this->_tightenable |= 1;
675         if ($bottom) $this->_tightenable |= 2;
676     }
677     
678     function isInlineElement() {
679         return false;
680     }
681
682     function expand($basepage, &$markup) {
683         $loader = $this->_getLoader();
684
685         $xml = $loader->expandPI($this->_pi, $GLOBALS['request'], $markup, $basepage);
686         $div = HTML::div(array('class' => 'plugin'));
687         if (isset($this->name))
688             $id = GenerateId($this->name . 'Plugin');
689    
690         if (isset($this->_tightenable)) {
691             if ($this->_tightenable == 3) {
692                 $span = HTML::span(array('class' => 'plugin'), $xml);
693                 if (!empty($id))
694                     $span->setAttr('id', $id);
695                 return $span;
696             }
697             $div->setInClass('tightenable');
698             $div->setInClass('top', ($this->_tightenable & 1) != 0);
699             $div->setInClass('bottom', ($this->_tightenable & 2) != 0);
700         }
701         if (!empty($id))
702             $div->setAttr('id', $id);
703         $div->pushContent($xml);
704         return $div;
705     }
706
707     function asString() {
708         return $this->_pi;
709     }
710
711
712     function getWikiPageLinks($basepage) {
713         $loader = $this->_getLoader();
714
715         return $loader->getWikiPageLinks($this->_pi, $basepage);
716     }
717
718     function & _getLoader() {
719         static $loader = false;
720
721         if (!$loader) {
722             include_once('lib/WikiPlugin.php');
723             $loader = new WikiPluginLoader;
724         }
725         return $loader;
726     }
727 }
728
729 // $Log: not supported by cvs2svn $
730 // Revision 1.50  2007/01/07 18:41:51  rurban
731 // Fix fallback ZipReader syntax error. Use label=false. Add parsed plugin names to the stored tree.
732 //
733 // Revision 1.49  2007/01/04 16:40:35  rurban
734 // Remove units object from CachedMarkup links, Store parsed linkinfo only: basevalue, baseunit.
735 //
736 // Revision 1.48  2007/01/03 21:22:08  rurban
737 // Use Units for attributes. Store the unified base value as Cached_SemanticLink->_attribute_base in the wikimarkup and display it as title.
738 //
739 // Revision 1.47  2007/01/02 13:17:57  rurban
740 // fix semantic page links and attributes, esp. attributes. they get stored as link to empty page also. tighten semantic url expander regex, omit want_content if not necessary
741 //
742 // Revision 1.46  2006/12/22 00:11:38  rurban
743 // add seperate expandurl method, to simplify pagename parsing
744 //
745 // Revision 1.45  2006/10/12 06:33:50  rurban
746 // decide later with which class to render this link (fixes interwiki link layout)
747
748 // (c-file-style: "gnu")
749 // Local Variables:
750 // mode: php
751 // tab-width: 8
752 // c-basic-offset: 4
753 // c-hanging-comment-ender-p: nil
754 // indent-tabs-mode: nil
755 // End:   
756 ?>