<?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%E5%86%85%E5%AE%B9%E7%BC%96%E5%8F%B7%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%E5%86%85%E5%AE%B9%E7%BC%96%E5%8F%B7%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%E5%86%85%E5%AE%B9%E7%BC%96%E5%8F%B7%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;action=history"/>
	<updated>2026-08-11T01:50:16Z</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%E5%86%85%E5%AE%B9%E7%BC%96%E5%8F%B7%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;diff=8404&amp;oldid=prev</id>
		<title>Mwroot at 07:25, 30 September 2025</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=%E4%B8%80%E4%B8%AA%E7%BB%99%E5%86%85%E5%AE%B9%E7%BC%96%E5%8F%B7%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;diff=8404&amp;oldid=prev"/>
		<updated>2025-09-30T07:25:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:25, 30 September 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bash&lt;/del&gt;&quot; line&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;elisp&lt;/ins&gt;&quot; line&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(defun generate-sequence-and-insert (prefix suffix width start end step)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(defun generate-sequence-and-insert (prefix suffix width start end step)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;quot;生成指定格式的数字序列并插入到当前行的行首。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;quot;生成指定格式的数字序列并插入到当前行的行首。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key selfmoney_wiki:diff:1.41:old-8403:rev-8404:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
	<entry>
		<id>https://qingliezhiquan.com/mediawiki/index.php?title=%E4%B8%80%E4%B8%AA%E7%BB%99%E5%86%85%E5%AE%B9%E7%BC%96%E5%8F%B7%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;diff=8403&amp;oldid=prev</id>
		<title>Mwroot: Created page with &quot;&lt;syntaxhighlight lang=&quot;bash&quot; line&gt; (defun generate-sequence-and-insert (prefix suffix width start end step)   &quot;生成指定格式的数字序列并插入到当前行的行首。 参数： PREFIX: 前缀字符串 SUFFIX: 后缀字符串   WIDTH: 数字位数（用0补足） START: 起始数字 END: 终止数字 STEP: 步长  示例： (generate-sequence-and-insert \&quot;w\&quot; \&quot;m\&quot; 2 3 21 3) 在当前行的行首分别插入： w03m, w06m, w09m, w12m, w15m, w18m, w21m&quot;   (inter...&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%E5%86%85%E5%AE%B9%E7%BC%96%E5%8F%B7%E7%9A%84_Emacs_%E5%87%BD%E6%95%B0&amp;diff=8403&amp;oldid=prev"/>
		<updated>2025-09-30T07:25:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt; (defun generate-sequence-and-insert (prefix suffix width start end step)   &amp;quot;生成指定格式的数字序列并插入到当前行的行首。 参数： PREFIX: 前缀字符串 SUFFIX: 后缀字符串   WIDTH: 数字位数（用0补足） START: 起始数字 END: 终止数字 STEP: 步长  示例： (generate-sequence-and-insert \&amp;quot;w\&amp;quot; \&amp;quot;m\&amp;quot; 2 3 21 3) 在当前行的行首分别插入： w03m, w06m, w09m, w12m, w15m, w18m, w21m&amp;quot;   (inter...&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;bash&amp;quot; line&amp;gt;&lt;br /&gt;
(defun generate-sequence-and-insert (prefix suffix width start end step)&lt;br /&gt;
  &amp;quot;生成指定格式的数字序列并插入到当前行的行首。&lt;br /&gt;
参数：&lt;br /&gt;
PREFIX: 前缀字符串&lt;br /&gt;
SUFFIX: 后缀字符串  &lt;br /&gt;
WIDTH: 数字位数（用0补足）&lt;br /&gt;
START: 起始数字&lt;br /&gt;
END: 终止数字&lt;br /&gt;
STEP: 步长&lt;br /&gt;
&lt;br /&gt;
示例： (generate-sequence-and-insert \&amp;quot;w\&amp;quot; \&amp;quot;m\&amp;quot; 2 3 21 3)&lt;br /&gt;
在当前行的行首分别插入： w03m, w06m, w09m, w12m, w15m, w18m, w21m&amp;quot;&lt;br /&gt;
  (interactive &amp;quot;s前缀: \ns后缀: \nn位数: \nn起始数字: \nn终止数字: \nn步长: &amp;quot;)&lt;br /&gt;
  (save-excursion&lt;br /&gt;
    (let ((current start))&lt;br /&gt;
      ;; 移动到当前行的行首&lt;br /&gt;
      (beginning-of-line)&lt;br /&gt;
      &lt;br /&gt;
      (while (&amp;lt;= current end)&lt;br /&gt;
        (let ((padded-number (format (concat &amp;quot;%0&amp;quot; (number-to-string width) &amp;quot;d&amp;quot;) current)))&lt;br /&gt;
          ;; 在当前行的行首插入序列项&lt;br /&gt;
          (insert prefix padded-number suffix)&lt;br /&gt;
          ;; 移动到下一行的行首&lt;br /&gt;
          (forward-line 1)&lt;br /&gt;
          (beginning-of-line)&lt;br /&gt;
          (setq current (+ current step)))))))&lt;br /&gt;
&lt;br /&gt;
(global-set-key (kbd &amp;quot;C-c s&amp;quot;) &amp;#039;generate-sequence-and-insert)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
</feed>