<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=%E4%B8%80%E4%B8%AA%E7%BB%99%E6%B3%95%E5%BE%8B%E6%9D%A1%E6%AC%BE%E6%96%87%E6%9C%AC%E5%89%8D%E5%8A%A0%E4%B8%A4%E4%B8%AA%E5%85%A8%E8%A7%92%E7%A9%BA%E6%A0%BC%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0</id>
	<title>一个给法律条款文本前加两个全角空格的 Emacs 函数 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=%E4%B8%80%E4%B8%AA%E7%BB%99%E6%B3%95%E5%BE%8B%E6%9D%A1%E6%AC%BE%E6%96%87%E6%9C%AC%E5%89%8D%E5%8A%A0%E4%B8%A4%E4%B8%AA%E5%85%A8%E8%A7%92%E7%A9%BA%E6%A0%BC%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0"/>
	<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=%E4%B8%80%E4%B8%AA%E7%BB%99%E6%B3%95%E5%BE%8B%E6%9D%A1%E6%AC%BE%E6%96%87%E6%9C%AC%E5%89%8D%E5%8A%A0%E4%B8%A4%E4%B8%AA%E5%85%A8%E8%A7%92%E7%A9%BA%E6%A0%BC%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;action=history"/>
	<updated>2026-08-11T02:05:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://qingliezhiquan.com/mediawiki/index.php?title=%E4%B8%80%E4%B8%AA%E7%BB%99%E6%B3%95%E5%BE%8B%E6%9D%A1%E6%AC%BE%E6%96%87%E6%9C%AC%E5%89%8D%E5%8A%A0%E4%B8%A4%E4%B8%AA%E5%85%A8%E8%A7%92%E7%A9%BA%E6%A0%BC%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;diff=8459&amp;oldid=prev</id>
		<title>Mwroot: Created page with &quot;&lt;syntaxhighlight lang=&quot;elisp&quot; line&gt; ;;; insert-quan: 从当前行（行首）到 buffer 末尾，在需处理的行前插入两个全角空格（U+3000）。 (defun insert-quan ()   &quot;从当前行（行首）到 buffer 末尾的每一行前插入两个全角空格（U+3000）。 跳过空白行、以 &#039;=&#039;（在可选前导空白之后）开头的行，以及已以全角空格开头的行。&quot;   (interactive)   (let* ((beg (line-beginning-position))          (end (point-max)...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=%E4%B8%80%E4%B8%AA%E7%BB%99%E6%B3%95%E5%BE%8B%E6%9D%A1%E6%AC%BE%E6%96%87%E6%9C%AC%E5%89%8D%E5%8A%A0%E4%B8%A4%E4%B8%AA%E5%85%A8%E8%A7%92%E7%A9%BA%E6%A0%BC%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;diff=8459&amp;oldid=prev"/>
		<updated>2025-09-30T16:12:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;elisp&amp;quot; line&amp;gt; ;;; insert-quan: 从当前行（行首）到 buffer 末尾，在需处理的行前插入两个全角空格（U+3000）。 (defun insert-quan ()   &amp;quot;从当前行（行首）到 buffer 末尾的每一行前插入两个全角空格（U+3000）。 跳过空白行、以 &amp;#039;=&amp;#039;（在可选前导空白之后）开头的行，以及已以全角空格开头的行。&amp;quot;   (interactive)   (let* ((beg (line-beginning-position))          (end (point-max)...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;elisp&amp;quot; line&amp;gt;&lt;br /&gt;
;;; insert-quan: 从当前行（行首）到 buffer 末尾，在需处理的行前插入两个全角空格（U+3000）。&lt;br /&gt;
(defun insert-quan ()&lt;br /&gt;
  &amp;quot;从当前行（行首）到 buffer 末尾的每一行前插入两个全角空格（U+3000）。&lt;br /&gt;
跳过空白行、以 &amp;#039;=&amp;#039;（在可选前导空白之后）开头的行，以及已以全角空格开头的行。&amp;quot;&lt;br /&gt;
  (interactive)&lt;br /&gt;
  (let* ((beg (line-beginning-position))&lt;br /&gt;
         (end (point-max))&lt;br /&gt;
         (end-marker (copy-marker end))&lt;br /&gt;
         (ideograph-space (char-to-string #x3000))&lt;br /&gt;
         (count 0))&lt;br /&gt;
    (save-excursion&lt;br /&gt;
      (goto-char beg)&lt;br /&gt;
      (while (&amp;lt; (point) end-marker)&lt;br /&gt;
        (let* ((line-beg (line-beginning-position))&lt;br /&gt;
               (line-end (line-end-position))&lt;br /&gt;
               (line (buffer-substring-no-properties line-beg line-end)))&lt;br /&gt;
          (unless (or&lt;br /&gt;
                   ;; 空白行（只含空白字符）&lt;br /&gt;
                   (string-match-p &amp;quot;\\`[[:space:]]*\\&amp;#039;&amp;quot; line)&lt;br /&gt;
                   ;; 第一非空字符是 &amp;#039;=&amp;#039; （允许行首有空格/tabs）&lt;br /&gt;
                   (string-match-p &amp;quot;\\`[[:space:]]*=&amp;quot; line)&lt;br /&gt;
                   ;; 已经以全角空格开头（避免重复插入）&lt;br /&gt;
                   (string-prefix-p ideograph-space line))&lt;br /&gt;
            (goto-char line-beg)&lt;br /&gt;
            (insert-char #x3000 2)&lt;br /&gt;
            (setq count (1+ count))))&lt;br /&gt;
        (forward-line 1)))&lt;br /&gt;
    (message &amp;quot;insert-quan: 已处理并插入 %d 行（从当前行到 buffer 末尾）。&amp;quot; count)))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
</feed>