Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 399-413) - Update from CVS - Rcirc update from Ryan Yeske - Merge from gnus--rel--5.10 - Miscellaneous tq-related fixes. * gnus--rel--5.10 (patch 126-127) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-105
This commit is contained in:
commit
d65dc2c390
84 changed files with 2933 additions and 8240 deletions
|
@ -29,7 +29,9 @@ Reminders sent out on 2006-06-08.
|
||||||
** Send an email to the various distributions, including the GNOME
|
** Send an email to the various distributions, including the GNOME
|
||||||
and KDE projects, to use the new Emacs icons in etc/images/icons.
|
and KDE projects, to use the new Emacs icons in etc/images/icons.
|
||||||
|
|
||||||
* BUGS
|
* WINDOWS SUPPORT BUGS.
|
||||||
|
These don't need to be fixed to start pretest, but we call the
|
||||||
|
attention of Windows users to fixing them.
|
||||||
|
|
||||||
** Markus Gritsch's report about Emacs looping on Windoze with the following
|
** Markus Gritsch's report about Emacs looping on Windoze with the following
|
||||||
.emacs file, and then reduce Emacs frame width to "something quite narrow":
|
.emacs file, and then reduce Emacs frame width to "something quite narrow":
|
||||||
|
@ -39,13 +41,21 @@ and KDE projects, to use the new Emacs icons in etc/images/icons.
|
||||||
'(hscroll-step 1)
|
'(hscroll-step 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
** Jorgen Schaefer <forcer@forcix.cx>'s June 18 bug report about
|
** Drew Adams 12 Aug bug rpt: overlay display artifact: trace left behind
|
||||||
fields and invisible overlays needs attention from a field expert.
|
Windows only bug.
|
||||||
|
|
||||||
|
* BUGS
|
||||||
|
|
||||||
|
** Milan Zamazal's Aug 23 bug report about crashes with certain fonts.
|
||||||
|
|
||||||
|
** C-g fails to interrupt accept-process-output in Gnus.
|
||||||
|
|
||||||
** Implement buffer-chars-modified-tick.
|
** Implement buffer-chars-modified-tick.
|
||||||
|
|
||||||
** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem.
|
** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem.
|
||||||
|
|
||||||
|
** Make key-binding use the maps specified by positions given in the events.
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION
|
* DOCUMENTATION
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,40 @@
|
||||||
|
2006-08-25 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* TUTORIAL: Give priority to graphical terminals over text terminals
|
||||||
|
regarding C-z.
|
||||||
|
|
||||||
|
2006-08-21 Sun Yijiang <sunyijiang@gmail.com>
|
||||||
|
|
||||||
|
* TUTORIAL.cn: Sync with the latest TUTORIAL.
|
||||||
|
|
||||||
|
2006-08-20 Dave Love <fx@gnu.org>
|
||||||
|
|
||||||
|
* emacs.py: Update to Dave Love's latest version.
|
||||||
|
(__all__): Fix args -> eargs. Add new `modpath' fun.
|
||||||
|
(eargs): Add `imports' arg.
|
||||||
|
(all_names): New fun.
|
||||||
|
(complete): Rewrite without using rlcompleter.
|
||||||
|
Remove `namespace' arg, add `imports' arg.
|
||||||
|
(ehelp): Replace g and l args with `imports'.
|
||||||
|
(eimport): Use __main__ rather than `emacs' namespace.
|
||||||
|
(modpath): New fun.
|
||||||
|
|
||||||
|
2006-08-20 Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> (tiny change)
|
||||||
|
|
||||||
|
* emacs.py (eexecfile): Use the __main__ rather than `emacs' namespace.
|
||||||
|
|
||||||
|
2006-08-18 Primoz PETERLIN <primoz.peterlin@mf.uni-lj.si>
|
||||||
|
|
||||||
|
* TUTORIAL.sl: Synchronize with TUTORIAL.
|
||||||
|
|
||||||
|
2006-08-18 Mats Lidell <matsl@contactor.se>
|
||||||
|
|
||||||
|
* TUTORIAL.sv: Synchronize with TUTORIAL.
|
||||||
|
|
||||||
|
2006-08-18 Alfredo Finelli <alfredofnl@tiscali.it>
|
||||||
|
|
||||||
|
* TUTORIAL.it: Synchronize with TUTORIAL.
|
||||||
|
|
||||||
2006-08-15 Carsten Dominik <dominik@science.uva.nl>
|
2006-08-15 Carsten Dominik <dominik@science.uva.nl>
|
||||||
|
|
||||||
* orgcard.tex: Version number change.
|
* orgcard.tex: Version number change.
|
||||||
|
|
11
etc/NEWS
11
etc/NEWS
|
@ -914,6 +914,13 @@ The variable `automatic-hscrolling' was renamed to
|
||||||
the window now works sensibly, by automatically adjusting the window's
|
the window now works sensibly, by automatically adjusting the window's
|
||||||
vscroll property.
|
vscroll property.
|
||||||
|
|
||||||
|
*** New customize option `overline-margin' controls the space between
|
||||||
|
overline and text.
|
||||||
|
|
||||||
|
*** New variable `x-underline-at-descent-line' controls the relative
|
||||||
|
position of the underline. When set, it overrides the
|
||||||
|
`x-use-underline-position-properties' variables.
|
||||||
|
|
||||||
+++
|
+++
|
||||||
*** The new face `mode-line-inactive' is used to display the mode line
|
*** The new face `mode-line-inactive' is used to display the mode line
|
||||||
of non-selected windows. The `mode-line' face is now used to display
|
of non-selected windows. The `mode-line' face is now used to display
|
||||||
|
@ -4740,6 +4747,7 @@ keymap alist to this list.
|
||||||
|
|
||||||
*** The definition of a key-binding passed to define-key can use XEmacs-style
|
*** The definition of a key-binding passed to define-key can use XEmacs-style
|
||||||
key-sequences, such as [(control a)].
|
key-sequences, such as [(control a)].
|
||||||
|
|
||||||
** Abbrev changes:
|
** Abbrev changes:
|
||||||
|
|
||||||
+++
|
+++
|
||||||
|
@ -5568,6 +5576,9 @@ been renamed to `disabled-command-function'. The variable
|
||||||
*** `emacsserver' now runs `pre-command-hook' and `post-command-hook'
|
*** `emacsserver' now runs `pre-command-hook' and `post-command-hook'
|
||||||
when it receives a request from emacsclient.
|
when it receives a request from emacsclient.
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** `current-idle-time' reports how long Emacs has been idle.
|
||||||
|
|
||||||
** Lisp file loading changes:
|
** Lisp file loading changes:
|
||||||
|
|
||||||
+++
|
+++
|
||||||
|
|
5
etc/TODO
5
etc/TODO
|
@ -21,7 +21,7 @@ a window doesn't select it.
|
||||||
but if you type M-n you should get the visited file name of the
|
but if you type M-n you should get the visited file name of the
|
||||||
current buffer.
|
current buffer.
|
||||||
|
|
||||||
** whitespace-cleanup should work only on the region if the region is active.
|
** describe-face should show an example of text in the face.
|
||||||
|
|
||||||
** Distribute a bar cursor of width > 1 evenly between the two glyphs
|
** Distribute a bar cursor of width > 1 evenly between the two glyphs
|
||||||
on each side of the bar (what to do at the edges?).
|
on each side of the bar (what to do at the edges?).
|
||||||
|
@ -125,6 +125,9 @@ current buffer.
|
||||||
|
|
||||||
** Internationalize Emacs's messages.
|
** Internationalize Emacs's messages.
|
||||||
|
|
||||||
|
** Set up a facility to save backtraces when errors happen during
|
||||||
|
specified filters, specified timers, and specified hooks.
|
||||||
|
|
||||||
** Install mmc@maruska.dyndns.org's no-flicker change.
|
** Install mmc@maruska.dyndns.org's no-flicker change.
|
||||||
|
|
||||||
** Add a "current vertical pixel level" value that goes with point,
|
** Add a "current vertical pixel level" value that goes with point,
|
||||||
|
|
22
etc/TUTORIAL
22
etc/TUTORIAL
|
@ -644,18 +644,18 @@ session--this is the command C-x C-c. (Do not worry about losing
|
||||||
changes you have made; C-x C-c offers to save each changed file before
|
changes you have made; C-x C-c offers to save each changed file before
|
||||||
it kills the Emacs.)
|
it kills the Emacs.)
|
||||||
|
|
||||||
|
If you are using a graphical display that supports multiple
|
||||||
|
applications in parallel, you don't need any special command to move
|
||||||
|
from Emacs to another application. You can do this with the mouse or
|
||||||
|
with window manager commands. However, if you're using a text
|
||||||
|
terminal which can only show one application at a time, you need to
|
||||||
|
"suspend" Emacs to move to any other program.
|
||||||
|
|
||||||
C-z is the command to exit Emacs *temporarily*--so that you can go
|
C-z is the command to exit Emacs *temporarily*--so that you can go
|
||||||
back to the same Emacs session afterward.
|
back to the same Emacs session afterward. When Emacs is running on a
|
||||||
|
text terminal, C-z "suspends" Emacs; that is, it returns to the shell
|
||||||
On systems which allow it, C-z "suspends" Emacs; that is, it returns
|
but does not destroy the Emacs. In the most common shells, you can
|
||||||
to the shell but does not destroy the Emacs. In the most common
|
resume Emacs with the `fg' command or with `%emacs'.
|
||||||
shells, you can resume Emacs with the `fg' command or with `%emacs'.
|
|
||||||
|
|
||||||
On systems which do not implement suspending, C-z creates a subshell
|
|
||||||
running under Emacs to give you the chance to run other programs and
|
|
||||||
return to Emacs afterward; it does not truly "exit" from Emacs. In
|
|
||||||
this case, the shell command `exit' is the usual way to get back to
|
|
||||||
Emacs from the subshell.
|
|
||||||
|
|
||||||
The time to use C-x C-c is when you are about to log out. It's also
|
The time to use C-x C-c is when you are about to log out. It's also
|
||||||
the right thing to use to exit an Emacs invoked under mail handling
|
the right thing to use to exit an Emacs invoked under mail handling
|
||||||
|
|
|
@ -165,7 +165,7 @@ M-comma
|
||||||
大部分的 Emacs 命令接受数字参数,并且对于多数命令而言,这些数字参数的作
|
大部分的 Emacs 命令接受数字参数,并且对于多数命令而言,这些数字参数的作
|
||||||
用是指定命令的重复次数。为一个命令指定数字参数(也就是重复次数)的方法
|
用是指定命令的重复次数。为一个命令指定数字参数(也就是重复次数)的方法
|
||||||
是:先输入 C-u,然后输入数字作为参数,最后再输入命令。如果你有META (或
|
是:先输入 C-u,然后输入数字作为参数,最后再输入命令。如果你有META (或
|
||||||
EDIT 或 ALT)键,那么还有另一种办法:按住 META 键不动,然后输入数字。不
|
EDIT 或 ALT)键,那么还有另一种办法:按住 META 键不放,然后输入数字。不
|
||||||
过我们还是建议你用 C-u,因为它在任何终端机上都能用。这种数字参数也称为
|
过我们还是建议你用 C-u,因为它在任何终端机上都能用。这种数字参数也称为
|
||||||
“前缀参数”,意思是说这个参数是先于使用它的命令而输入的。
|
“前缀参数”,意思是说这个参数是先于使用它的命令而输入的。
|
||||||
|
|
||||||
|
@ -174,9 +174,9 @@ EDIT
|
||||||
>> 为 C-n 或者 C-p 指定一个数字参数,这样你可以只用一个命令就把光标移动
|
>> 为 C-n 或者 C-p 指定一个数字参数,这样你可以只用一个命令就把光标移动
|
||||||
到本行的附近。
|
到本行的附近。
|
||||||
|
|
||||||
虽然大部分命令用数字参数来作为其重复次数,但是也有些命令例外,它们将数
|
虽然大部分命令把数字参数解释为其重复次数,但是也有些命令例外,它们将数
|
||||||
字参数另做它用。比如有些命令(目前还没学到)仅仅将前缀参数作为一个标
|
字参数另做它用。比如有些命令(我们目前还没学到)仅仅将前缀参数作为一个
|
||||||
志——只要有一个前缀参数出现,不管其值为何,命令的功能都会改变。
|
标志——只要给出有一个前缀参数,不管其值为何,它都会改变命令的功能。
|
||||||
|
|
||||||
而 C-v 和 M-v 则属于另一种类型的例外。当给定一个参数时,它们将滚动你指
|
而 C-v 和 M-v 则属于另一种类型的例外。当给定一个参数时,它们将滚动你指
|
||||||
定的“行数”,而不是“屏数”。举例来说,C-u 8 C-v 将屏幕向下滚动 8 行,
|
定的“行数”,而不是“屏数”。举例来说,C-u 8 C-v 将屏幕向下滚动 8 行,
|
||||||
|
@ -188,8 +188,8 @@ EDIT
|
||||||
以给定一个参数然后执行 M-v。
|
以给定一个参数然后执行 M-v。
|
||||||
|
|
||||||
如果你正在使用一个窗口系统,比如 X11 或者微软的 Windows,那么在 Emacs
|
如果你正在使用一个窗口系统,比如 X11 或者微软的 Windows,那么在 Emacs
|
||||||
窗口的左边或者右边应该有一个长方形的区域叫“滚动条”,你可以用鼠标操纵
|
窗口的边缘应该有一个长方形的区域叫“滚动条”,你可以用鼠标操纵滚动条来
|
||||||
滚动条来滚动文字。
|
滚动文字。
|
||||||
|
|
||||||
>> 试着在“滚动条内的反白区域”上按一下鼠标中键。
|
>> 试着在“滚动条内的反白区域”上按一下鼠标中键。
|
||||||
文字应该会滚动到鼠标所指示的位置。
|
文字应该会滚动到鼠标所指示的位置。
|
||||||
|
@ -202,10 +202,10 @@ EDIT
|
||||||
* 在 EMACS 失去响应的时候(WHEN EMACS IS HUNG)
|
* 在 EMACS 失去响应的时候(WHEN EMACS IS HUNG)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|
||||||
如果 Emacs 对你的命令失去响应,你可以很安全地用 C-g 来终止这个命令。
|
如果 Emacs 对你的命令失去响应,你可以用 C-g 来安全地终止这条命令。C-g
|
||||||
C-g 也可以被用来终止一个执行过久的命令。
|
也可以终止一条执行过久的命令。
|
||||||
|
|
||||||
C-g 还可以被来取消数字参数和那些输入到一半的命令。
|
C-g 还可以取消数字参数和只输入到一半的命令。
|
||||||
|
|
||||||
>> 输入 C-u 100 设定一个值为 100 的数字参数,然后按 C-g。
|
>> 输入 C-u 100 设定一个值为 100 的数字参数,然后按 C-g。
|
||||||
现在再按 C-f,光标应该只会移动一个字符,因为你已经用 C-g 取消了参数。
|
现在再按 C-f,光标应该只会移动一个字符,因为你已经用 C-g 取消了参数。
|
||||||
|
@ -219,16 +219,16 @@ C-g
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
有一些 Emacs 命令被“禁用”了,以避免初学者在不了解其确切功能的情况下误
|
有一些 Emacs 命令被“禁用”了,以避免初学者在不了解其确切功能的情况下误
|
||||||
用这些命令,造成麻烦。
|
用它们,造成麻烦。
|
||||||
|
|
||||||
如果你用到了一个被禁用的命令,Emacs 会显示一个提示消息,告诉你这个命令
|
如果你用到了一个被禁用的命令,Emacs 会显示一个提示消息,告诉你这个命令
|
||||||
到底是干什么的,询问你是否要继续,并在得到你的肯定之后再执行这命令。
|
到底是干什么的,询问你是否要继续,并在得到你的肯定之后再执行这命令。
|
||||||
|
|
||||||
你要是真的想执行被禁用的命令,那么在 Emacs 询问你的时候应该按空格。一般
|
如果你真的想用这条命令,在 Emacs 询问你的时候应该按空格。一般来说,如果
|
||||||
来说,如果你不想执行,按“n”就行了。
|
你不想用,就按“n”。
|
||||||
|
|
||||||
>> 试试 C-x C-l (这是一个被禁用的命令)
|
>> 试试 C-x C-l (这是一个被禁用的命令)
|
||||||
然后用 n 来回答问题。
|
然后用 n 来回答询问。
|
||||||
|
|
||||||
|
|
||||||
* 窗格(WINDOWS)
|
* 窗格(WINDOWS)
|
||||||
|
@ -245,7 +245,7 @@ Emacs
|
||||||
>> 把光标移到本行然后输入 C-u 0 C-l。
|
>> 把光标移到本行然后输入 C-u 0 C-l。
|
||||||
|
|
||||||
>> 输入 CONTROL-h k CONTROL-f。观察当一个新窗格出现时当前窗格(用来显示
|
>> 输入 CONTROL-h k CONTROL-f。观察当一个新窗格出现时当前窗格(用来显示
|
||||||
CONTROL-f 命令的文档)是如何缩小的。
|
CONTROL-f 命令的文档)是如何变小的。
|
||||||
|
|
||||||
>> 输入 C-x 1 关掉文档窗格。
|
>> 输入 C-x 1 关掉文档窗格。
|
||||||
|
|
||||||
|
@ -265,33 +265,33 @@ Emacs
|
||||||
用法应该一样。一般来说 <Delback> 就是位于 <Return> 键上方某处的一个大号
|
用法应该一样。一般来说 <Delback> 就是位于 <Return> 键上方某处的一个大号
|
||||||
键,通常被标示为“Delete”、“Del”或者“Backspace”。
|
键,通常被标示为“Delete”、“Del”或者“Backspace”。
|
||||||
|
|
||||||
如果你找到了标着“Backspace”的键,那么它应该就是 <Delback>;即便你又在
|
如果你找到了“Backspace”键,那么它应该就是 <Delback>;哪怕你又在别的地
|
||||||
键盘其它地方找到了一个标示为“Del”的键,那么它也应该不是 <Delback>。
|
方找到了一个“Del”键,那么它也应该不是 <Delback>。
|
||||||
|
|
||||||
一种更通用的说法是,<Delback> 将位于光标前的一个字符删除。
|
一种更通用的说法是,<Delback> 将删除位于光标前的一个字符。
|
||||||
|
|
||||||
>> 现在就试试——敲点字,然后按几下 <Delback> 删除它们。
|
>> 现在就试试——敲点字,然后按几下 <Delback> 删除它们。
|
||||||
不用担心你会修改文件,你干什么都没关系,这里就是专给你练习用的。
|
不用担心你会修改文件,你干什么都没关系,这里就是专给你练习用的。
|
||||||
|
|
||||||
如果一行文字很长、超出了窗格的宽度,显示不下的部分会在紧邻的下一行继续
|
如果一行文字很长、超出了窗格的宽度,显示不下的部分会在紧邻的下一行继续
|
||||||
显示。这时会有一个反斜线(控制台下是反斜线,如果你用图形窗口系统,则应
|
显示。这时会有一个反斜线(在控制台下是反斜线,如果你用图形窗口系统,则
|
||||||
该是一个小小的转弯箭头)显示在右边沿,表明这是某一行的接续显示。
|
应该是一个小小的转弯箭头)显示在右边沿,表明这是某一行的接续显示。
|
||||||
|
|
||||||
>> 输入文字,一直到屏幕的右边界,然后继续,你会看到一个接续行出现。
|
>> 输入文字,一直到屏幕的右边界,然后继续,你会看到一个接续行出现。
|
||||||
|
|
||||||
>> 用 <Delback> 删掉一些文字,直到此行长度小于窗格宽度,接续行就消失了。
|
>> 用 <Delback> 删掉一些文字,直到此行长度小于窗格宽度,接续行就消失了。
|
||||||
|
|
||||||
你可以像删除其他字符一样删除换行符。删除两行中间的换行符会将两行合并成
|
换行符跟其他字符一样可以被删除。两行中间的换行符被删除后,这两行将会合
|
||||||
一行。如果合并的结果使这一行太长,超出了窗格的宽度,它就会以一个接续行
|
并成一行。如果合并后的这一行太长,超出了窗格宽度,它就会以一个接续行来
|
||||||
来显示。
|
显示。
|
||||||
|
|
||||||
>> 移动光标到本行的开头并输入 <Delback>。
|
>> 移动光标到某行的开头并输入 <Delback>。
|
||||||
这时本行与其前一行将被合并为一行。
|
这时该行将与其前一行一起被合并为一行。
|
||||||
|
|
||||||
>> 输入 <Return> 重新插入你刚才删除的换行符。
|
>> 输入 <Return> 重新插入你刚才删除的换行符。
|
||||||
|
|
||||||
前面说过,大部分的 Emacs 命令都可以指定重复次数,这其中也包括输入字符的
|
前面讲过,大部分的 Emacs 命令都可以指定重复次数,这其中也包括输入字符的
|
||||||
命令。重复执行输入字符的命令实际上就是输入多个一样的字符。
|
命令。重复执行输入字符的命令实际上就是输入多个相同的字符。
|
||||||
|
|
||||||
>> 试试 C-u 8 *,这将会插入 ********。
|
>> 试试 C-u 8 *,这将会插入 ********。
|
||||||
|
|
||||||
|
@ -329,10 +329,10 @@ C-SPC
|
||||||
注意,“移除(kill)”和“删除(delete)”的不同在于被移除的东西可以找回
|
注意,“移除(kill)”和“删除(delete)”的不同在于被移除的东西可以找回
|
||||||
来,而被删除的就不行了。【实际上,移除掉的东西虽然看起来“消失”了,但
|
来,而被删除的就不行了。【实际上,移除掉的东西虽然看起来“消失”了,但
|
||||||
实际上被 Emacs 记录了下来,因此还可以找回来;而删除掉的东西虽然也可能还
|
实际上被 Emacs 记录了下来,因此还可以找回来;而删除掉的东西虽然也可能还
|
||||||
在内存里,但是已经被Emacs“抛弃”了,所以就找不回来了。】重新插入被移除
|
在内存里,但是已经被 Emacs“抛弃”了,所以就找不回来了。】重新插入被移
|
||||||
的文字称为“召回(yank)”。一般而言,那些会去除很多文字的命令会把去除
|
除的文字称为“召回(yank)”。一般而言,那些会去除很多文字的命令会把去
|
||||||
掉的文字储存起来(它们被设定成了“可召回”),而那些只是去除一个字符或
|
除掉的文字储存起来(它们被设定成了“可召回”),而那些只是去除一个字符
|
||||||
者只是去除空白的命令就不会储存那些被去除掉的东西(因此你就无法召回)。
|
或者只是去除空白的命令就不会储存被去除掉的东西(自然你就无法召回了)。
|
||||||
|
|
||||||
>> 移动光标到一非空白行的行头,然后输入 C-k 移除那一行上的文字。
|
>> 移动光标到一非空白行的行头,然后输入 C-k 移除那一行上的文字。
|
||||||
|
|
||||||
|
@ -409,9 +409,9 @@ C-_ Ҳ
|
||||||
存盘,就要在编辑前“寻找”到一个存盘文件。(这个过程通常也被称为“访问”
|
存盘,就要在编辑前“寻找”到一个存盘文件。(这个过程通常也被称为“访问”
|
||||||
文件。)
|
文件。)
|
||||||
|
|
||||||
寻找到一个文件意味着你可以在 Emacs 里查看这个文件的内容。从很多角度讲,
|
寻找到一个文件意味着你可以在 Emacs 里查看这个文件的内容。从很多方面讲,
|
||||||
这就等于你在直接编辑这个文件。但是你所做的修改只有在“存盘”的时候才会
|
这就等于你在直接编辑这个文件。但是你所做的修改只有在“存盘”的时候才会
|
||||||
被写入文件。也正因为如此,你可以丢弃一个改到一半的文件而不必把这个残废
|
被写入文件。也正因为如此,你可以丢弃一个改到一半的文件而不必把这个残缺
|
||||||
文件也保存到计算机上。最后就算你真正存了盘,Emacs 也会把存盘前的文件重
|
文件也保存到计算机上。最后就算你真正存了盘,Emacs 也会把存盘前的文件重
|
||||||
命名保存,以防你改完之后又想反悔。
|
命名保存,以防你改完之后又想反悔。
|
||||||
|
|
||||||
|
@ -572,10 +572,10 @@ replace-string
|
||||||
字符串替换命令需要两个参数——被替换的字符串和用来替换它的字符串。每个
|
字符串替换命令需要两个参数——被替换的字符串和用来替换它的字符串。每个
|
||||||
参数的输入用换行符来结束。
|
参数的输入用换行符来结束。
|
||||||
|
|
||||||
>> 将光标移到本行的下两行空白,然后输入
|
>> 将光标移到本行下面第二行的空白处,然后输入
|
||||||
M-x repl s<Return>changed<Return>altered<Return>。
|
M-x repl s<Return>changed<Return>altered<Return>。
|
||||||
|
|
||||||
【为了继续练习,保留一行原文如下:
|
【以下保留一行原文,以应练习之需:
|
||||||
Notice how this line has changed: you've replaced... 】
|
Notice how this line has changed: you've replaced... 】
|
||||||
|
|
||||||
请注意这一行是怎么改变的:在光标之后的范围内,你已经将“changed”这个
|
请注意这一行是怎么改变的:在光标之后的范围内,你已经将“changed”这个
|
||||||
|
@ -617,7 +617,7 @@ replace-string
|
||||||
果位于文件的末尾,就显示 --Bot--。如果文件很小,一屏就足以显示全部内容,
|
果位于文件的末尾,就显示 --Bot--。如果文件很小,一屏就足以显示全部内容,
|
||||||
那么状态栏会显示 --All--。
|
那么状态栏会显示 --All--。
|
||||||
|
|
||||||
L 和其后的数字给出了光标所在行的行号。
|
“L” 和其后的数字给出了光标所在行的行号。
|
||||||
|
|
||||||
最开头的星号(*)表示你已经对文字做过改动。刚刚打开的文件肯定没有被改动
|
最开头的星号(*)表示你已经对文字做过改动。刚刚打开的文件肯定没有被改动
|
||||||
过,所以状态栏上显示的不是星号而是短线(-)。
|
过,所以状态栏上显示的不是星号而是短线(-)。
|
||||||
|
@ -690,14 +690,14 @@ Emacs
|
||||||
功后,光标会停留在搜索目标出现的地方。
|
功后,光标会停留在搜索目标出现的地方。
|
||||||
|
|
||||||
Emacs 的搜索命令的独特之处在于,它是“渐进的(incremental)”,意思是搜
|
Emacs 的搜索命令的独特之处在于,它是“渐进的(incremental)”,意思是搜
|
||||||
索与输入同时进行:你在这边一个字一个字地输入你想搜索的东西,同时 Emacs
|
索与输入同时进行:你在键盘上一字一句地输入搜索词的过程中,Emacs 就已经
|
||||||
在那边就替你搜索了。
|
开始替你搜索了。
|
||||||
|
|
||||||
C-s 是向前搜索,C-r 是向后搜索。不过手别这么快!先等等别着急试。
|
C-s 是向前搜索,C-r 是向后搜索。不过手别这么快!先等等别着急试。
|
||||||
|
|
||||||
在你按下 C-s 之后,你会发现回显区里有“I-search”字样出现,这是在提示
|
在你按下 C-s 之后,你会发现回显区里有“I-search”字样出现,提示你目前
|
||||||
你目前 Emacs 正处于“渐进搜索”状态,正在等待你输入搜索字串。<Return>
|
Emacs 正处于“渐进搜索”状态,正在等待你输入搜索字串。按 <Return> 会结
|
||||||
会结束搜索。
|
束搜索。
|
||||||
|
|
||||||
>> 输入 C-s 开始一个搜索。注意敲慢一点,一次输入一个字符。
|
>> 输入 C-s 开始一个搜索。注意敲慢一点,一次输入一个字符。
|
||||||
慢慢输入“cursor”整个词,每敲一个字就暂停一下,注意观察光标。
|
慢慢输入“cursor”整个词,每敲一个字就暂停一下,注意观察光标。
|
||||||
|
@ -917,10 +917,10 @@ Emacs
|
||||||
|
|
||||||
Emacs 快速指南(Tutorial)早有两个刘昭宏的中文译本,繁简各一。其简体版本
|
Emacs 快速指南(Tutorial)早有两个刘昭宏的中文译本,繁简各一。其简体版本
|
||||||
(TUTORIAL.cn)基本由繁体版本(TUTORIAL.zh)经词语替换而得。然而繁简中文
|
(TUTORIAL.cn)基本由繁体版本(TUTORIAL.zh)经词语替换而得。然而繁简中文
|
||||||
不仅在用词习惯上有所不同,更有诸多表达方式和句法方面的差异。因此一直以来
|
不仅在用词习惯上有所不同,更有诸多表达方式与句法方面的差异,因此一直以来
|
||||||
阅读 TUTORIAL.cn 都略觉晦涩和生硬。这次重新翻译 TUTORIAL.cn 的动机正是源
|
用户使用 TUTORIAL.cn 都会略觉生硬和晦涩。这次重新翻译 TUTORIAL.cn 的动机
|
||||||
于这种体验,希望我们的工作能够让本文更好的发挥其应有的作用。TUTORIAL.zh
|
正是源于这种体验,希望我们的工作能够让本文更好地发挥其作用。TUTORIAL.zh
|
||||||
的译文质量很高,在翻译过程中给予过我们很多借鉴和参考,在此对刘昭宏的工作
|
的译文质量很高,在翻译过程中给予过我们许多借鉴和参考,在此对刘昭宏的工作
|
||||||
表示感谢。
|
表示感谢。
|
||||||
|
|
||||||
翻译过程中最大的挑战莫过于术语译词的选择了。经过水木社区 Emacs 板热心网
|
翻译过程中最大的挑战莫过于术语译词的选择了。经过水木社区 Emacs 板热心网
|
||||||
|
@ -954,6 +954,10 @@ Emacs
|
||||||
中的“window”就只能译成“窗格”了。我们认为 Emacs 中 window 和
|
中的“window”就只能译成“窗格”了。我们认为 Emacs 中 window 和
|
||||||
frame 的关系用窗格和窗口来类比是十分形象的。
|
frame 的关系用窗格和窗口来类比是十分形象的。
|
||||||
|
|
||||||
|
《学习GNU Emacs》(第二版)一书对“window”和“frame”的翻译与本教程
|
||||||
|
刚好相反(分别译作“窗口”和“窗格”)。在此特别注明,以消除可能产生
|
||||||
|
的疑惑。
|
||||||
|
|
||||||
[2] 对于“delete”和“kill”的区别,正文已经给出了详细的说明。“删除”和
|
[2] 对于“delete”和“kill”的区别,正文已经给出了详细的说明。“删除”和
|
||||||
“移除”相比较起来,前者更多地隐含着“破坏”和“不可恢复”的意思,而
|
“移除”相比较起来,前者更多地隐含着“破坏”和“不可恢复”的意思,而
|
||||||
后者更多地隐含着“被转移”和“可恢复”的意思。因此分别选择它们作为上
|
后者更多地隐含着“被转移”和“可恢复”的意思。因此分别选择它们作为上
|
||||||
|
|
|
@ -219,9 +219,9 @@ La schermata si sposta di 8 righe verso l'alto. Se vuoi tornare di nuovo
|
||||||
in basso puoi usare un argomento numerico con M-v.
|
in basso puoi usare un argomento numerico con M-v.
|
||||||
|
|
||||||
Quando si usa un sistema a finestre, come X11 o MS-Windows, ci dovrebbe
|
Quando si usa un sistema a finestre, come X11 o MS-Windows, ci dovrebbe
|
||||||
essere un'area rettangolare allungata chiamata barra di scorrimento sul
|
essere un'area rettangolare allungata chiamata barra di scorrimento a
|
||||||
lato sinistro della finestra di Emacs. Si può far scorrere il testo con
|
un lato della finestra di Emacs. Si può far scorrere il testo con un
|
||||||
un click del mouse nella barra di scorrimento.
|
click del mouse nella barra di scorrimento.
|
||||||
|
|
||||||
>> Prova a premere il pulsante centrale del mouse sopra all'area
|
>> Prova a premere il pulsante centrale del mouse sopra all'area
|
||||||
evidenziata nella barra di scorrimento. Verrà visualizzata una parte
|
evidenziata nella barra di scorrimento. Verrà visualizzata una parte
|
||||||
|
|
|
@ -222,7 +222,7 @@ To bi moralo zaslon premakniti navzgor za osem vrstic.
|
||||||
premaknili nazaj, poskusite M-v z istim argumentom.
|
premaknili nazaj, poskusite M-v z istim argumentom.
|
||||||
|
|
||||||
Èe uporabljate grafièni vmesnik, denimo X11 ali MS Windows, imate
|
Èe uporabljate grafièni vmesnik, denimo X11 ali MS Windows, imate
|
||||||
verjetno ob levem robu Emacsovega okna navpično pravokotno ploskev,
|
verjetno ob robu Emacsovega okna navpično pravokotno ploskev,
|
||||||
imenovano drsnik. Pogled na besedilo lahko premikate tudi tako, da z
|
imenovano drsnik. Pogled na besedilo lahko premikate tudi tako, da z
|
||||||
mi¹ko kliknete na drsnik.
|
mi¹ko kliknete na drsnik.
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@ Detta borde ha flyttat sk
|
||||||
tillbaka igen är det bara att ge samma argument till M-v.
|
tillbaka igen är det bara att ge samma argument till M-v.
|
||||||
|
|
||||||
Om du använder Emacs under ett fönstersystem, som X11 eller
|
Om du använder Emacs under ett fönstersystem, som X11 eller
|
||||||
MS-Windows, finns det troligen ett rektangulärt område på vänster sida
|
MS-Windows, finns det troligen ett rektangulärt område på sidan
|
||||||
av Emacs-fönstret, en så kallad rullningslist. Genom att klicka i den
|
av Emacs-fönstret, en så kallad rullningslist. Genom att klicka i den
|
||||||
med musen kan du rulla texten.
|
med musen kan du rulla texten.
|
||||||
|
|
||||||
|
|
147
etc/emacs.py
147
etc/emacs.py
|
@ -1,7 +1,7 @@
|
||||||
"""Definitions used by commands sent to inferior Python in python.el."""
|
"""Definitions used by commands sent to inferior Python in python.el."""
|
||||||
|
|
||||||
# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
# Author: Dave Love <d.love@dl.ac.uk>
|
# Author: Dave Love <fx@gnu.org>
|
||||||
|
|
||||||
# This file is part of GNU Emacs.
|
# This file is part of GNU Emacs.
|
||||||
|
|
||||||
|
@ -20,17 +20,19 @@
|
||||||
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
# Boston, MA 02110-1301, USA.
|
# Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
import os, sys, traceback, inspect, rlcompleter, __main__
|
import os, sys, traceback, inspect, __main__
|
||||||
|
from sets import Set
|
||||||
|
|
||||||
__all__ = ["eexecfile", "args", "complete", "ehelp", "eimport"]
|
__all__ = ["eexecfile", "eargs", "complete", "ehelp", "eimport", "modpath"]
|
||||||
|
|
||||||
def eexecfile (file):
|
def eexecfile (file):
|
||||||
"""Execute FILE and then remove it.
|
"""Execute FILE and then remove it.
|
||||||
|
Execute the file within the __main__ namespace.
|
||||||
If we get an exception, print a traceback with the top frame
|
If we get an exception, print a traceback with the top frame
|
||||||
(oursleves) excluded."""
|
(ourselves) excluded."""
|
||||||
try:
|
try:
|
||||||
try: execfile (file, globals (), globals ())
|
try: execfile (file, __main__.__dict__)
|
||||||
except:
|
except:
|
||||||
(type, value, tb) = sys.exc_info ()
|
(type, value, tb) = sys.exc_info ()
|
||||||
# Lose the stack frame for this location.
|
# Lose the stack frame for this location.
|
||||||
tb = tb.tb_next
|
tb = tb.tb_next
|
||||||
|
@ -40,9 +42,10 @@ def eexecfile (file):
|
||||||
finally:
|
finally:
|
||||||
os.remove (file)
|
os.remove (file)
|
||||||
|
|
||||||
def eargs (name):
|
def eargs (name, imports):
|
||||||
"Get arglist of NAME for Eldoc &c."
|
"Get arglist of NAME for Eldoc &c."
|
||||||
try:
|
try:
|
||||||
|
if imports: exec imports
|
||||||
parts = name.split ('.')
|
parts = name.split ('.')
|
||||||
if len (parts) > 1:
|
if len (parts) > 1:
|
||||||
exec 'import ' + parts[0] # might fail
|
exec 'import ' + parts[0] # might fail
|
||||||
|
@ -56,8 +59,7 @@ def eargs (name):
|
||||||
return
|
return
|
||||||
if inspect.ismethod (func):
|
if inspect.ismethod (func):
|
||||||
func = func.im_func
|
func = func.im_func
|
||||||
if not inspect.isfunction (func):
|
if not inspect.isfunction (func): return
|
||||||
return
|
|
||||||
(args, varargs, varkw, defaults) = inspect.getargspec (func)
|
(args, varargs, varkw, defaults) = inspect.getargspec (func)
|
||||||
# No space between name and arglist for consistency with builtins.
|
# No space between name and arglist for consistency with builtins.
|
||||||
print '_emacs_out', \
|
print '_emacs_out', \
|
||||||
|
@ -65,41 +67,109 @@ def eargs (name):
|
||||||
defaults)
|
defaults)
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
def complete (text, namespace = None):
|
def all_names (object):
|
||||||
"""Complete TEXT in NAMESPACE and print a Lisp list of completions.
|
"""Return (an approximation to) a list of all possible attribute
|
||||||
NAMESPACE is currently not used."""
|
names reachable via the attributes of OBJECT, i.e. roughly the
|
||||||
if namespace is None: namespace = __main__.__dict__
|
leaves of the dictionary tree under it."""
|
||||||
c = rlcompleter.Completer (namespace)
|
|
||||||
try:
|
|
||||||
if '.' in text:
|
|
||||||
matches = c.attr_matches (text)
|
|
||||||
else:
|
|
||||||
matches = c.global_matches (text)
|
|
||||||
print '_emacs_out (',
|
|
||||||
for elt in matches:
|
|
||||||
print '"%s"' % elt,
|
|
||||||
print ')'
|
|
||||||
except:
|
|
||||||
print '_emacs_out ()'
|
|
||||||
|
|
||||||
def ehelp (name, g, l):
|
def do_object (object, names):
|
||||||
"""Get help on string NAME using globals G and locals L.
|
if inspect.ismodule (object):
|
||||||
|
do_module (object, names)
|
||||||
|
elif inspect.isclass (object):
|
||||||
|
do_class (object, names)
|
||||||
|
# Might have an object without its class in scope.
|
||||||
|
elif hasattr (object, '__class__'):
|
||||||
|
names.add ('__class__')
|
||||||
|
do_class (object.__class__, names)
|
||||||
|
# Probably not a good idea to try to enumerate arbitrary
|
||||||
|
# dictionaries...
|
||||||
|
return names
|
||||||
|
|
||||||
|
def do_module (module, names):
|
||||||
|
if hasattr (module, '__all__'): # limited export list
|
||||||
|
names.union_update (module.__all__)
|
||||||
|
for i in module.__all__:
|
||||||
|
do_object (getattr (module, i), names)
|
||||||
|
else: # use all names
|
||||||
|
names.union_update (dir (module))
|
||||||
|
for i in dir (module):
|
||||||
|
do_object (getattr (module, i), names)
|
||||||
|
return names
|
||||||
|
|
||||||
|
def do_class (object, names):
|
||||||
|
ns = dir (object)
|
||||||
|
names.union_update (ns)
|
||||||
|
if hasattr (object, '__bases__'): # superclasses
|
||||||
|
for i in object.__bases__: do_object (i, names)
|
||||||
|
return names
|
||||||
|
|
||||||
|
return do_object (object, Set ([]))
|
||||||
|
|
||||||
|
def complete (name, imports):
|
||||||
|
"""Complete TEXT in NAMESPACE and print a Lisp list of completions.
|
||||||
|
Exec IMPORTS first."""
|
||||||
|
import __main__, keyword
|
||||||
|
|
||||||
|
def class_members(object):
|
||||||
|
names = dir (object)
|
||||||
|
if hasattr (object, '__bases__'):
|
||||||
|
for super in object.__bases__:
|
||||||
|
names = class_members (super)
|
||||||
|
return names
|
||||||
|
|
||||||
|
names = Set ([])
|
||||||
|
base = None
|
||||||
|
try:
|
||||||
|
dict = __main__.__dict__.copy()
|
||||||
|
if imports: exec imports in dict
|
||||||
|
l = len (name)
|
||||||
|
if not "." in name:
|
||||||
|
for list in [dir (__builtins__), keyword.kwlist, dict.keys()]:
|
||||||
|
for elt in list:
|
||||||
|
if elt[:l] == name: names.add(elt)
|
||||||
|
else:
|
||||||
|
base = name[:name.rfind ('.')]
|
||||||
|
name = name[name.rfind('.')+1:]
|
||||||
|
try:
|
||||||
|
object = eval (base, dict)
|
||||||
|
names = Set (dir (object))
|
||||||
|
if hasattr (object, '__class__'):
|
||||||
|
names.add('__class__')
|
||||||
|
names.union_update (class_members (object))
|
||||||
|
except: names = all_names (dict)
|
||||||
|
except: return []
|
||||||
|
l = len(name)
|
||||||
|
print '_emacs_out (',
|
||||||
|
for n in names:
|
||||||
|
if name == n[:l]:
|
||||||
|
if base: print '"%s.%s"' % (base, n),
|
||||||
|
else: print '"%s"' % n,
|
||||||
|
print ')'
|
||||||
|
|
||||||
|
def ehelp (name, imports):
|
||||||
|
"""Get help on string NAME.
|
||||||
First try to eval name for, e.g. user definitions where we need
|
First try to eval name for, e.g. user definitions where we need
|
||||||
the object. Otherwise try the string form."""
|
the object. Otherwise try the string form."""
|
||||||
try: help (eval (name, g, l))
|
locls = {}
|
||||||
|
if imports:
|
||||||
|
try: exec imports in locls
|
||||||
|
except: pass
|
||||||
|
try: help (eval (name, globals(), locls))
|
||||||
except: help (name)
|
except: help (name)
|
||||||
|
|
||||||
def eimport (mod, dir):
|
def eimport (mod, dir):
|
||||||
"""Import module MOD with directory DIR at the head of the search path.
|
"""Import module MOD with directory DIR at the head of the search path.
|
||||||
NB doesn't load from DIR if MOD shadows a system module."""
|
NB doesn't load from DIR if MOD shadows a system module."""
|
||||||
|
from __main__ import __dict__
|
||||||
|
|
||||||
path0 = sys.path[0]
|
path0 = sys.path[0]
|
||||||
sys.path[0] = dir
|
sys.path[0] = dir
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
if globals().has_key(mod) and inspect.ismodule (eval (mod)):
|
if __dict__.has_key(mod) and inspect.ismodule (__dict__[mod]):
|
||||||
reload(eval (mod))
|
reload (__dict__[mod])
|
||||||
else:
|
else:
|
||||||
globals ()[mod] = __import__ (mod)
|
__dict__[mod] = __import__ (mod)
|
||||||
except:
|
except:
|
||||||
(type, value, tb) = sys.exc_info ()
|
(type, value, tb) = sys.exc_info ()
|
||||||
print "Traceback (most recent call last):"
|
print "Traceback (most recent call last):"
|
||||||
|
@ -107,6 +177,17 @@ def eimport (mod, dir):
|
||||||
finally:
|
finally:
|
||||||
sys.path[0] = path0
|
sys.path[0] = path0
|
||||||
|
|
||||||
print '_emacs_ok' # ready for input and can call continuation
|
def modpath (module):
|
||||||
|
"""Return the source file for the given MODULE (or None).
|
||||||
|
Assumes that MODULE.py and MODULE.pyc are in the same directory."""
|
||||||
|
try:
|
||||||
|
path = __import__ (module).__file__
|
||||||
|
if path[-4:] == '.pyc' and os.path.exists (path[0:-1]):
|
||||||
|
path = path[:-1]
|
||||||
|
print "_emacs_out", path
|
||||||
|
except:
|
||||||
|
print "_emacs_out ()"
|
||||||
|
|
||||||
|
# print '_emacs_ok' # ready for input and can call continuation
|
||||||
|
|
||||||
# arch-tag: d90408f3-90e2-4de4-99c2-6eb9c7b9ca46
|
# arch-tag: d90408f3-90e2-4de4-99c2-6eb9c7b9ca46
|
||||||
|
|
319
lisp/ChangeLog
319
lisp/ChangeLog
|
@ -1,3 +1,277 @@
|
||||||
|
2006-08-27 Michael Olson <mwolson@gnu.org>
|
||||||
|
|
||||||
|
* emacs-lisp/tq.el: Small grammar fix in comments.
|
||||||
|
(tq-enqueue): Check for existence of queue rather than the
|
||||||
|
head queue item's question, which was a no-op.
|
||||||
|
(tq-filter, tq-process-buffer): Make sure the process buffer
|
||||||
|
exists before making it the current buffer.
|
||||||
|
|
||||||
|
2006-08-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||||
|
|
||||||
|
* term/mac-win.el (mac-apple-event-map): Rename hicommand to hi-command.
|
||||||
|
(mac-dnd-drop-data): Apply 2006-08-22 change for x-dnd-drop-data.
|
||||||
|
(special-event-map): Apply 2006-08-16 change for x-win.el.
|
||||||
|
|
||||||
|
2006-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* progmodes/python.el (python-send-receive): Wait in the
|
||||||
|
process's buffer so as to check the right buffer-local variables.
|
||||||
|
|
||||||
|
2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* emacs-lisp/checkdoc.el: Remove * in defcustoms.
|
||||||
|
(defgroup checkdoc): Move to beginning.
|
||||||
|
|
||||||
|
* progmodes/python.el (python-preoutput-skip-next-prompt): New var.
|
||||||
|
(python-preoutput-continuation): Remove.
|
||||||
|
(python-preoutput-filter): Simplify correspondingly.
|
||||||
|
Remove handling of _emacs_ok. Make sure we skip _emacs_out's prompts.
|
||||||
|
Loop around to catch embedded _emacs_out output.
|
||||||
|
(run-python): Send the import&print command on a single line.
|
||||||
|
(python-send-command): Send command&print on a single line.
|
||||||
|
(python-send-string): Only add double \n if needed.
|
||||||
|
(python-send-receive): Loop until the result comes.
|
||||||
|
(python-mode-running): Defvar it.
|
||||||
|
(python-setup-brm): Remove unused var `menu'.
|
||||||
|
Only bind py-mode-map and `features' around brm-init.
|
||||||
|
(python-calculate-indentation): Remove unused var `point'.
|
||||||
|
(python-beginning-of-defun): Remove unused var `def-line'.
|
||||||
|
|
||||||
|
2006-08-25 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* kmacro.el (kmacro-repeat-on-last-key): Doc fix.
|
||||||
|
|
||||||
|
2006-08-25 Michael Kifer <kifer@cs.stonybrook.edu>
|
||||||
|
|
||||||
|
* viper.el (viper-set-hooks): Use frame bindings for
|
||||||
|
viper-vi-state-cursor-color.
|
||||||
|
(viper-non-hook-settings): Don't set default
|
||||||
|
mode-line-buffer-identification.
|
||||||
|
|
||||||
|
* viper-util.el (viper-set-cursor-color-according-to-state): New fun.
|
||||||
|
(viper-set-cursor-color-according-to-state)
|
||||||
|
(viper-get-saved-cursor-color-in-replace-mode)
|
||||||
|
(viper-get-saved-cursor-color-in-insert-mode): Make conditional on
|
||||||
|
viper-emacs-state-cursor-color.
|
||||||
|
|
||||||
|
* viper-cmd.el (viper-envelop-ESC-key): Bug fix.
|
||||||
|
(viper-undo): Use point if undo-beg-posn is nil.
|
||||||
|
(viper-insert-state-post-command-sentinel, viper-change-state-to-emacs)
|
||||||
|
(viper-after-change-undo-hook): Don't use
|
||||||
|
viper-emacs-state-cursor-color by default.
|
||||||
|
(viper-undo): More sensible positioning after undo.
|
||||||
|
|
||||||
|
* viper-ex.el (ex-splice-args-in-1-letr-cmd): Get rid of caddr.
|
||||||
|
(viper-emacs-state-cursor-color): Default to nil, since this feature
|
||||||
|
doesn't work well yet.
|
||||||
|
|
||||||
|
* ediff-mult.el (ediff-intersect-directories)
|
||||||
|
(ediff-get-directory-files-under-revision, ediff-dir-diff-copy-file):
|
||||||
|
always expand filenames.
|
||||||
|
|
||||||
|
2006-08-24 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* tumme.el: Remove * in defcustoms's docstrings.
|
||||||
|
|
||||||
|
2006-08-24 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
|
* emacs-lisp/timer.el (timer-set-idle-time, run-with-idle-timer):
|
||||||
|
Accept internal time format for SECS arg.
|
||||||
|
(timer-relative-time): Doc fix.
|
||||||
|
|
||||||
|
* jit-lock.el: "Stealth fontification by requeuing timers" patch,
|
||||||
|
adapted from Martin Rudalics.
|
||||||
|
(jit-lock-stealth-repeat-timer, jit-lock-stealth-buffers): New vars.
|
||||||
|
(jit-lock-mode): Create jit-lock-stealth-repeat-timer.
|
||||||
|
(jit-lock-stealth-fontify): Reschedule as a idle timer instead of
|
||||||
|
using sit-for.
|
||||||
|
|
||||||
|
2006-08-24 Francesc Rocher <francesc.rocher@gmail.com>
|
||||||
|
|
||||||
|
* cus-start.el (all): Add `overline-margin' and
|
||||||
|
`x-underline-at-descent-line'.
|
||||||
|
|
||||||
|
2006-08-24 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* progmodes/grep.el (grep-find-use-xargs): Use explicit value `exec'
|
||||||
|
to mean "use find -exec"; nil now unambiguously means auto-detect.
|
||||||
|
(grep-compute-defaults): Set grep-find-use-xargs to `exec' if not `gnu'.
|
||||||
|
Use shell-quote-argument to build grep-find-command and grep-find-template.
|
||||||
|
(rgrep): Use shell-quote-argument to properly quote arguments to find.
|
||||||
|
Reported by Tom Seddon.
|
||||||
|
|
||||||
|
2006-08-23 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
|
* startup.el (fancy-splash-head): Give instructions for dismissing
|
||||||
|
the splash screen for default startup too.
|
||||||
|
(display-startup-echo-area-message, fancy-splash-screens)
|
||||||
|
(use-fancy-splash-screens-p): New arg hide-on-input. If nil, show
|
||||||
|
all splash text at once and keep the splash buffer around.
|
||||||
|
(command-line-1): Give display-startup-echo-area-message a t arg.
|
||||||
|
|
||||||
|
2006-08-23 Carsten Dominik <dominik@science.uva.nl>
|
||||||
|
|
||||||
|
* textmodes/org.el (org-follow-gnus-link): Make sure the dedicated
|
||||||
|
gnus frame is selected.
|
||||||
|
|
||||||
|
2006-08-23 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
||||||
|
* progmodes/gdb-ui.el (gdb-starting): Reset gdb-signalled to nil.
|
||||||
|
|
||||||
|
2006-08-22 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* ido.el (ido-set-matches-1): Fix full matching for subdirs.
|
||||||
|
Add suffix matching for subdirs.
|
||||||
|
|
||||||
|
2006-08-22 Jorgen Schaefer <forcer@forcix.cx> (tiny change)
|
||||||
|
|
||||||
|
* x-dnd.el (x-dnd-drop-data): Don't call goto-char if
|
||||||
|
mouse-yank-at-point is non-nil.
|
||||||
|
|
||||||
|
2006-08-22 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
||||||
|
* progmodes/gdb-ui.el (gdb-frame-memory-buffer): Make frame
|
||||||
|
a bit wider and remove fringes to fit initial output on line.
|
||||||
|
|
||||||
|
2006-08-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* frame.el (blink-cursor-end): Only ignore the error we care about.
|
||||||
|
(blink-cursor-mode): Use blink-cursor-end to simplify the code.
|
||||||
|
|
||||||
|
2006-08-21 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* whitespace.el (whitespace-cleanup): Doc fix.
|
||||||
|
|
||||||
|
2006-08-20 Ryan Yeske <rcyeske@gmail.com>
|
||||||
|
|
||||||
|
* net/rcirc.el (rcirc-show-maximum-output): New var.
|
||||||
|
(rcirc-buffer-process): If no buffer argument is supplied, use
|
||||||
|
current-buffer.
|
||||||
|
(rcirc-complete-nick): Complete to the last completed nick first.
|
||||||
|
(rcirc-mode): Preserve the value of `rcirc-urls' across
|
||||||
|
connections. Setup scroll function.
|
||||||
|
(rcirc-scroll-to-bottom): New function.
|
||||||
|
(rcirc-print): Use nick syntax around regexp work.
|
||||||
|
Notice dim-nicks speaking only if they say our nick.
|
||||||
|
(rcirc-update-activity-string): Do not show the modeline indicator
|
||||||
|
if there are no live rcirc processes.
|
||||||
|
(rcirc-cmd-ignore): Ignore case.
|
||||||
|
(rcirc-browse-url-at-point): Fix off-by-one error.
|
||||||
|
|
||||||
|
2006-08-20 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* progmodes/python.el: Remove * in defcustom docstrings.
|
||||||
|
(run-python, python-proc, python-try-complete): Use derived-mode-p.
|
||||||
|
(python-mode): Set tab-width and indent-tabs-mode.
|
||||||
|
|
||||||
|
2006-08-20 Dave Love <fx@gnu.org>
|
||||||
|
|
||||||
|
* progmodes/python.el: Update to Dave Love's latest version.
|
||||||
|
(python-font-lock-keywords, python-mode): Don't use
|
||||||
|
font-lock-syntax-table, but match symbol elements explicitly instead.
|
||||||
|
(python-mode-map): Add help, and a few more key bindings.
|
||||||
|
(python-skip-comments/blanks): Move out of comments as well.
|
||||||
|
(python-continuation-line-p): Behave better with unbalanced parens.
|
||||||
|
(python-blank-line-p): New fun.
|
||||||
|
(python-open-block-statement-p): Don't use a heuristic.
|
||||||
|
(python-outdent-p): Better handle blocks-in-the-same-line.
|
||||||
|
(python-calculate-indentation): Misc improvements.
|
||||||
|
(python-comment-indent): Remove.
|
||||||
|
(python-block-pairs): New var.
|
||||||
|
(python-first-word): New fun.
|
||||||
|
(python-indentation-levels): Handle more common cases.
|
||||||
|
(python-indent-line-1): Add `leave' argument.
|
||||||
|
(python-indent-region): New fun.
|
||||||
|
(python-skip-out): New fun.
|
||||||
|
(python-beginning-of-statement, python-end-of-statement): Use it.
|
||||||
|
(python-next-statement): Return correct count even at eob.
|
||||||
|
(python-end-of-block): Fix paren-typo.
|
||||||
|
(python-imenu-create-index): Add module variables.
|
||||||
|
(run-python): Add `new' arg.
|
||||||
|
Check we're at a prompt before returning.
|
||||||
|
(python-send-command): Move to end of buffer.
|
||||||
|
Wait for prompt to return.
|
||||||
|
(python-set-proc): New fun.
|
||||||
|
(python-imports): New var.
|
||||||
|
(python-describe-symbol): Use it. Adjust to new interface of `ehelp'.
|
||||||
|
(python-eldoc-function): Try to move out of arg list.
|
||||||
|
(python-outline-level): Offset by 1.
|
||||||
|
(python-find-imports): New fun.
|
||||||
|
(python-symbol-completions): Use python-imports.
|
||||||
|
(python-module-path, ffap-alist): Add support for ffap.
|
||||||
|
(python-skeletons, python-mode-abbrev-table, def-python-skeleton)
|
||||||
|
(pythin-insert-*, python-default-template, python-expand-template):
|
||||||
|
Add templates/skeletons.
|
||||||
|
(python-setup-brm): Support for Bicycle Repair Man.
|
||||||
|
(python-abbrev-syntax-table): New var.
|
||||||
|
(python-abbrev-pc-hook, python-pea-hook): New funs.
|
||||||
|
|
||||||
|
2006-08-20 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
|
* frame.el (blink-cursor-start): Set timer first.
|
||||||
|
(blink-cursor-end): Ignore timer cancelling errors.
|
||||||
|
Suggested by Ken Manheimer.
|
||||||
|
|
||||||
|
2006-08-20 Juanma Barranquero <lekktu@gmail.com>
|
||||||
|
|
||||||
|
* newcomment.el (comment-box): Call `comment-normalize-vars'.
|
||||||
|
Add autoload cookie.
|
||||||
|
|
||||||
|
2006-08-20 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* simple.el (line-number-at-pos): Doc fix.
|
||||||
|
|
||||||
|
* emacs-lisp/timer.el (run-with-idle-timer): Pass t to
|
||||||
|
timer-activate-when-idle, so timer can run before Emacs becomes
|
||||||
|
non-idle again.
|
||||||
|
|
||||||
|
2006-08-18 Yoni Rabkin Katzenell <yoni-r@actcom.com> (tiny change)
|
||||||
|
|
||||||
|
* whitespace.el (whitespace-cleanup-internal): New optional arg
|
||||||
|
REGION-ONLY. If it's non-nil, modify the message to the user
|
||||||
|
accordingly.
|
||||||
|
(whitespace-cleanup-region): Call whitespace-cleanup-internal with
|
||||||
|
a non-nil argument.
|
||||||
|
|
||||||
|
2006-08-18 Gustav H,Ae(Bllberg <gustav@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
* rect.el (spaces-string): Simplify and add doc string.
|
||||||
|
|
||||||
|
2006-08-17 Romain Francoise <romain@orebokech.com>
|
||||||
|
|
||||||
|
* progmodes/gdb-ui.el (gdb-edit-locals-value): Balance parens.
|
||||||
|
|
||||||
|
2006-08-17 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* compare-w.el (compare-windows): lambda's take an arg and pass
|
||||||
|
it to compare-windows-skip-whitespace.
|
||||||
|
|
||||||
|
2006-08-17 Martin Rudalics <rudalics@gmx.at>
|
||||||
|
|
||||||
|
* jit-lock.el (jit-lock-fontify-now): Protect the modified status of
|
||||||
|
the right buffer.
|
||||||
|
|
||||||
|
2006-08-17 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* pcvs-parse.el (cvs-parse-table): Accept the new `...' format for
|
||||||
|
removed files.
|
||||||
|
|
||||||
|
2006-08-17 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
||||||
|
* progmodes/gdb-ui.el (gdb-locals-watch-map)
|
||||||
|
(gdb-locals-watch-map-1): Suppress keymap first.
|
||||||
|
(gdb-edit-locals-map-1): New variable.
|
||||||
|
(gdb-edit-locals-value): New function.
|
||||||
|
(gdb-stack-list-locals-handler): Use them.
|
||||||
|
|
||||||
|
2006-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* mouse.el (global-map): Allow yanking with mouse-2 at a spot whose
|
||||||
|
cursor would normally be drawn in the fringe.
|
||||||
|
|
||||||
|
* font-lock.el (font-lock-extend-region-wholelines): Fix up typo.
|
||||||
|
Reported by Martin Rudalics <rudalics@gmx.at>.
|
||||||
|
|
||||||
2006-08-16 Richard Stallman <rms@gnu.org>
|
2006-08-16 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
* term/x-win.el (x-clipboard-yank): Specify * in interactive spec.
|
* term/x-win.el (x-clipboard-yank): Specify * in interactive spec.
|
||||||
|
@ -18,23 +292,23 @@
|
||||||
Check each buffer for its skip-function.
|
Check each buffer for its skip-function.
|
||||||
Handle compare-windows-skip-whitespace special-case test
|
Handle compare-windows-skip-whitespace special-case test
|
||||||
by returning t from default skip function.
|
by returning t from default skip function.
|
||||||
|
|
||||||
2006-08-15 Carsten Dominik <dominik@science.uva.nl>
|
2006-08-15 Carsten Dominik <dominik@science.uva.nl>
|
||||||
|
|
||||||
* textmodes/org.el (org-clock-special-range,
|
* textmodes/org.el (org-clock-special-range)
|
||||||
org-clock-update-time-maybe): New functions.
|
(org-clock-update-time-maybe): New functions.
|
||||||
(org-stamp-time-of-day-regexp): Allow weekday to be of word chars,
|
(org-stamp-time-of-day-regexp): Allow weekday to be of word chars,
|
||||||
not only a-z.
|
not only a-z.
|
||||||
(org-agenda-get-blocks): Allow multiple blocks per headline.
|
(org-agenda-get-blocks): Allow multiple blocks per headline.
|
||||||
(org-timestamp-change): Call `org-clock-update-time-maybe'.
|
(org-timestamp-change): Call `org-clock-update-time-maybe'.
|
||||||
(org-export-html-title-format)
|
(org-export-html-title-format)
|
||||||
(org-export-html-toplevel-hlevel): New options.
|
(org-export-html-toplevel-hlevel): New options.
|
||||||
(org-export-language-setup): Added support for Czech.
|
(org-export-language-setup): Add support for Czech.
|
||||||
(org-mode, org-insert-todo-heading, org-find-visible)
|
(org-mode, org-insert-todo-heading, org-find-visible)
|
||||||
(org-find-invisible, org-invisible-p, org-invisible-p2)
|
(org-find-invisible, org-invisible-p, org-invisible-p2)
|
||||||
(org-back-to-heading, org-on-heading-p, org-up-heading-all)
|
(org-back-to-heading, org-on-heading-p, org-up-heading-all)
|
||||||
(org-show-subtree, org-show-entry, org-make-options-regexp):
|
(org-show-subtree, org-show-entry, org-make-options-regexp):
|
||||||
Removed compatibility support for old outline-mode.
|
Remove compatibility support for old outline-mode.
|
||||||
(org-check-occur-regexp): Funtion removed.
|
(org-check-occur-regexp): Funtion removed.
|
||||||
(org-on-heading-p, org-back-to-heading): Made defalias.
|
(org-on-heading-p, org-back-to-heading): Made defalias.
|
||||||
(org-set-local): New defsubst.
|
(org-set-local): New defsubst.
|
||||||
|
@ -44,7 +318,7 @@
|
||||||
(org-remember-apply-template, org-table-edit-field)
|
(org-remember-apply-template, org-table-edit-field)
|
||||||
(org-table-edit-formulas, orgtbl-mode, org-export-as-ascii)
|
(org-table-edit-formulas, orgtbl-mode, org-export-as-ascii)
|
||||||
(org-set-autofill-regexps): Use `org-set-local'.
|
(org-set-autofill-regexps): Use `org-set-local'.
|
||||||
(org-table-eval-formula): Fixed bug with parsing of display flags.
|
(org-table-eval-formula): Fix bug with parsing of display flags.
|
||||||
|
|
||||||
2006-08-15 Nick Roberts <nickrob@snap.net.nz>
|
2006-08-15 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
||||||
|
@ -53,8 +327,8 @@
|
||||||
<simon.marshall@misys.com>.
|
<simon.marshall@misys.com>.
|
||||||
(gdb-stack-position): New variable.
|
(gdb-stack-position): New variable.
|
||||||
(gdb-starting, gdb-exited): Reset gdb-stack-position to nil.
|
(gdb-starting, gdb-exited): Reset gdb-stack-position to nil.
|
||||||
(gdb-frames-mode): Set gdb-stack-position to nil. Add to
|
(gdb-frames-mode): Set gdb-stack-position to nil.
|
||||||
overlay-arrow-variable-list
|
Add to overlay-arrow-variable-list
|
||||||
(gdb-reset): Delete gdb-stack-position from above list.
|
(gdb-reset): Delete gdb-stack-position from above list.
|
||||||
|
|
||||||
2006-08-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
2006-08-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||||
|
@ -82,7 +356,7 @@
|
||||||
Add face to function names in case of no filename.
|
Add face to function names in case of no filename.
|
||||||
Add face to variable names of watchpoints.
|
Add face to variable names of watchpoints.
|
||||||
|
|
||||||
2006-08-12 Robert Thorpe <rthorpe@realworldtech.com> (tiny change)
|
2006-08-12 Robert Thorpe <rthorpe@realworldtech.com> (tiny change)
|
||||||
|
|
||||||
* cus-start.el <indent-tabs-mode>: Move to the `indent'
|
* cus-start.el <indent-tabs-mode>: Move to the `indent'
|
||||||
customization group.
|
customization group.
|
||||||
|
@ -95,8 +369,8 @@
|
||||||
Add customization vars controlling allout-beginning-of-line and
|
Add customization vars controlling allout-beginning-of-line and
|
||||||
allout-end-of-line conveniences.
|
allout-end-of-line conveniences.
|
||||||
(allout-header-prefix, allout-use-mode-specific-leader)
|
(allout-header-prefix, allout-use-mode-specific-leader)
|
||||||
(allout-use-mode-specific-leader, allout-mode-leaders): Revised
|
(allout-use-mode-specific-leader, allout-mode-leaders):
|
||||||
docstrings.
|
Revise docstrings.
|
||||||
(allout-infer-header-lead): Change to be an alias for
|
(allout-infer-header-lead): Change to be an alias for
|
||||||
allout-infer-header-lead-and-primary-bullet.
|
allout-infer-header-lead-and-primary-bullet.
|
||||||
(allout-infer-header-lead-and-primary-bullet): New version of
|
(allout-infer-header-lead-and-primary-bullet): New version of
|
||||||
|
@ -136,29 +410,26 @@
|
||||||
(allout-beginning-of-line): Respect `allout-beginning-of-line-cycles'.
|
(allout-beginning-of-line): Respect `allout-beginning-of-line-cycles'.
|
||||||
(allout-end-of-line): Respect `allout-end-of-line-cycles'.
|
(allout-end-of-line): Respect `allout-end-of-line-cycles'.
|
||||||
(allout-chart-subtree): Implement new mode, charting only the
|
(allout-chart-subtree): Implement new mode, charting only the
|
||||||
visible items in the subtree, when new 'visible' parameter is
|
visible items in the subtree, when new 'visible' parameter is non-nil.
|
||||||
non-nil.
|
(allout-end-of-subtree): Properly handle the last item in the buffer.
|
||||||
(allout-end-of-subtree): Properly handle the last item in the
|
(allout-pre-command-business, allout-command-counter):
|
||||||
buffer.
|
Increment an advertised counter so that cooperating enhancements can
|
||||||
(allout-pre-command-business, allout-command-counter): Increment
|
track revisions of items.
|
||||||
an advertised counter so that cooperating enhancements can track
|
|
||||||
revisions of items.
|
|
||||||
(allout-open-topic): Run allout-structure-added-hook with suitable
|
(allout-open-topic): Run allout-structure-added-hook with suitable
|
||||||
arguments.
|
arguments.
|
||||||
(allout-shift-in): Run allout-structure-shifted-hook with suitable
|
(allout-shift-in): Run allout-structure-shifted-hook with suitable
|
||||||
arguments.
|
arguments.
|
||||||
(allout-shift-out): Fix doubling for negative args and ensure call
|
(allout-shift-out): Fix doubling for negative args and ensure call
|
||||||
of allout-structure-shifted-hook by solely using allout-shift-in.
|
of allout-structure-shifted-hook by solely using allout-shift-in.
|
||||||
(allout-kill-line, allout-kill-topic): Run
|
(allout-kill-line, allout-kill-topic):
|
||||||
allout-structure-deleted-hook with suitable arguments.
|
Run allout-structure-deleted-hook with suitable arguments.
|
||||||
(allout-yank-processing): Run allout-structure-added-hook with
|
(allout-yank-processing): Run allout-structure-added-hook with
|
||||||
proper arguments.
|
proper arguments.
|
||||||
(allout-yank): Enclose activity in allout-unprotected.
|
(allout-yank): Enclose activity in allout-unprotected.
|
||||||
(allout-flag-region): Run allout-exposure-change-hook with
|
(allout-flag-region): Run allout-exposure-change-hook with
|
||||||
suitable arguments, instead of making the callee infer the
|
suitable arguments, instead of making the callee infer the arguments.
|
||||||
arguments.
|
(allout-encrypt-string):
|
||||||
(allout-encrypt-string): Support
|
Support allout-encryption-plaintext-sanitization-regexps,
|
||||||
allout-encryption-plaintext-sanitization-regexps,
|
|
||||||
allout-encryption-ciphertext-rejection-regexps, and
|
allout-encryption-ciphertext-rejection-regexps, and
|
||||||
allout-encryption-ciphertext-rejection-ceiling. Indicate correct
|
allout-encryption-ciphertext-rejection-ceiling. Indicate correct
|
||||||
en/de cryption mode in symmetric encryption failure message.
|
en/de cryption mode in symmetric encryption failure message.
|
||||||
|
|
|
@ -191,14 +191,16 @@ on third call it again advances points to the next difference and so on."
|
||||||
|
|
||||||
(setq skip-func-1 (if ignore-whitespace
|
(setq skip-func-1 (if ignore-whitespace
|
||||||
(if (stringp compare-windows-whitespace)
|
(if (stringp compare-windows-whitespace)
|
||||||
(lambda () (compare-windows-skip-whitespace)
|
(lambda (pos)
|
||||||
|
(compare-windows-skip-whitespace pos)
|
||||||
t)
|
t)
|
||||||
compare-windows-whitespace)))
|
compare-windows-whitespace)))
|
||||||
|
|
||||||
(with-current-buffer b2
|
(with-current-buffer b2
|
||||||
(setq skip-func-2 (if ignore-whitespace
|
(setq skip-func-2 (if ignore-whitespace
|
||||||
(if (stringp compare-windows-whitespace)
|
(if (stringp compare-windows-whitespace)
|
||||||
(lambda () (compare-windows-skip-whitespace)
|
(lambda (pos)
|
||||||
|
(compare-windows-skip-whitespace pos)
|
||||||
t)
|
t)
|
||||||
compare-windows-whitespace)))
|
compare-windows-whitespace)))
|
||||||
(push-mark p2 t)
|
(push-mark p2 t)
|
||||||
|
|
|
@ -363,6 +363,7 @@ since it could result in memory overflow and make Emacs crash."
|
||||||
(other :tag "Unlimited" t)))
|
(other :tag "Unlimited" t)))
|
||||||
(unibyte-display-via-language-environment mule boolean)
|
(unibyte-display-via-language-environment mule boolean)
|
||||||
(blink-cursor-alist cursor alist "22.1")
|
(blink-cursor-alist cursor alist "22.1")
|
||||||
|
(overline-margin display integer "22.1")
|
||||||
;; xfaces.c
|
;; xfaces.c
|
||||||
(scalable-fonts-allowed display boolean)
|
(scalable-fonts-allowed display boolean)
|
||||||
;; xfns.c
|
;; xfns.c
|
||||||
|
@ -374,6 +375,7 @@ since it could result in memory overflow and make Emacs crash."
|
||||||
;; xterm.c
|
;; xterm.c
|
||||||
(mouse-autoselect-window display boolean "21.3")
|
(mouse-autoselect-window display boolean "21.3")
|
||||||
(x-use-underline-position-properties display boolean "21.3")
|
(x-use-underline-position-properties display boolean "21.3")
|
||||||
|
(x-underline-at-descent-line display boolean "22.1")
|
||||||
(x-stretch-cursor display boolean "21.1")))
|
(x-stretch-cursor display boolean "21.1")))
|
||||||
this symbol group type standard version native-p
|
this symbol group type standard version native-p
|
||||||
;; This function turns a value
|
;; This function turns a value
|
||||||
|
|
|
@ -648,8 +648,8 @@ behavior."
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (elt)
|
(lambda (elt)
|
||||||
(ediff-make-new-meta-list-element
|
(ediff-make-new-meta-list-element
|
||||||
(concat auxdir1 elt)
|
(expand-file-name (concat auxdir1 elt))
|
||||||
(concat auxdir2 elt)
|
(expand-file-name (concat auxdir2 elt))
|
||||||
(if lis3
|
(if lis3
|
||||||
(progn
|
(progn
|
||||||
;; The following is done because: In merging with
|
;; The following is done because: In merging with
|
||||||
|
@ -660,7 +660,7 @@ behavior."
|
||||||
;; the second case, we insert nil.
|
;; the second case, we insert nil.
|
||||||
(setq elt (ediff-add-slash-if-directory auxdir3 elt))
|
(setq elt (ediff-add-slash-if-directory auxdir3 elt))
|
||||||
(if (file-exists-p (concat auxdir3 elt))
|
(if (file-exists-p (concat auxdir3 elt))
|
||||||
(concat auxdir3 elt))))))
|
(expand-file-name (concat auxdir3 elt)))))))
|
||||||
common)))
|
common)))
|
||||||
;; return result
|
;; return result
|
||||||
(cons common-part difflist)
|
(cons common-part difflist)
|
||||||
|
@ -716,7 +716,7 @@ behavior."
|
||||||
auxdir1 nil nil
|
auxdir1 nil nil
|
||||||
merge-autostore-dir nil)
|
merge-autostore-dir nil)
|
||||||
(mapcar (lambda (elt) (ediff-make-new-meta-list-element
|
(mapcar (lambda (elt) (ediff-make-new-meta-list-element
|
||||||
(concat auxdir1 elt) nil nil))
|
(expand-file-name (concat auxdir1 elt)) nil nil))
|
||||||
common))
|
common))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -1338,7 +1338,10 @@ Useful commands:
|
||||||
;; update ediff-meta-list by direct modification
|
;; update ediff-meta-list by direct modification
|
||||||
(nconc meta-list
|
(nconc meta-list
|
||||||
(list (ediff-make-new-meta-list-element
|
(list (ediff-make-new-meta-list-element
|
||||||
otherfile1 otherfile2 otherfile3)))
|
(expand-file-name otherfile1)
|
||||||
|
(expand-file-name otherfile2)
|
||||||
|
(if otherfile3
|
||||||
|
(expand-file-name otherfile3)))))
|
||||||
)
|
)
|
||||||
(ediff-update-meta-buffer meta-buf 'must-redraw)
|
(ediff-update-meta-buffer meta-buf 'must-redraw)
|
||||||
))
|
))
|
||||||
|
|
|
@ -193,8 +193,14 @@
|
||||||
(defvar compilation-error-regexp-alist)
|
(defvar compilation-error-regexp-alist)
|
||||||
(defvar compilation-mode-font-lock-keywords)
|
(defvar compilation-mode-font-lock-keywords)
|
||||||
|
|
||||||
|
(defgroup checkdoc nil
|
||||||
|
"Support for doc string checking in Emacs Lisp."
|
||||||
|
:prefix "checkdoc"
|
||||||
|
:group 'lisp
|
||||||
|
:version "20.3")
|
||||||
|
|
||||||
(defcustom checkdoc-autofix-flag 'semiautomatic
|
(defcustom checkdoc-autofix-flag 'semiautomatic
|
||||||
"*Non-nil means attempt auto-fixing of doc strings.
|
"Non-nil means attempt auto-fixing of doc strings.
|
||||||
If this value is the symbol `query', then the user is queried before
|
If this value is the symbol `query', then the user is queried before
|
||||||
any change is made. If the value is `automatic', then all changes are
|
any change is made. If the value is `automatic', then all changes are
|
||||||
made without asking unless the change is very-complex. If the value
|
made without asking unless the change is very-complex. If the value
|
||||||
|
@ -208,37 +214,39 @@ The value `never' is the same as nil, never ask or change anything."
|
||||||
(other :tag "semiautomatic" semiautomatic)))
|
(other :tag "semiautomatic" semiautomatic)))
|
||||||
|
|
||||||
(defcustom checkdoc-bouncy-flag t
|
(defcustom checkdoc-bouncy-flag t
|
||||||
"*Non-nil means to \"bounce\" to auto-fix locations.
|
"Non-nil means to \"bounce\" to auto-fix locations.
|
||||||
Setting this to nil will silently make fixes that require no user
|
Setting this to nil will silently make fixes that require no user
|
||||||
interaction. See `checkdoc-autofix-flag' for auto-fixing details."
|
interaction. See `checkdoc-autofix-flag' for auto-fixing details."
|
||||||
:group 'checkdoc
|
:group 'checkdoc
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defcustom checkdoc-force-docstrings-flag t
|
(defcustom checkdoc-force-docstrings-flag t
|
||||||
"*Non-nil means that all checkable definitions should have documentation.
|
"Non-nil means that all checkable definitions should have documentation.
|
||||||
Style guide dictates that interactive functions MUST have documentation,
|
Style guide dictates that interactive functions MUST have documentation,
|
||||||
and that it's good but not required practice to make non user visible items
|
and that it's good but not required practice to make non user visible items
|
||||||
have doc strings."
|
have doc strings."
|
||||||
:group 'checkdoc
|
:group 'checkdoc
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp)
|
||||||
|
|
||||||
(defcustom checkdoc-force-history-flag t
|
(defcustom checkdoc-force-history-flag t
|
||||||
"*Non-nil means that files should have a History section or ChangeLog file.
|
"Non-nil means that files should have a History section or ChangeLog file.
|
||||||
This helps document the evolution of, and recent changes to, the package."
|
This helps document the evolution of, and recent changes to, the package."
|
||||||
:group 'checkdoc
|
:group 'checkdoc
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defcustom checkdoc-permit-comma-termination-flag nil
|
(defcustom checkdoc-permit-comma-termination-flag nil
|
||||||
"*Non-nil means the first line of a docstring may end with a comma.
|
"Non-nil means the first line of a docstring may end with a comma.
|
||||||
Ordinarily, a full sentence is required. This may be misleading when
|
Ordinarily, a full sentence is required. This may be misleading when
|
||||||
there is a substantial caveat to the one-line description -- the comma
|
there is a substantial caveat to the one-line description -- the comma
|
||||||
should be used when the first part could stand alone as a sentence, but
|
should be used when the first part could stand alone as a sentence, but
|
||||||
it indicates that a modifying clause follows."
|
it indicates that a modifying clause follows."
|
||||||
:group 'checkdoc
|
:group 'checkdoc
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp)
|
||||||
|
|
||||||
(defcustom checkdoc-spellcheck-documentation-flag nil
|
(defcustom checkdoc-spellcheck-documentation-flag nil
|
||||||
"*Non-nil means run Ispell on text based on value.
|
"Non-nil means run Ispell on text based on value.
|
||||||
This is automatically set to nil if Ispell does not exist on your
|
This is automatically set to nil if Ispell does not exist on your
|
||||||
system. Possible values are:
|
system. Possible values are:
|
||||||
|
|
||||||
|
@ -259,14 +267,14 @@ system. Possible values are:
|
||||||
"List of words that are correct when spell-checking Lisp documentation.")
|
"List of words that are correct when spell-checking Lisp documentation.")
|
||||||
|
|
||||||
(defcustom checkdoc-max-keyref-before-warn 10
|
(defcustom checkdoc-max-keyref-before-warn 10
|
||||||
"*The number of \\ [command-to-keystroke] tokens allowed in a doc string.
|
"The number of \\ [command-to-keystroke] tokens allowed in a doc string.
|
||||||
Any more than this and a warning is generated suggesting that the construct
|
Any more than this and a warning is generated suggesting that the construct
|
||||||
\\ {keymap} be used instead."
|
\\ {keymap} be used instead."
|
||||||
:group 'checkdoc
|
:group 'checkdoc
|
||||||
:type 'integer)
|
:type 'integer)
|
||||||
|
|
||||||
(defcustom checkdoc-arguments-in-order-flag t
|
(defcustom checkdoc-arguments-in-order-flag t
|
||||||
"*Non-nil means warn if arguments appear out of order.
|
"Non-nil means warn if arguments appear out of order.
|
||||||
Setting this to nil will mean only checking that all the arguments
|
Setting this to nil will mean only checking that all the arguments
|
||||||
appear in the proper form in the documentation, not that they are in
|
appear in the proper form in the documentation, not that they are in
|
||||||
the same order as they appear in the argument list. No mention is
|
the same order as they appear in the argument list. No mention is
|
||||||
|
@ -298,7 +306,7 @@ problem discovered. This is useful for adding additional checks.")
|
||||||
A search leaves the cursor in front of the parameter list.")
|
A search leaves the cursor in front of the parameter list.")
|
||||||
|
|
||||||
(defcustom checkdoc-verb-check-experimental-flag t
|
(defcustom checkdoc-verb-check-experimental-flag t
|
||||||
"*Non-nil means to attempt to check the voice of the doc string.
|
"Non-nil means to attempt to check the voice of the doc string.
|
||||||
This check keys off some words which are commonly misused. See the
|
This check keys off some words which are commonly misused. See the
|
||||||
variable `checkdoc-common-verbs-wrong-voice' if you wish to add your own."
|
variable `checkdoc-common-verbs-wrong-voice' if you wish to add your own."
|
||||||
:group 'checkdoc
|
:group 'checkdoc
|
||||||
|
@ -2633,12 +2641,6 @@ function called to create the messages."
|
||||||
(setq checkdoc-pending-errors nil)
|
(setq checkdoc-pending-errors nil)
|
||||||
nil)))
|
nil)))
|
||||||
|
|
||||||
(defgroup checkdoc nil
|
|
||||||
"Support for doc string checking in Emacs Lisp."
|
|
||||||
:prefix "checkdoc"
|
|
||||||
:group 'lisp
|
|
||||||
:version "20.3")
|
|
||||||
|
|
||||||
(custom-add-option 'emacs-lisp-mode-hook
|
(custom-add-option 'emacs-lisp-mode-hook
|
||||||
(lambda () (checkdoc-minor-mode 1)))
|
(lambda () (checkdoc-minor-mode 1)))
|
||||||
|
|
||||||
|
@ -2650,5 +2652,5 @@ function called to create the messages."
|
||||||
|
|
||||||
(provide 'checkdoc)
|
(provide 'checkdoc)
|
||||||
|
|
||||||
;;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26
|
;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26
|
||||||
;;; checkdoc.el ends here
|
;;; checkdoc.el ends here
|
||||||
|
|
|
@ -60,14 +60,22 @@ fire repeatedly that many seconds apart."
|
||||||
|
|
||||||
(defun timer-set-idle-time (timer secs &optional repeat)
|
(defun timer-set-idle-time (timer secs &optional repeat)
|
||||||
"Set the trigger idle time of TIMER to SECS.
|
"Set the trigger idle time of TIMER to SECS.
|
||||||
|
SECS may be an integer, floating point number, or the internal
|
||||||
|
time format (HIGH LOW USECS) returned by, e.g., `current-idle-time'.
|
||||||
If optional third argument REPEAT is non-nil, make the timer
|
If optional third argument REPEAT is non-nil, make the timer
|
||||||
fire each time Emacs is idle for that many seconds."
|
fire each time Emacs is idle for that many seconds."
|
||||||
(or (timerp timer)
|
(or (timerp timer)
|
||||||
(error "Invalid timer"))
|
(error "Invalid timer"))
|
||||||
(aset timer 1 0)
|
(if (consp secs)
|
||||||
(aset timer 2 0)
|
(progn (aset timer 1 (car secs))
|
||||||
(aset timer 3 0)
|
(aset timer 2 (if (consp (cdr secs)) (car (cdr secs)) (cdr secs)))
|
||||||
(timer-inc-time timer secs)
|
(aset timer 3 (or (and (consp (cdr secs)) (consp (cdr (cdr secs)))
|
||||||
|
(nth 2 secs))
|
||||||
|
0)))
|
||||||
|
(aset timer 1 0)
|
||||||
|
(aset timer 2 0)
|
||||||
|
(aset timer 3 0)
|
||||||
|
(timer-inc-time timer secs))
|
||||||
(aset timer 4 repeat)
|
(aset timer 4 repeat)
|
||||||
timer)
|
timer)
|
||||||
|
|
||||||
|
@ -104,7 +112,7 @@ of SECS seconds since the epoch. SECS may be a fraction."
|
||||||
|
|
||||||
(defun timer-relative-time (time secs &optional usecs)
|
(defun timer-relative-time (time secs &optional usecs)
|
||||||
"Advance TIME by SECS seconds and optionally USECS microseconds.
|
"Advance TIME by SECS seconds and optionally USECS microseconds.
|
||||||
SECS may be a fraction."
|
SECS may be either an integer or a floating point number."
|
||||||
(let ((high (car time))
|
(let ((high (car time))
|
||||||
(low (if (consp (cdr time)) (nth 1 time) (cdr time)))
|
(low (if (consp (cdr time)) (nth 1 time) (cdr time)))
|
||||||
(micro (if (numberp (car-safe (cdr-safe (cdr time))))
|
(micro (if (numberp (car-safe (cdr-safe (cdr time))))
|
||||||
|
@ -412,7 +420,10 @@ This function is for compatibility; see also `run-with-timer'."
|
||||||
(defun run-with-idle-timer (secs repeat function &rest args)
|
(defun run-with-idle-timer (secs repeat function &rest args)
|
||||||
"Perform an action the next time Emacs is idle for SECS seconds.
|
"Perform an action the next time Emacs is idle for SECS seconds.
|
||||||
The action is to call FUNCTION with arguments ARGS.
|
The action is to call FUNCTION with arguments ARGS.
|
||||||
SECS may be an integer or a floating point number.
|
SECS may be an integer, a floating point number, or the internal
|
||||||
|
time format (HIGH LOW USECS) returned by, e.g., `current-idle-time'.
|
||||||
|
If Emacs is currently idle, and has been idle for N seconds (N < SECS),
|
||||||
|
then it will call FUNCTION in SECS - N seconds from now.
|
||||||
|
|
||||||
If REPEAT is non-nil, do the action each time Emacs has been idle for
|
If REPEAT is non-nil, do the action each time Emacs has been idle for
|
||||||
exactly SECS seconds (that is, only once for each time Emacs becomes idle).
|
exactly SECS seconds (that is, only once for each time Emacs becomes idle).
|
||||||
|
@ -425,7 +436,7 @@ This function returns a timer object which you can use in `cancel-timer'."
|
||||||
(let ((timer (timer-create)))
|
(let ((timer (timer-create)))
|
||||||
(timer-set-function timer function args)
|
(timer-set-function timer function args)
|
||||||
(timer-set-idle-time timer secs repeat)
|
(timer-set-idle-time timer secs repeat)
|
||||||
(timer-activate-when-idle timer)
|
(timer-activate-when-idle timer t)
|
||||||
timer))
|
timer))
|
||||||
|
|
||||||
(defun with-timeout-handler (tag)
|
(defun with-timeout-handler (tag)
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
;; regexp: regular expression that matches the end of a response from
|
;; regexp: regular expression that matches the end of a response from
|
||||||
;; the process
|
;; the process
|
||||||
(defun tq-queue-head-regexp (tq) (car (cdr (car (tq-queue tq)))))
|
(defun tq-queue-head-regexp (tq) (car (cdr (car (tq-queue tq)))))
|
||||||
;; closure: additional data to pass to function
|
;; closure: additional data to pass to the function
|
||||||
(defun tq-queue-head-closure (tq) (car (cdr (cdr (car (tq-queue tq))))))
|
(defun tq-queue-head-closure (tq) (car (cdr (cdr (car (tq-queue tq))))))
|
||||||
;; fn: function to call upon receiving a complete response from the
|
;; fn: function to call upon receiving a complete response from the
|
||||||
;; process
|
;; process
|
||||||
|
@ -119,7 +119,7 @@ If DELAY-QUESTION is non-nil, delay sending this question until
|
||||||
the process has finished replying to any previous questions.
|
the process has finished replying to any previous questions.
|
||||||
This produces more reliable results with some processes."
|
This produces more reliable results with some processes."
|
||||||
(let ((sendp (or (not delay-question)
|
(let ((sendp (or (not delay-question)
|
||||||
(not (tq-queue-head-question tq)))))
|
(not (tq-queue tq)))))
|
||||||
(tq-queue-add tq (unless sendp question) regexp closure fn)
|
(tq-queue-add tq (unless sendp question) regexp closure fn)
|
||||||
(when sendp
|
(when sendp
|
||||||
(process-send-string (tq-process tq) question))))
|
(process-send-string (tq-process tq) question))))
|
||||||
|
@ -131,35 +131,39 @@ This produces more reliable results with some processes."
|
||||||
|
|
||||||
(defun tq-filter (tq string)
|
(defun tq-filter (tq string)
|
||||||
"Append STRING to the TQ's buffer; then process the new data."
|
"Append STRING to the TQ's buffer; then process the new data."
|
||||||
(with-current-buffer (tq-buffer tq)
|
(let ((buffer (tq-buffer tq)))
|
||||||
(goto-char (point-max))
|
(when (buffer-live-p buffer)
|
||||||
(insert string)
|
(with-current-buffer buffer
|
||||||
(tq-process-buffer tq)))
|
(goto-char (point-max))
|
||||||
|
(insert string)
|
||||||
|
(tq-process-buffer tq)))))
|
||||||
|
|
||||||
(defun tq-process-buffer (tq)
|
(defun tq-process-buffer (tq)
|
||||||
"Check TQ's buffer for the regexp at the head of the queue."
|
"Check TQ's buffer for the regexp at the head of the queue."
|
||||||
(set-buffer (tq-buffer tq))
|
(let ((buffer (tq-buffer tq)))
|
||||||
(if (= 0 (buffer-size)) ()
|
(when (buffer-live-p buffer)
|
||||||
(if (tq-queue-empty tq)
|
(set-buffer buffer)
|
||||||
(let ((buf (generate-new-buffer "*spurious*")))
|
(if (= 0 (buffer-size)) ()
|
||||||
(copy-to-buffer buf (point-min) (point-max))
|
(if (tq-queue-empty tq)
|
||||||
(delete-region (point-min) (point))
|
(let ((buf (generate-new-buffer "*spurious*")))
|
||||||
(pop-to-buffer buf nil)
|
(copy-to-buffer buf (point-min) (point-max))
|
||||||
(error "Spurious communication from process %s, see buffer %s"
|
(delete-region (point-min) (point))
|
||||||
(process-name (tq-process tq))
|
(pop-to-buffer buf nil)
|
||||||
(buffer-name buf)))
|
(error "Spurious communication from process %s, see buffer %s"
|
||||||
(goto-char (point-min))
|
(process-name (tq-process tq))
|
||||||
(if (re-search-forward (tq-queue-head-regexp tq) nil t)
|
(buffer-name buf)))
|
||||||
(let ((answer (buffer-substring (point-min) (point))))
|
(goto-char (point-min))
|
||||||
(delete-region (point-min) (point))
|
(if (re-search-forward (tq-queue-head-regexp tq) nil t)
|
||||||
(unwind-protect
|
(let ((answer (buffer-substring (point-min) (point))))
|
||||||
(condition-case nil
|
(delete-region (point-min) (point))
|
||||||
(funcall (tq-queue-head-fn tq)
|
(unwind-protect
|
||||||
(tq-queue-head-closure tq)
|
(condition-case nil
|
||||||
answer)
|
(funcall (tq-queue-head-fn tq)
|
||||||
(error nil))
|
(tq-queue-head-closure tq)
|
||||||
(tq-queue-pop tq))
|
answer)
|
||||||
(tq-process-buffer tq))))))
|
(error nil))
|
||||||
|
(tq-queue-pop tq))
|
||||||
|
(tq-process-buffer tq))))))))
|
||||||
|
|
||||||
(provide 'tq)
|
(provide 'tq)
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
(defvar mark-even-if-inactive)
|
(defvar mark-even-if-inactive)
|
||||||
(defvar init-message)
|
(defvar init-message)
|
||||||
(defvar initial)
|
(defvar initial)
|
||||||
|
(defvar undo-beg-posn)
|
||||||
|
(defvar undo-end-posn)
|
||||||
|
|
||||||
;; loading happens only in non-interactive compilation
|
;; loading happens only in non-interactive compilation
|
||||||
;; in order to spare non-viperized emacs from being viperized
|
;; in order to spare non-viperized emacs from being viperized
|
||||||
|
@ -196,7 +198,7 @@
|
||||||
(viper-save-cursor-color 'before-insert-mode))
|
(viper-save-cursor-color 'before-insert-mode))
|
||||||
;; set insert mode cursor color
|
;; set insert mode cursor color
|
||||||
(viper-change-cursor-color viper-insert-state-cursor-color)))
|
(viper-change-cursor-color viper-insert-state-cursor-color)))
|
||||||
(if (eq viper-current-state 'emacs-state)
|
(if (and viper-emacs-state-cursor-color (eq viper-current-state 'emacs-state))
|
||||||
(let ((has-saved-cursor-color-in-emacs-mode
|
(let ((has-saved-cursor-color-in-emacs-mode
|
||||||
(stringp (viper-get-saved-cursor-color-in-emacs-mode))))
|
(stringp (viper-get-saved-cursor-color-in-emacs-mode))))
|
||||||
(or has-saved-cursor-color-in-emacs-mode
|
(or has-saved-cursor-color-in-emacs-mode
|
||||||
|
@ -722,12 +724,13 @@
|
||||||
(viper-set-replace-overlay (point-min) (point-min)))
|
(viper-set-replace-overlay (point-min) (point-min)))
|
||||||
(viper-hide-replace-overlay)
|
(viper-hide-replace-overlay)
|
||||||
|
|
||||||
(let ((has-saved-cursor-color-in-emacs-mode
|
(if viper-emacs-state-cursor-color
|
||||||
(stringp (viper-get-saved-cursor-color-in-emacs-mode))))
|
(let ((has-saved-cursor-color-in-emacs-mode
|
||||||
(or has-saved-cursor-color-in-emacs-mode
|
(stringp (viper-get-saved-cursor-color-in-emacs-mode))))
|
||||||
(string= (viper-get-cursor-color) viper-emacs-state-cursor-color)
|
(or has-saved-cursor-color-in-emacs-mode
|
||||||
(viper-save-cursor-color 'before-emacs-mode))
|
(string= (viper-get-cursor-color) viper-emacs-state-cursor-color)
|
||||||
(viper-change-cursor-color viper-emacs-state-cursor-color))
|
(viper-save-cursor-color 'before-emacs-mode))
|
||||||
|
(viper-change-cursor-color viper-emacs-state-cursor-color)))
|
||||||
|
|
||||||
(viper-change-state 'emacs-state)
|
(viper-change-state 'emacs-state)
|
||||||
|
|
||||||
|
@ -1030,10 +1033,13 @@ as a Meta key and any number of multiple escapes is allowed."
|
||||||
(inhibit-quit t))
|
(inhibit-quit t))
|
||||||
(if (viper-ESC-event-p event)
|
(if (viper-ESC-event-p event)
|
||||||
(progn
|
(progn
|
||||||
;; Emacs 22.50.8 introduced a bug, which makes even a single ESC into
|
;; Some versions of Emacs (eg., 22.50.8 have a bug, which makes even
|
||||||
;; a fast keyseq. To guard against this, we added a check if there
|
;; a single ESC into ;; a fast keyseq. To guard against this, we
|
||||||
;; are other events as well
|
;; added a check if there are other events as well. Keep the next
|
||||||
(if (and (viper-fast-keysequence-p) unread-command-events)
|
;; line for the next time the bug reappears, so that will remember to
|
||||||
|
;; report it.
|
||||||
|
;;(if (and (viper-fast-keysequence-p) unread-command-events)
|
||||||
|
(if (viper-fast-keysequence-p) ;; for Emacsen without the above bug
|
||||||
(progn
|
(progn
|
||||||
(let (minor-mode-map-alist emulation-mode-map-alists)
|
(let (minor-mode-map-alist emulation-mode-map-alists)
|
||||||
(viper-set-unread-command-events event)
|
(viper-set-unread-command-events event)
|
||||||
|
@ -1744,12 +1750,14 @@ invokes the command before that, etc."
|
||||||
|
|
||||||
;; Hook used in viper-undo
|
;; Hook used in viper-undo
|
||||||
(defun viper-after-change-undo-hook (beg end len)
|
(defun viper-after-change-undo-hook (beg end len)
|
||||||
(setq undo-beg-posn beg
|
(if undo-in-progress
|
||||||
undo-end-posn (or end beg))
|
(setq undo-beg-posn beg
|
||||||
;; some other hooks may be changing various text properties in
|
undo-end-posn (or end beg))
|
||||||
;; the buffer in response to 'undo'; so remove this hook to avoid
|
;; some other hooks may be changing various text properties in
|
||||||
;; its repeated invocation
|
;; the buffer in response to 'undo'; so remove this hook to avoid
|
||||||
(remove-hook 'viper-undo-functions 'viper-after-change-undo-hook 'local))
|
;; its repeated invocation
|
||||||
|
(remove-hook 'viper-undo-functions 'viper-after-change-undo-hook 'local)
|
||||||
|
))
|
||||||
|
|
||||||
(defun viper-undo ()
|
(defun viper-undo ()
|
||||||
"Undo previous change."
|
"Undo previous change."
|
||||||
|
@ -1764,25 +1772,29 @@ invokes the command before that, etc."
|
||||||
|
|
||||||
(undo-start)
|
(undo-start)
|
||||||
(undo-more 2)
|
(undo-more 2)
|
||||||
(setq undo-beg-posn (or undo-beg-posn before-undo-pt)
|
;;(setq undo-beg-posn (or undo-beg-posn (point))
|
||||||
undo-end-posn (or undo-end-posn undo-beg-posn))
|
;; undo-end-posn (or undo-end-posn (point)))
|
||||||
|
;;(setq undo-beg-posn (or undo-beg-posn before-undo-pt)
|
||||||
|
;; undo-end-posn (or undo-end-posn undo-beg-posn))
|
||||||
|
|
||||||
(goto-char undo-beg-posn)
|
(if (and undo-beg-posn undo-end-posn)
|
||||||
(sit-for 0)
|
|
||||||
(if (and viper-keep-point-on-undo
|
|
||||||
(pos-visible-in-window-p before-undo-pt))
|
|
||||||
(progn
|
(progn
|
||||||
(push-mark (point-marker) t)
|
(goto-char undo-beg-posn)
|
||||||
(viper-sit-for-short 300)
|
(sit-for 0)
|
||||||
(goto-char undo-end-posn)
|
(if (and viper-keep-point-on-undo
|
||||||
(viper-sit-for-short 300)
|
(pos-visible-in-window-p before-undo-pt))
|
||||||
(if (and (> (viper-chars-in-region undo-beg-posn before-undo-pt) 1)
|
(progn
|
||||||
(> (viper-chars-in-region undo-end-posn before-undo-pt) 1))
|
(push-mark (point-marker) t)
|
||||||
(goto-char before-undo-pt)
|
(viper-sit-for-short 300)
|
||||||
(goto-char undo-beg-posn)))
|
(goto-char undo-end-posn)
|
||||||
(push-mark before-undo-pt t))
|
(viper-sit-for-short 300)
|
||||||
|
(if (pos-visible-in-window-p undo-beg-posn)
|
||||||
|
(goto-char before-undo-pt)
|
||||||
|
(goto-char undo-beg-posn)))
|
||||||
|
(push-mark before-undo-pt t))
|
||||||
|
))
|
||||||
|
|
||||||
(if (and (eolp) (not (bolp))) (backward-char 1))
|
(if (and (eolp) (not (bolp))) (backward-char 1))
|
||||||
;;(if (not modified) (set-buffer-modified-p t))
|
|
||||||
)
|
)
|
||||||
(setq this-command 'viper-undo))
|
(setq this-command 'viper-undo))
|
||||||
|
|
||||||
|
@ -3952,7 +3964,8 @@ Null string will repeat previous search."
|
||||||
(let ((val (viper-p-val arg))
|
(let ((val (viper-p-val arg))
|
||||||
(com (viper-getcom arg))
|
(com (viper-getcom arg))
|
||||||
debug-on-error)
|
debug-on-error)
|
||||||
(if (null viper-s-string) (error viper-NoPrevSearch))
|
(if (or (null viper-s-string) (string= viper-s-string ""))
|
||||||
|
(error viper-NoPrevSearch))
|
||||||
(viper-search viper-s-string viper-s-forward arg)
|
(viper-search viper-s-string viper-s-forward arg)
|
||||||
(if com
|
(if com
|
||||||
(progn
|
(progn
|
||||||
|
|
|
@ -208,12 +208,12 @@
|
||||||
|
|
||||||
;; If this is a one-letter magic command, splice in args.
|
;; If this is a one-letter magic command, splice in args.
|
||||||
(defun ex-splice-args-in-1-letr-cmd (key list)
|
(defun ex-splice-args-in-1-letr-cmd (key list)
|
||||||
(let ((onelet (ex-cmd-is-one-letter (assoc (substring key 0 1) list))))
|
(let ((oneletter (ex-cmd-is-one-letter (assoc (substring key 0 1) list))))
|
||||||
(if onelet
|
(if oneletter
|
||||||
(list key
|
(list key
|
||||||
(append (cadr onelet)
|
(append (cadr oneletter)
|
||||||
(if (< 1 (length key)) (list (substring key 1))))
|
(if (< 1 (length key)) (list (substring key 1))))
|
||||||
(caddr onelet)))
|
(car (cdr (cdr oneletter))) ))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,10 @@ delete the text being replaced, as in standard Vi."
|
||||||
(if (fboundp 'make-variable-frame-local)
|
(if (fboundp 'make-variable-frame-local)
|
||||||
(make-variable-frame-local 'viper-insert-state-cursor-color))
|
(make-variable-frame-local 'viper-insert-state-cursor-color))
|
||||||
|
|
||||||
(defcustom viper-emacs-state-cursor-color "Magenta"
|
;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be
|
||||||
|
;; confused in some cases. So, this var is nulled for now.
|
||||||
|
;; (defcustom viper-emacs-state-cursor-color "Magenta"
|
||||||
|
(defcustom viper-emacs-state-cursor-color nil
|
||||||
"Cursor color when Viper is in emacs state."
|
"Cursor color when Viper is in emacs state."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'viper)
|
:group 'viper)
|
||||||
|
|
|
@ -137,10 +137,10 @@
|
||||||
(x-display-color-p) ; emacs
|
(x-display-color-p) ; emacs
|
||||||
))
|
))
|
||||||
|
|
||||||
(defsubst viper-get-cursor-color ()
|
(defun viper-get-cursor-color (&optional frame)
|
||||||
(viper-cond-compile-for-xemacs-or-emacs
|
(viper-cond-compile-for-xemacs-or-emacs
|
||||||
(color-instance-name
|
(color-instance-name
|
||||||
(frame-property (selected-frame) 'cursor-color)) ; xemacs
|
(frame-property (or frame (selected-frame)) 'cursor-color)) ; xemacs
|
||||||
(cdr (assoc 'cursor-color (frame-parameters))) ; emacs
|
(cdr (assoc 'cursor-color (frame-parameters))) ; emacs
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -152,18 +152,31 @@
|
||||||
|
|
||||||
|
|
||||||
;; cursor colors
|
;; cursor colors
|
||||||
(defun viper-change-cursor-color (new-color)
|
(defun viper-change-cursor-color (new-color &optional frame)
|
||||||
(if (and (viper-window-display-p) (viper-color-display-p)
|
(if (and (viper-window-display-p) (viper-color-display-p)
|
||||||
(stringp new-color) (viper-color-defined-p new-color)
|
(stringp new-color) (viper-color-defined-p new-color)
|
||||||
(not (string= new-color (viper-get-cursor-color))))
|
(not (string= new-color (viper-get-cursor-color))))
|
||||||
(viper-cond-compile-for-xemacs-or-emacs
|
(viper-cond-compile-for-xemacs-or-emacs
|
||||||
(set-frame-property
|
(set-frame-property
|
||||||
(selected-frame) 'cursor-color (make-color-instance new-color))
|
(or frame (selected-frame))
|
||||||
|
'cursor-color (make-color-instance new-color))
|
||||||
(modify-frame-parameters
|
(modify-frame-parameters
|
||||||
(selected-frame) (list (cons 'cursor-color new-color)))
|
(or frame (selected-frame))
|
||||||
|
(list (cons 'cursor-color new-color)))
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
(defun viper-set-cursor-color-according-to-state (&optional frame)
|
||||||
|
(cond ((eq viper-current-state 'replace-state)
|
||||||
|
(viper-change-cursor-color viper-replace-state-cursor-color frame))
|
||||||
|
((and (eq viper-current-state 'emacs-state)
|
||||||
|
viper-emacs-state-cursor-color)
|
||||||
|
(viper-change-cursor-color viper-emacs-state-cursor-color frame))
|
||||||
|
((eq viper-current-state 'insert-state)
|
||||||
|
(viper-change-cursor-color viper-insert-state-cursor-color frame))
|
||||||
|
(t
|
||||||
|
(viper-change-cursor-color viper-vi-state-cursor-color frame))))
|
||||||
|
|
||||||
;; By default, saves current frame cursor color in the
|
;; By default, saves current frame cursor color in the
|
||||||
;; viper-saved-cursor-color-in-replace-mode property of viper-replace-overlay
|
;; viper-saved-cursor-color-in-replace-mode property of viper-replace-overlay
|
||||||
(defun viper-save-cursor-color (before-which-mode)
|
(defun viper-save-cursor-color (before-which-mode)
|
||||||
|
@ -191,7 +204,7 @@
|
||||||
(if viper-emacs-p 'frame-parameter 'frame-property)
|
(if viper-emacs-p 'frame-parameter 'frame-property)
|
||||||
(selected-frame)
|
(selected-frame)
|
||||||
'viper-saved-cursor-color-in-replace-mode)
|
'viper-saved-cursor-color-in-replace-mode)
|
||||||
(if (eq viper-current-state 'emacs-mode)
|
(if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color)
|
||||||
viper-emacs-state-cursor-color
|
viper-emacs-state-cursor-color
|
||||||
viper-vi-state-cursor-color)))
|
viper-vi-state-cursor-color)))
|
||||||
|
|
||||||
|
@ -201,7 +214,7 @@
|
||||||
(if viper-emacs-p 'frame-parameter 'frame-property)
|
(if viper-emacs-p 'frame-parameter 'frame-property)
|
||||||
(selected-frame)
|
(selected-frame)
|
||||||
'viper-saved-cursor-color-in-insert-mode)
|
'viper-saved-cursor-color-in-insert-mode)
|
||||||
(if (eq viper-current-state 'emacs-mode)
|
(if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color)
|
||||||
viper-emacs-state-cursor-color
|
viper-emacs-state-cursor-color
|
||||||
viper-vi-state-cursor-color)))
|
viper-vi-state-cursor-color)))
|
||||||
|
|
||||||
|
|
|
@ -534,10 +534,6 @@ If Viper is enabled, turn it off. Otherwise, turn it on."
|
||||||
(defun viper-mode ()
|
(defun viper-mode ()
|
||||||
"Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Viper'."
|
"Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Viper'."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (null viper-vi-state-cursor-color)
|
|
||||||
(modify-frame-parameters
|
|
||||||
(selected-frame)
|
|
||||||
(list (cons 'viper-vi-state-cursor-color (viper-get-cursor-color)))))
|
|
||||||
(if (not noninteractive)
|
(if (not noninteractive)
|
||||||
(progn
|
(progn
|
||||||
;; if the user requested viper-mode explicitly
|
;; if the user requested viper-mode explicitly
|
||||||
|
@ -618,7 +614,8 @@ This startup message appears whenever you load Viper, unless you type `y' now."
|
||||||
|
|
||||||
(or (memq major-mode viper-emacs-state-mode-list) ; don't switch to Vi
|
(or (memq major-mode viper-emacs-state-mode-list) ; don't switch to Vi
|
||||||
(memq major-mode viper-insert-state-mode-list) ; don't switch
|
(memq major-mode viper-insert-state-mode-list) ; don't switch
|
||||||
(viper-change-state-to-vi)))))
|
(viper-change-state-to-vi))
|
||||||
|
)))
|
||||||
|
|
||||||
|
|
||||||
;; Apply a little heuristic to invoke vi state on major-modes
|
;; Apply a little heuristic to invoke vi state on major-modes
|
||||||
|
@ -862,8 +859,11 @@ It also can't undo some Viper settings."
|
||||||
;; info about the display and windows until emacs initialization is complete
|
;; info about the display and windows until emacs initialization is complete
|
||||||
;; So do it via the window-setup-hook
|
;; So do it via the window-setup-hook
|
||||||
(add-hook 'window-setup-hook
|
(add-hook 'window-setup-hook
|
||||||
'(lambda ()
|
'(lambda ()
|
||||||
(setq viper-vi-state-cursor-color (viper-get-cursor-color))))
|
(modify-frame-parameters
|
||||||
|
(selected-frame)
|
||||||
|
(list (cons 'viper-vi-state-cursor-color
|
||||||
|
(viper-get-cursor-color))))))
|
||||||
|
|
||||||
;; Tell vc-diff to put *vc* in Vi mode
|
;; Tell vc-diff to put *vc* in Vi mode
|
||||||
(if (featurep 'vc)
|
(if (featurep 'vc)
|
||||||
|
@ -903,7 +903,6 @@ It also can't undo some Viper settings."
|
||||||
|
|
||||||
(defadvice set-cursor-color (after viper-set-cursor-color-ad activate)
|
(defadvice set-cursor-color (after viper-set-cursor-color-ad activate)
|
||||||
"Change cursor color in VI state."
|
"Change cursor color in VI state."
|
||||||
;;(setq viper-vi-state-cursor-color (ad-get-arg 0))
|
|
||||||
(modify-frame-parameters
|
(modify-frame-parameters
|
||||||
(selected-frame)
|
(selected-frame)
|
||||||
(list (cons 'viper-vi-state-cursor-color (ad-get-arg 0))))
|
(list (cons 'viper-vi-state-cursor-color (ad-get-arg 0))))
|
||||||
|
@ -1008,8 +1007,8 @@ It also can't undo some Viper settings."
|
||||||
;; these are primarily advices and Vi-ish variable settings
|
;; these are primarily advices and Vi-ish variable settings
|
||||||
(defun viper-non-hook-settings ()
|
(defun viper-non-hook-settings ()
|
||||||
|
|
||||||
;; Viper changes the default mode-line-buffer-identification
|
;;;; Viper changes the default mode-line-buffer-identification
|
||||||
(setq-default mode-line-buffer-identification '(" %b"))
|
;;(setq-default mode-line-buffer-identification '(" %b"))
|
||||||
|
|
||||||
;; setup emacs-supported vi-style feel
|
;; setup emacs-supported vi-style feel
|
||||||
(setq next-line-add-newlines nil
|
(setq next-line-add-newlines nil
|
||||||
|
|
|
@ -1088,9 +1088,9 @@ Put first the functions more likely to cause a change and cheaper to compute.")
|
||||||
"Move fontification boundaries to beginning of lines."
|
"Move fontification boundaries to beginning of lines."
|
||||||
(let ((changed nil))
|
(let ((changed nil))
|
||||||
(goto-char font-lock-beg)
|
(goto-char font-lock-beg)
|
||||||
(unless (bobp) (setq changed t font-lock-beg (line-beginning-position)))
|
(unless (bolp) (setq changed t font-lock-beg (line-beginning-position)))
|
||||||
(goto-char font-lock-end)
|
(goto-char font-lock-end)
|
||||||
(unless (bobp) (setq changed t font-lock-end (line-beginning-position 2)))
|
(unless (bolp) (setq changed t font-lock-end (line-beginning-position 2)))
|
||||||
changed))
|
changed))
|
||||||
|
|
||||||
(defun font-lock-default-fontify-region (beg end loudly)
|
(defun font-lock-default-fontify-region (beg end loudly)
|
||||||
|
|
|
@ -1253,6 +1253,35 @@ The function `blink-cursor-start' is called when the timer fires.")
|
||||||
This timer calls `blink-cursor-timer-function' every
|
This timer calls `blink-cursor-timer-function' every
|
||||||
`blink-cursor-interval' seconds.")
|
`blink-cursor-interval' seconds.")
|
||||||
|
|
||||||
|
(defun blink-cursor-start ()
|
||||||
|
"Timer function called from the timer `blink-cursor-idle-timer'.
|
||||||
|
This starts the timer `blink-cursor-timer', which makes the cursor blink
|
||||||
|
if appropriate. It also arranges to cancel that timer when the next
|
||||||
|
command starts, by installing a pre-command hook."
|
||||||
|
(when (null blink-cursor-timer)
|
||||||
|
;; Set up the timer first, so that if this signals an error,
|
||||||
|
;; blink-cursor-end is not added to pre-command-hook.
|
||||||
|
(setq blink-cursor-timer
|
||||||
|
(run-with-timer blink-cursor-interval blink-cursor-interval
|
||||||
|
'blink-cursor-timer-function))
|
||||||
|
(add-hook 'pre-command-hook 'blink-cursor-end)
|
||||||
|
(internal-show-cursor nil nil)))
|
||||||
|
|
||||||
|
(defun blink-cursor-timer-function ()
|
||||||
|
"Timer function of timer `blink-cursor-timer'."
|
||||||
|
(internal-show-cursor nil (not (internal-show-cursor-p))))
|
||||||
|
|
||||||
|
(defun blink-cursor-end ()
|
||||||
|
"Stop cursor blinking.
|
||||||
|
This is installed as a pre-command hook by `blink-cursor-start'.
|
||||||
|
When run, it cancels the timer `blink-cursor-timer' and removes
|
||||||
|
itself as a pre-command hook."
|
||||||
|
(remove-hook 'pre-command-hook 'blink-cursor-end)
|
||||||
|
(internal-show-cursor nil t)
|
||||||
|
(when blink-cursor-timer
|
||||||
|
(cancel-timer blink-cursor-timer)
|
||||||
|
(setq blink-cursor-timer nil)))
|
||||||
|
|
||||||
(define-minor-mode blink-cursor-mode
|
(define-minor-mode blink-cursor-mode
|
||||||
"Toggle blinking cursor mode.
|
"Toggle blinking cursor mode.
|
||||||
With a numeric argument, turn blinking cursor mode on iff ARG is positive.
|
With a numeric argument, turn blinking cursor mode on iff ARG is positive.
|
||||||
|
@ -1270,48 +1299,17 @@ cursor display. On a text-only terminal, this is not implemented."
|
||||||
:group 'cursor
|
:group 'cursor
|
||||||
:global t
|
:global t
|
||||||
(if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer))
|
(if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer))
|
||||||
(if blink-cursor-timer (cancel-timer blink-cursor-timer))
|
(setq blink-cursor-idle-timer nil)
|
||||||
(setq blink-cursor-idle-timer nil
|
(blink-cursor-end)
|
||||||
blink-cursor-timer nil)
|
(when blink-cursor-mode
|
||||||
(if blink-cursor-mode
|
;; Hide the cursor.
|
||||||
(progn
|
;;(internal-show-cursor nil nil)
|
||||||
;; Hide the cursor.
|
(setq blink-cursor-idle-timer
|
||||||
;;(internal-show-cursor nil nil)
|
(run-with-idle-timer blink-cursor-delay
|
||||||
(setq blink-cursor-idle-timer
|
blink-cursor-delay
|
||||||
(run-with-idle-timer blink-cursor-delay
|
'blink-cursor-start))))
|
||||||
blink-cursor-delay
|
|
||||||
'blink-cursor-start)))
|
|
||||||
(internal-show-cursor nil t)))
|
|
||||||
|
|
||||||
(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
|
(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
|
||||||
|
|
||||||
(defun blink-cursor-start ()
|
|
||||||
"Timer function called from the timer `blink-cursor-idle-timer'.
|
|
||||||
This starts the timer `blink-cursor-timer', which makes the cursor blink
|
|
||||||
if appropriate. It also arranges to cancel that timer when the next
|
|
||||||
command starts, by installing a pre-command hook."
|
|
||||||
(when (null blink-cursor-timer)
|
|
||||||
(add-hook 'pre-command-hook 'blink-cursor-end)
|
|
||||||
(internal-show-cursor nil nil)
|
|
||||||
(setq blink-cursor-timer
|
|
||||||
(run-with-timer blink-cursor-interval blink-cursor-interval
|
|
||||||
'blink-cursor-timer-function))))
|
|
||||||
|
|
||||||
(defun blink-cursor-timer-function ()
|
|
||||||
"Timer function of timer `blink-cursor-timer'."
|
|
||||||
(internal-show-cursor nil (not (internal-show-cursor-p))))
|
|
||||||
|
|
||||||
(defun blink-cursor-end ()
|
|
||||||
"Stop cursor blinking.
|
|
||||||
This is installed as a pre-command hook by `blink-cursor-start'.
|
|
||||||
When run, it cancels the timer `blink-cursor-timer' and removes
|
|
||||||
itself as a pre-command hook."
|
|
||||||
(remove-hook 'pre-command-hook 'blink-cursor-end)
|
|
||||||
(internal-show-cursor nil t)
|
|
||||||
(cancel-timer blink-cursor-timer)
|
|
||||||
(setq blink-cursor-timer nil))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Hourglass pointer
|
;; Hourglass pointer
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
2006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
|
||||||
|
|
||||||
|
[ Backported bug fix from No Gnus. ]
|
||||||
|
|
||||||
|
* gnus.el (gnus-find-method-for-group): On killed/unknown groups, try
|
||||||
|
looking up the method using GROUP's prefix before inventing a new one.
|
||||||
|
It is used on killed/unknown groups in various places where returning
|
||||||
|
an all-new method isn't expected by the caller.
|
||||||
|
|
||||||
|
* gnus-util.el (gnus-group-server): Copy required macro from No Gnus.
|
||||||
|
|
||||||
2006-08-13 Romain Francoise <romain@orebokech.com>
|
2006-08-13 Romain Francoise <romain@orebokech.com>
|
||||||
|
|
||||||
* mm-extern.el (mm-extern-mail-server): End `y-or-n-p' prompt with a
|
* mm-extern.el (mm-extern-mail-server): End `y-or-n-p' prompt with a
|
||||||
|
|
|
@ -607,6 +607,17 @@ If N, return the Nth ancestor instead."
|
||||||
(substring gname (match-end 0))
|
(substring gname (match-end 0))
|
||||||
gname)))
|
gname)))
|
||||||
|
|
||||||
|
(defmacro gnus-group-server (group)
|
||||||
|
"Find the server name of a foreign newsgroup.
|
||||||
|
For example, (gnus-group-server \"nnimap+yxa:INBOX.foo\") would
|
||||||
|
yield \"nnimap:yxa\"."
|
||||||
|
`(let ((gname ,group))
|
||||||
|
(if (string-match "^\\([^:+]+\\)\\(?:\\+\\([^:]*\\)\\)?:" gname)
|
||||||
|
(format "%s:%s" (match-string 1 gname) (or
|
||||||
|
(match-string 2 gname)
|
||||||
|
""))
|
||||||
|
(format "%s:%s" (car gnus-select-method) (cadr gnus-select-method)))))
|
||||||
|
|
||||||
(defun gnus-make-sort-function (funs)
|
(defun gnus-make-sort-function (funs)
|
||||||
"Return a composite sort condition based on the functions in FUNS."
|
"Return a composite sort condition based on the functions in FUNS."
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -4079,8 +4079,13 @@ If NEWSGROUP is nil, return the global kill file name instead."
|
||||||
(or gnus-override-method
|
(or gnus-override-method
|
||||||
(and (not group)
|
(and (not group)
|
||||||
gnus-select-method)
|
gnus-select-method)
|
||||||
(and (not (gnus-group-entry group)) ;; a new group
|
(and (not (gnus-group-entry group))
|
||||||
(gnus-group-name-to-method group))
|
;; Killed or otherwise unknown group.
|
||||||
|
(or
|
||||||
|
;; If we know a virtual server by that name, return its method.
|
||||||
|
(gnus-server-to-method (gnus-group-server group))
|
||||||
|
;; Guess a new method as last resort.
|
||||||
|
(gnus-group-name-to-method group)))
|
||||||
(let ((info (or info (gnus-get-info group)))
|
(let ((info (or info (gnus-get-info group)))
|
||||||
method)
|
method)
|
||||||
(if (or (not info)
|
(if (or (not info)
|
||||||
|
|
68
lisp/ido.el
68
lisp/ido.el
|
@ -1840,6 +1840,7 @@ If INITIAL is non-nil, it specifies the initial input string."
|
||||||
(and d (cdr d)))))))
|
(and d (cdr d)))))))
|
||||||
(if (member ido-default-item ido-ignore-item-temp-list)
|
(if (member ido-default-item ido-ignore-item-temp-list)
|
||||||
(setq ido-default-item nil))
|
(setq ido-default-item nil))
|
||||||
|
(ido-trace "new default" ido-default-item)
|
||||||
(setq ido-set-default-item nil))
|
(setq ido-set-default-item nil))
|
||||||
|
|
||||||
(if ido-process-ignore-lists-inhibit
|
(if ido-process-ignore-lists-inhibit
|
||||||
|
@ -3528,37 +3529,40 @@ for first matching file."
|
||||||
(let* ((case-fold-search ido-case-fold)
|
(let* ((case-fold-search ido-case-fold)
|
||||||
(slash (and (not ido-enable-prefix) (ido-final-slash ido-text)))
|
(slash (and (not ido-enable-prefix) (ido-final-slash ido-text)))
|
||||||
(text (if slash (substring ido-text 0 -1) ido-text))
|
(text (if slash (substring ido-text 0 -1) ido-text))
|
||||||
(rexq (concat (if ido-enable-regexp text (regexp-quote text)) (if slash ".*/" "")))
|
(rex0 (if ido-enable-regexp text (regexp-quote text)))
|
||||||
|
(rexq (concat rex0 (if slash ".*/" "")))
|
||||||
(re (if ido-enable-prefix (concat "\\`" rexq) rexq))
|
(re (if ido-enable-prefix (concat "\\`" rexq) rexq))
|
||||||
(full-re (and do-full (not ido-enable-regexp) (not (string-match "\$\\'" re))
|
(full-re (and do-full (not ido-enable-regexp) (not (string-match "\$\\'" rex0))
|
||||||
(concat "\\`" re "\\'")))
|
(concat "\\`" rex0 (if slash "/" "") "\\'")))
|
||||||
|
(suffix-re (and do-full slash
|
||||||
|
(not ido-enable-regexp) (not (string-match "\$\\'" rex0))
|
||||||
|
(concat rex0 "/\\'")))
|
||||||
(prefix-re (and full-re (not ido-enable-prefix)
|
(prefix-re (and full-re (not ido-enable-prefix)
|
||||||
(concat "\\`" rexq)))
|
(concat "\\`" rexq)))
|
||||||
(non-prefix-dot (or (not ido-enable-dot-prefix)
|
(non-prefix-dot (or (not ido-enable-dot-prefix)
|
||||||
(not ido-process-ignore-lists)
|
(not ido-process-ignore-lists)
|
||||||
ido-enable-prefix
|
ido-enable-prefix
|
||||||
(= (length ido-text) 0)))
|
(= (length ido-text) 0)))
|
||||||
|
full-matches suffix-matches prefix-matches matches)
|
||||||
full-matches
|
|
||||||
prefix-matches
|
|
||||||
matches)
|
|
||||||
(setq ido-incomplete-regexp nil)
|
(setq ido-incomplete-regexp nil)
|
||||||
(condition-case error
|
(condition-case error
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (item)
|
(lambda (item)
|
||||||
(let ((name (ido-name item)))
|
(let ((name (ido-name item)))
|
||||||
(if (and (or non-prefix-dot
|
(if (and (or non-prefix-dot
|
||||||
(if (= (aref ido-text 0) ?.)
|
(if (= (aref ido-text 0) ?.)
|
||||||
(= (aref name 0) ?.)
|
(= (aref name 0) ?.)
|
||||||
(/= (aref name 0) ?.)))
|
(/= (aref name 0) ?.)))
|
||||||
(string-match re name))
|
(string-match re name))
|
||||||
(cond
|
(cond
|
||||||
((and full-re (string-match full-re name))
|
((and full-re (string-match full-re name))
|
||||||
(setq full-matches (cons item full-matches)))
|
(setq full-matches (cons item full-matches)))
|
||||||
((and prefix-re (string-match prefix-re name))
|
((and suffix-re (string-match suffix-re name))
|
||||||
(setq prefix-matches (cons item prefix-matches)))
|
(setq suffix-matches (cons item suffix-matches)))
|
||||||
(t (setq matches (cons item matches))))))
|
((and prefix-re (string-match prefix-re name))
|
||||||
t)
|
(setq prefix-matches (cons item prefix-matches)))
|
||||||
|
(t (setq matches (cons item matches))))))
|
||||||
|
t)
|
||||||
items)
|
items)
|
||||||
(invalid-regexp
|
(invalid-regexp
|
||||||
(setq ido-incomplete-regexp t
|
(setq ido-incomplete-regexp t
|
||||||
|
@ -3566,10 +3570,15 @@ for first matching file."
|
||||||
;; special-case single match, and handle appropriately
|
;; special-case single match, and handle appropriately
|
||||||
;; elsewhere.
|
;; elsewhere.
|
||||||
matches (cdr error))))
|
matches (cdr error))))
|
||||||
(if prefix-matches
|
(when prefix-matches
|
||||||
(setq matches (nconc prefix-matches matches)))
|
(ido-trace "prefix match" prefix-matches)
|
||||||
(if full-matches
|
(setq matches (nconc prefix-matches matches)))
|
||||||
(setq matches (nconc full-matches matches)))
|
(when suffix-matches
|
||||||
|
(ido-trace "suffix match" (list text suffix-re suffix-matches))
|
||||||
|
(setq matches (nconc suffix-matches matches)))
|
||||||
|
(when full-matches
|
||||||
|
(ido-trace "full match" (list text full-re full-matches))
|
||||||
|
(setq matches (nconc full-matches matches)))
|
||||||
(when (and (null matches)
|
(when (and (null matches)
|
||||||
ido-enable-flex-matching
|
ido-enable-flex-matching
|
||||||
(> (length ido-text) 1)
|
(> (length ido-text) 1)
|
||||||
|
@ -4096,12 +4105,13 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
|
||||||
try-single-dir-match
|
try-single-dir-match
|
||||||
refresh)
|
refresh)
|
||||||
|
|
||||||
(ido-trace "\nexhibit" this-command)
|
(when ido-trace-enable
|
||||||
(ido-trace "dir" ido-current-directory)
|
(ido-trace "\nexhibit" this-command)
|
||||||
(ido-trace "contents" contents)
|
(ido-trace "dir" ido-current-directory)
|
||||||
(ido-trace "list" ido-cur-list)
|
(ido-trace "contents" contents)
|
||||||
(ido-trace "matches" ido-matches)
|
(ido-trace "list" ido-cur-list)
|
||||||
(ido-trace "rescan" ido-rescan)
|
(ido-trace "matches" ido-matches)
|
||||||
|
(ido-trace "rescan" ido-rescan))
|
||||||
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
|
|
132
lisp/jit-lock.el
132
lisp/jit-lock.el
|
@ -171,6 +171,8 @@ If nil, contextual fontification is disabled.")
|
||||||
|
|
||||||
(defvar jit-lock-stealth-timer nil
|
(defvar jit-lock-stealth-timer nil
|
||||||
"Timer for stealth fontification in Just-in-time Lock mode.")
|
"Timer for stealth fontification in Just-in-time Lock mode.")
|
||||||
|
(defvar jit-lock-stealth-repeat-timer nil
|
||||||
|
"Timer for repeated stealth fontification in Just-in-time Lock mode.")
|
||||||
(defvar jit-lock-context-timer nil
|
(defvar jit-lock-context-timer nil
|
||||||
"Timer for context fontification in Just-in-time Lock mode.")
|
"Timer for context fontification in Just-in-time Lock mode.")
|
||||||
(defvar jit-lock-defer-timer nil
|
(defvar jit-lock-defer-timer nil
|
||||||
|
@ -178,6 +180,8 @@ If nil, contextual fontification is disabled.")
|
||||||
|
|
||||||
(defvar jit-lock-defer-buffers nil
|
(defvar jit-lock-defer-buffers nil
|
||||||
"List of buffers with pending deferred fontification.")
|
"List of buffers with pending deferred fontification.")
|
||||||
|
(defvar jit-lock-stealth-buffers nil
|
||||||
|
"List of buffers that are being fontified stealthily.")
|
||||||
|
|
||||||
;;; JIT lock mode
|
;;; JIT lock mode
|
||||||
|
|
||||||
|
@ -225,6 +229,13 @@ the variable `jit-lock-stealth-nice'."
|
||||||
(run-with-idle-timer jit-lock-stealth-time t
|
(run-with-idle-timer jit-lock-stealth-time t
|
||||||
'jit-lock-stealth-fontify)))
|
'jit-lock-stealth-fontify)))
|
||||||
|
|
||||||
|
;; Create, but do not activate, the idle timer for repeated
|
||||||
|
;; stealth fontification.
|
||||||
|
(when (and jit-lock-stealth-time (null jit-lock-stealth-repeat-timer))
|
||||||
|
(setq jit-lock-stealth-repeat-timer (timer-create))
|
||||||
|
(timer-set-function jit-lock-stealth-repeat-timer
|
||||||
|
'jit-lock-stealth-fontify '(t)))
|
||||||
|
|
||||||
;; Init deferred fontification timer.
|
;; Init deferred fontification timer.
|
||||||
(when (and jit-lock-defer-time (null jit-lock-defer-timer))
|
(when (and jit-lock-defer-time (null jit-lock-defer-timer))
|
||||||
(setq jit-lock-defer-timer
|
(setq jit-lock-defer-timer
|
||||||
|
@ -391,9 +402,10 @@ Defaults to the whole buffer. END can be out of bounds."
|
||||||
(buf (current-buffer)))
|
(buf (current-buffer)))
|
||||||
(run-with-timer
|
(run-with-timer
|
||||||
0 nil (lambda ()
|
0 nil (lambda ()
|
||||||
(with-buffer-prepared-for-jit-lock
|
(with-current-buffer buf
|
||||||
(put-text-property start orig-start
|
(with-buffer-prepared-for-jit-lock
|
||||||
'fontified t buf))))))
|
(put-text-property start orig-start
|
||||||
|
'fontified t)))))))
|
||||||
|
|
||||||
;; Find the start of the next chunk, if any.
|
;; Find the start of the next chunk, if any.
|
||||||
(setq start (text-property-any next end 'fontified nil))))))))
|
(setq start (text-property-any next end 'fontified nil))))))))
|
||||||
|
@ -442,71 +454,55 @@ Value is nil if there is nothing more to fontify."
|
||||||
(t next))))
|
(t next))))
|
||||||
result))))
|
result))))
|
||||||
|
|
||||||
|
(defun jit-lock-stealth-fontify (&optional repeat)
|
||||||
(defun jit-lock-stealth-fontify ()
|
|
||||||
"Fontify buffers stealthily.
|
"Fontify buffers stealthily.
|
||||||
This functions is called after Emacs has been idle for
|
This function is called repeatedly after Emacs has become idle for
|
||||||
`jit-lock-stealth-time' seconds."
|
`jit-lock-stealth-time' seconds. Optional argument REPEAT is expected
|
||||||
;; I used to check `inhibit-read-only' here, but I can't remember why. -stef
|
non-nil in a repeated invocation of this function."
|
||||||
|
;; Cancel timer for repeated invocations.
|
||||||
|
(unless repeat
|
||||||
|
(cancel-timer jit-lock-stealth-repeat-timer))
|
||||||
(unless (or executing-kbd-macro
|
(unless (or executing-kbd-macro
|
||||||
memory-full
|
memory-full
|
||||||
(window-minibuffer-p (selected-window)))
|
(window-minibuffer-p (selected-window))
|
||||||
(let ((buffers (buffer-list))
|
;; For first invocation set up `jit-lock-stealth-buffers'.
|
||||||
(outer-buffer (current-buffer))
|
;; In repeated invocations it's already been set up.
|
||||||
|
(null (if repeat
|
||||||
|
jit-lock-stealth-buffers
|
||||||
|
(setq jit-lock-stealth-buffers (buffer-list)))))
|
||||||
|
(let ((buffer (car jit-lock-stealth-buffers))
|
||||||
|
(delay 0)
|
||||||
minibuffer-auto-raise
|
minibuffer-auto-raise
|
||||||
message-log-max)
|
message-log-max
|
||||||
(with-local-quit
|
start)
|
||||||
(while (and buffers (not (input-pending-p)))
|
(if (and jit-lock-stealth-load
|
||||||
(with-current-buffer (pop buffers)
|
(> (car (load-average)) jit-lock-stealth-load))
|
||||||
(when jit-lock-mode
|
;; Wait a little if load is too high.
|
||||||
;; This is funny. Calling sit-for with 3rd arg non-nil
|
(setq delay jit-lock-stealth-time)
|
||||||
;; so that it doesn't redisplay, internally calls
|
(if (buffer-live-p buffer)
|
||||||
;; wait_reading_process_input also with a parameter
|
(with-current-buffer buffer
|
||||||
;; saying "don't redisplay." Since this function here
|
(if (and jit-lock-mode
|
||||||
;; is called periodically, this effectively leads to
|
(setq start (jit-lock-stealth-chunk-start (point))))
|
||||||
;; process output not being redisplayed at all because
|
;; Fontify one block of at most `jit-lock-chunk-size'
|
||||||
;; redisplay_internal is never called. (That didn't
|
;; characters.
|
||||||
;; work in the old redisplay either.) So, we learn that
|
(with-temp-message (if jit-lock-stealth-verbose
|
||||||
;; we mustn't call sit-for that way here. But then, we
|
(concat "JIT stealth lock "
|
||||||
;; have to be cautious not to call sit-for in a widened
|
(buffer-name)))
|
||||||
;; buffer, since this could display hidden parts of that
|
(jit-lock-fontify-now start
|
||||||
;; buffer. This explains the seemingly weird use of
|
(+ start jit-lock-chunk-size))
|
||||||
;; save-restriction/widen here.
|
;; Run again after `jit-lock-stealth-nice' seconds.
|
||||||
|
(setq delay (or jit-lock-stealth-nice 0)))
|
||||||
(with-temp-message (if jit-lock-stealth-verbose
|
;; Nothing to fontify here. Remove this buffer from
|
||||||
(concat "JIT stealth lock "
|
;; `jit-lock-stealth-buffers' and run again immediately.
|
||||||
(buffer-name)))
|
(setq jit-lock-stealth-buffers (cdr jit-lock-stealth-buffers))))
|
||||||
|
;; Buffer is no longer live. Remove it from
|
||||||
;; In the following code, the `sit-for' calls cause a
|
;; `jit-lock-stealth-buffers' and run again immediately.
|
||||||
;; redisplay, so it's required that the
|
(setq jit-lock-stealth-buffers (cdr jit-lock-stealth-buffers))))
|
||||||
;; buffer-modified flag of a buffer that is displayed
|
;; Call us again.
|
||||||
;; has the right value---otherwise the mode line of
|
(when jit-lock-stealth-buffers
|
||||||
;; an unmodified buffer would show a `*'.
|
(timer-set-idle-time jit-lock-stealth-repeat-timer (current-idle-time))
|
||||||
(let (start
|
(timer-inc-time jit-lock-stealth-repeat-timer delay)
|
||||||
(nice (or jit-lock-stealth-nice 0))
|
(timer-activate-when-idle jit-lock-stealth-repeat-timer t)))))
|
||||||
(point (point-min)))
|
|
||||||
(while (and (setq start
|
|
||||||
(jit-lock-stealth-chunk-start point))
|
|
||||||
;; In case sit-for runs any timers,
|
|
||||||
;; give them the expected current buffer.
|
|
||||||
(with-current-buffer outer-buffer
|
|
||||||
(sit-for nice)))
|
|
||||||
|
|
||||||
;; fontify a block.
|
|
||||||
(jit-lock-fontify-now start (+ start jit-lock-chunk-size))
|
|
||||||
;; If stealth jit-locking is done backwards, this leads to
|
|
||||||
;; excessive O(n^2) refontification. -stef
|
|
||||||
;; (when (>= jit-lock-context-unfontify-pos start)
|
|
||||||
;; (setq jit-lock-context-unfontify-pos end))
|
|
||||||
|
|
||||||
;; Wait a little if load is too high.
|
|
||||||
(when (and jit-lock-stealth-load
|
|
||||||
(> (car (load-average)) jit-lock-stealth-load))
|
|
||||||
;; In case sit-for runs any timers,
|
|
||||||
;; give them the expected current buffer.
|
|
||||||
(with-current-buffer outer-buffer
|
|
||||||
(sit-for (or jit-lock-stealth-time 30))))))))))))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; Deferred fontification.
|
;;; Deferred fontification.
|
||||||
|
@ -577,10 +573,10 @@ the three arguments of `after-change-functions': START END OLD-LEN.
|
||||||
The extended region to refontify is returned indirectly by modifying
|
The extended region to refontify is returned indirectly by modifying
|
||||||
the variables `jit-lock-start' and `jit-lock-end'.
|
the variables `jit-lock-start' and `jit-lock-end'.
|
||||||
|
|
||||||
Note that extending the region this way is not strictly necessary,
|
Note that extending the region this way is not strictly necessary, except
|
||||||
except that the nature of the redisplay code tends to otherwise leave
|
that the nature of the redisplay code tends to otherwise leave some of
|
||||||
some of the rehighlighted text displayed with the old highlight until the
|
the rehighlighted text displayed with the old highlight until the next
|
||||||
next redisplay. See comment in `jit-lock-fontify-now'.")
|
redisplay (see comment about repeated redisplay in `jit-lock-fontify-now').")
|
||||||
|
|
||||||
(defun jit-lock-after-change (start end old-len)
|
(defun jit-lock-after-change (start end old-len)
|
||||||
"Mark the rest of the buffer as not fontified after a change.
|
"Mark the rest of the buffer as not fontified after a change.
|
||||||
|
|
|
@ -409,7 +409,7 @@ Optional arg EMPTY is message to print if no macros are defined."
|
||||||
|
|
||||||
|
|
||||||
(defun kmacro-repeat-on-last-key (keys)
|
(defun kmacro-repeat-on-last-key (keys)
|
||||||
"Process kmacro commands keys immidiately after cycling the ring."
|
"Process kmacro commands keys immediately after cycling the ring."
|
||||||
(setq keys (vconcat keys))
|
(setq keys (vconcat keys))
|
||||||
(let ((n (1- (length keys)))
|
(let ((n (1- (length keys)))
|
||||||
cmd done repeat)
|
cmd done repeat)
|
||||||
|
|
|
@ -2398,6 +2398,8 @@ and selects that window."
|
||||||
(global-set-key [right-fringe mouse-1] 'mouse-set-point)
|
(global-set-key [right-fringe mouse-1] 'mouse-set-point)
|
||||||
|
|
||||||
(global-set-key [mouse-2] 'mouse-yank-at-click)
|
(global-set-key [mouse-2] 'mouse-yank-at-click)
|
||||||
|
;; Allow yanking also when the corresponding cursor is "in the fringe".
|
||||||
|
(global-set-key [right-fringe mouse-2] [mouse-2])
|
||||||
(global-set-key [mouse-3] 'mouse-save-then-kill)
|
(global-set-key [mouse-3] 'mouse-save-then-kill)
|
||||||
|
|
||||||
;; By binding these to down-going events, we let the user use the up-going
|
;; By binding these to down-going events, we let the user use the up-going
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
;; Open a new irc connection with:
|
;; Open a new irc connection with:
|
||||||
;; M-x irc RET
|
;; M-x irc RET
|
||||||
|
|
||||||
|
;;; Todo:
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'ring)
|
(require 'ring)
|
||||||
|
@ -140,6 +142,10 @@ number. If zero or nil, no truncating is done."
|
||||||
(integer :tag "Number of lines"))
|
(integer :tag "Number of lines"))
|
||||||
:group 'rcirc)
|
:group 'rcirc)
|
||||||
|
|
||||||
|
(defcustom rcirc-show-maximum-output t
|
||||||
|
"*If non-nil, scroll buffer to keep the point at the bottom of
|
||||||
|
the window.")
|
||||||
|
|
||||||
(defcustom rcirc-authinfo nil
|
(defcustom rcirc-authinfo nil
|
||||||
"List of authentication passwords.
|
"List of authentication passwords.
|
||||||
Each element of the list is a list with a SERVER-REGEXP string
|
Each element of the list is a list with a SERVER-REGEXP string
|
||||||
|
@ -297,6 +303,7 @@ and the cdr part is used for encoding."
|
||||||
|
|
||||||
(defvar rcirc-urls nil
|
(defvar rcirc-urls nil
|
||||||
"List of urls seen in the current buffer.")
|
"List of urls seen in the current buffer.")
|
||||||
|
(put 'rcirc-urls 'permanent-local t)
|
||||||
|
|
||||||
(defvar rcirc-keepalive-seconds 60
|
(defvar rcirc-keepalive-seconds 60
|
||||||
"Number of seconds between keepalive pings.
|
"Number of seconds between keepalive pings.
|
||||||
|
@ -539,7 +546,10 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
|
||||||
(defun rcirc-buffer-process (&optional buffer)
|
(defun rcirc-buffer-process (&optional buffer)
|
||||||
"Return the process associated with channel BUFFER.
|
"Return the process associated with channel BUFFER.
|
||||||
With no argument or nil as argument, use the current buffer."
|
With no argument or nil as argument, use the current buffer."
|
||||||
(get-buffer-process (or buffer rcirc-server-buffer)))
|
(get-buffer-process (if buffer
|
||||||
|
(with-current-buffer buffer
|
||||||
|
rcirc-server-buffer)
|
||||||
|
rcirc-server-buffer)))
|
||||||
|
|
||||||
(defun rcirc-server-name (process)
|
(defun rcirc-server-name (process)
|
||||||
"Return PROCESS server name, given by the 001 response."
|
"Return PROCESS server name, given by the 001 response."
|
||||||
|
@ -601,10 +611,11 @@ If NOTICEP is non-nil, send a notice instead of privmsg."
|
||||||
|
|
||||||
(defvar rcirc-nick-completions nil)
|
(defvar rcirc-nick-completions nil)
|
||||||
(defvar rcirc-nick-completion-start-offset nil)
|
(defvar rcirc-nick-completion-start-offset nil)
|
||||||
|
|
||||||
(defun rcirc-complete-nick ()
|
(defun rcirc-complete-nick ()
|
||||||
"Cycle through nick completions from list of nicks in channel."
|
"Cycle through nick completions from list of nicks in channel."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (eq last-command 'rcirc-complete-nick)
|
(if (eq last-command this-command)
|
||||||
(setq rcirc-nick-completions
|
(setq rcirc-nick-completions
|
||||||
(append (cdr rcirc-nick-completions)
|
(append (cdr rcirc-nick-completions)
|
||||||
(list (car rcirc-nick-completions))))
|
(list (car rcirc-nick-completions))))
|
||||||
|
@ -626,9 +637,10 @@ If NOTICEP is non-nil, send a notice instead of privmsg."
|
||||||
rcirc-target))))))
|
rcirc-target))))))
|
||||||
(let ((completion (car rcirc-nick-completions)))
|
(let ((completion (car rcirc-nick-completions)))
|
||||||
(when completion
|
(when completion
|
||||||
|
(rcirc-put-nick-channel (rcirc-buffer-process) completion rcirc-target)
|
||||||
(delete-region (+ rcirc-prompt-end-marker
|
(delete-region (+ rcirc-prompt-end-marker
|
||||||
rcirc-nick-completion-start-offset)
|
rcirc-nick-completion-start-offset)
|
||||||
(point))
|
(point))
|
||||||
(insert (concat completion
|
(insert (concat completion
|
||||||
(if (= (+ rcirc-prompt-end-marker
|
(if (= (+ rcirc-prompt-end-marker
|
||||||
rcirc-nick-completion-start-offset)
|
rcirc-nick-completion-start-offset)
|
||||||
|
@ -709,7 +721,6 @@ If NOTICEP is non-nil, send a notice instead of privmsg."
|
||||||
(make-local-variable 'rcirc-short-buffer-name)
|
(make-local-variable 'rcirc-short-buffer-name)
|
||||||
(setq rcirc-short-buffer-name nil)
|
(setq rcirc-short-buffer-name nil)
|
||||||
(make-local-variable 'rcirc-urls)
|
(make-local-variable 'rcirc-urls)
|
||||||
(setq rcirc-urls nil)
|
|
||||||
(setq use-hard-newlines t)
|
(setq use-hard-newlines t)
|
||||||
|
|
||||||
(make-local-variable 'rcirc-decode-coding-system)
|
(make-local-variable 'rcirc-decode-coding-system)
|
||||||
|
@ -742,6 +753,9 @@ If NOTICEP is non-nil, send a notice instead of privmsg."
|
||||||
(make-local-variable 'kill-buffer-hook)
|
(make-local-variable 'kill-buffer-hook)
|
||||||
(add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook)
|
(add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook)
|
||||||
|
|
||||||
|
(make-local-variable 'window-scroll-functions)
|
||||||
|
(add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom)
|
||||||
|
|
||||||
;; add to buffer list, and update buffer abbrevs
|
;; add to buffer list, and update buffer abbrevs
|
||||||
(when target ; skip server buffer
|
(when target ; skip server buffer
|
||||||
(let ((buffer (current-buffer)))
|
(let ((buffer (current-buffer)))
|
||||||
|
@ -1144,6 +1158,15 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
|
||||||
(make-variable-buffer-local 'rcirc-last-sender)
|
(make-variable-buffer-local 'rcirc-last-sender)
|
||||||
(defvar rcirc-gray-toggle nil)
|
(defvar rcirc-gray-toggle nil)
|
||||||
(make-variable-buffer-local 'rcirc-gray-toggle)
|
(make-variable-buffer-local 'rcirc-gray-toggle)
|
||||||
|
|
||||||
|
(defun rcirc-scroll-to-bottom (window display-start)
|
||||||
|
"Scroll window to show maximum output if `rcirc-show-maximum-output' is
|
||||||
|
non-nil."
|
||||||
|
(when rcirc-show-maximum-output
|
||||||
|
(with-selected-window window
|
||||||
|
(when (>= (window-point) rcirc-prompt-end-marker)
|
||||||
|
(recenter -1)))))
|
||||||
|
|
||||||
(defun rcirc-print (process sender response target text &optional activity)
|
(defun rcirc-print (process sender response target text &optional activity)
|
||||||
"Print TEXT in the buffer associated with TARGET.
|
"Print TEXT in the buffer associated with TARGET.
|
||||||
Format based on SENDER and RESPONSE. If ACTIVITY is non-nil,
|
Format based on SENDER and RESPONSE. If ACTIVITY is non-nil,
|
||||||
|
@ -1240,16 +1263,19 @@ record activity."
|
||||||
;; record modeline activity
|
;; record modeline activity
|
||||||
(when activity
|
(when activity
|
||||||
(let ((nick-match
|
(let ((nick-match
|
||||||
(string-match (concat "\\b"
|
(with-syntax-table rcirc-nick-syntax-table
|
||||||
(regexp-quote (rcirc-nick process))
|
(string-match (concat "\\b"
|
||||||
"\\b")
|
(regexp-quote (rcirc-nick process))
|
||||||
text)))
|
"\\b")
|
||||||
|
text))))
|
||||||
(when (if rcirc-ignore-buffer-activity-flag
|
(when (if rcirc-ignore-buffer-activity-flag
|
||||||
;; - Always notice when our nick is mentioned
|
;; - Always notice when our nick is mentioned
|
||||||
nick-match
|
nick-match
|
||||||
;; - Never bother us if a dim-nick spoke
|
;; - unless our nick is mentioned, don't bother us
|
||||||
(not (and rcirc-dim-nick-regexp sender
|
;; - with dim-nicks
|
||||||
(string-match rcirc-dim-nick-regexp sender))))
|
(or nick-match
|
||||||
|
(not (and rcirc-dim-nick-regexp sender
|
||||||
|
(string-match rcirc-dim-nick-regexp sender)))))
|
||||||
(rcirc-record-activity
|
(rcirc-record-activity
|
||||||
(current-buffer)
|
(current-buffer)
|
||||||
(when (or nick-match (and (not (rcirc-channel-p rcirc-target))
|
(when (or nick-match (and (not (rcirc-channel-p rcirc-target))
|
||||||
|
@ -1504,18 +1530,20 @@ activity. Only run if the buffer is not visible and
|
||||||
(lopri (car pair))
|
(lopri (car pair))
|
||||||
(hipri (cdr pair)))
|
(hipri (cdr pair)))
|
||||||
(setq rcirc-activity-string
|
(setq rcirc-activity-string
|
||||||
(if (or hipri lopri)
|
(cond ((or hipri lopri)
|
||||||
(concat "-"
|
(concat "-"
|
||||||
(and hipri "[")
|
(and hipri "[")
|
||||||
(rcirc-activity-string hipri)
|
(rcirc-activity-string hipri)
|
||||||
(and hipri lopri ",")
|
(and hipri lopri ",")
|
||||||
(and lopri
|
(and lopri
|
||||||
(concat "("
|
(concat "("
|
||||||
(rcirc-activity-string lopri)
|
(rcirc-activity-string lopri)
|
||||||
")"))
|
")"))
|
||||||
(and hipri "]")
|
(and hipri "]")
|
||||||
"-")
|
"-"))
|
||||||
"-[]-"))))
|
((not (null (rcirc-process-list)))
|
||||||
|
"-[]-")
|
||||||
|
(t "")))))
|
||||||
|
|
||||||
(defun rcirc-activity-string (buffers)
|
(defun rcirc-activity-string (buffers)
|
||||||
(mapconcat (lambda (b)
|
(mapconcat (lambda (b)
|
||||||
|
@ -1771,7 +1799,7 @@ nicks when no NICK is given. When listing ignored nicks, the
|
||||||
ones added to the list automatically are marked with an asterisk."
|
ones added to the list automatically are marked with an asterisk."
|
||||||
(interactive "sToggle ignoring of nick: ")
|
(interactive "sToggle ignoring of nick: ")
|
||||||
(when (not (string= "" nick))
|
(when (not (string= "" nick))
|
||||||
(if (member nick rcirc-ignore-list)
|
(if (member-ignore-case nick rcirc-ignore-list)
|
||||||
(setq rcirc-ignore-list (delete nick rcirc-ignore-list))
|
(setq rcirc-ignore-list (delete nick rcirc-ignore-list))
|
||||||
(setq rcirc-ignore-list (cons nick rcirc-ignore-list))))
|
(setq rcirc-ignore-list (cons nick rcirc-ignore-list))))
|
||||||
(rcirc-print process (rcirc-nick process) "IGNORE" target
|
(rcirc-print process (rcirc-nick process) "IGNORE" target
|
||||||
|
@ -1800,6 +1828,7 @@ ones added to the list automatically are marked with an asterisk."
|
||||||
"://")
|
"://")
|
||||||
"www.")
|
"www.")
|
||||||
(1+ (char "-a-zA-Z0-9_."))
|
(1+ (char "-a-zA-Z0-9_."))
|
||||||
|
(1+ (char "-a-zA-Z0-9_"))
|
||||||
(optional ":" (1+ (char "0-9"))))
|
(optional ":" (1+ (char "0-9"))))
|
||||||
(and (1+ (char "-a-zA-Z0-9_."))
|
(and (1+ (char "-a-zA-Z0-9_."))
|
||||||
(or ".com" ".net" ".org")
|
(or ".com" ".net" ".org")
|
||||||
|
@ -1823,7 +1852,7 @@ ones added to the list automatically are marked with an asterisk."
|
||||||
(defun rcirc-browse-url-at-point (point)
|
(defun rcirc-browse-url-at-point (point)
|
||||||
"Send URL at point to `browse-url'."
|
"Send URL at point to `browse-url'."
|
||||||
(interactive "d")
|
(interactive "d")
|
||||||
(let ((beg (previous-single-property-change point 'mouse-face))
|
(let ((beg (previous-single-property-change (1+ point) 'mouse-face))
|
||||||
(end (next-single-property-change point 'mouse-face)))
|
(end (next-single-property-change point 'mouse-face)))
|
||||||
(browse-url (buffer-substring-no-properties beg end))))
|
(browse-url (buffer-substring-no-properties beg end))))
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@ the variables are properly set."
|
||||||
(substring comment-start 1)))
|
(substring comment-start 1)))
|
||||||
;; Hasn't been necessary yet.
|
;; Hasn't been necessary yet.
|
||||||
;; (unless (string-match comment-start-skip comment-continue)
|
;; (unless (string-match comment-start-skip comment-continue)
|
||||||
;; (kill-local-variable 'comment-continue))
|
;; (kill-local-variable 'comment-continue))
|
||||||
)
|
)
|
||||||
;; comment-skip regexps
|
;; comment-skip regexps
|
||||||
(unless (and comment-start-skip
|
(unless (and comment-start-skip
|
||||||
|
@ -602,7 +602,7 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
|
||||||
;; Update INDENT to leave at least one space
|
;; Update INDENT to leave at least one space
|
||||||
;; after other nonwhite text on the line.
|
;; after other nonwhite text on the line.
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(skip-chars-backward " \t")
|
(skip-chars-backward " \t")
|
||||||
(unless (bolp)
|
(unless (bolp)
|
||||||
(setq indent (max indent (1+ (current-column))))))
|
(setq indent (max indent (1+ (current-column))))))
|
||||||
;; If that's different from comment's current position, change it.
|
;; If that's different from comment's current position, change it.
|
||||||
|
@ -769,7 +769,7 @@ comment markers."
|
||||||
(box-equal nil)) ;Whether we might be using `=' for boxes.
|
(box-equal nil)) ;Whether we might be using `=' for boxes.
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(narrow-to-region spt ept)
|
(narrow-to-region spt ept)
|
||||||
|
|
||||||
;; Remove the comment-start.
|
;; Remove the comment-start.
|
||||||
(goto-char ipt)
|
(goto-char ipt)
|
||||||
(skip-syntax-backward " ")
|
(skip-syntax-backward " ")
|
||||||
|
@ -798,7 +798,7 @@ comment markers."
|
||||||
;; If there's something left but it doesn't look like
|
;; If there's something left but it doesn't look like
|
||||||
;; a comment-start any more, just remove it.
|
;; a comment-start any more, just remove it.
|
||||||
(delete-region (point-min) (point))))
|
(delete-region (point-min) (point))))
|
||||||
|
|
||||||
;; Remove the end-comment (and leading padding and such).
|
;; Remove the end-comment (and leading padding and such).
|
||||||
(goto-char (point-max)) (comment-enter-backward)
|
(goto-char (point-max)) (comment-enter-backward)
|
||||||
;; Check for special `=' used sometimes in comment-box.
|
;; Check for special `=' used sometimes in comment-box.
|
||||||
|
@ -1062,11 +1062,13 @@ The strings used as comment starts are built from
|
||||||
lines
|
lines
|
||||||
(nth 3 style))))))
|
(nth 3 style))))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun comment-box (beg end &optional arg)
|
(defun comment-box (beg end &optional arg)
|
||||||
"Comment out the BEG .. END region, putting it inside a box.
|
"Comment out the BEG .. END region, putting it inside a box.
|
||||||
The numeric prefix ARG specifies how many characters to add to begin- and
|
The numeric prefix ARG specifies how many characters to add to begin- and
|
||||||
end- comment markers additionally to what `comment-add' already specifies."
|
end- comment markers additionally to what `comment-add' already specifies."
|
||||||
(interactive "*r\np")
|
(interactive "*r\np")
|
||||||
|
(comment-normalize-vars)
|
||||||
(let ((comment-style (if (cadr (assoc comment-style comment-styles))
|
(let ((comment-style (if (cadr (assoc comment-style comment-styles))
|
||||||
'box-multi 'box)))
|
'box-multi 'box)))
|
||||||
(comment-region beg end (+ comment-add arg))))
|
(comment-region beg end (+ comment-add arg))))
|
||||||
|
|
|
@ -285,7 +285,8 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
|
||||||
(and
|
(and
|
||||||
(cvs-or
|
(cvs-or
|
||||||
(cvs-match "warning: \\(.*\\) is not (any longer) pertinent$" (file 1))
|
(cvs-match "warning: \\(.*\\) is not (any longer) pertinent$" (file 1))
|
||||||
(cvs-match "\\(.*\\) is no longer in the repository$" (file 1)))
|
(cvs-match "`\\(.*\\)' is no longer in the repository$" (file 1))
|
||||||
|
(cvs-match "\\(.*\\) is no longer in the repository$" (file 1)))
|
||||||
(cvs-parsed-fileinfo
|
(cvs-parsed-fileinfo
|
||||||
(if dont-change-disc '(NEED-UPDATE . REMOVED) 'DEAD) file))
|
(if dont-change-disc '(NEED-UPDATE . REMOVED) 'DEAD) file))
|
||||||
|
|
||||||
|
|
|
@ -315,7 +315,7 @@ Also display the main routine in the disassembly buffer if present."
|
||||||
"Nil means just pop up the GUD buffer unless `gdb-show-main' is t.
|
"Nil means just pop up the GUD buffer unless `gdb-show-main' is t.
|
||||||
In this case it starts with two windows: one displaying the GUD
|
In this case it starts with two windows: one displaying the GUD
|
||||||
buffer and the other with the source file with the main routine
|
buffer and the other with the source file with the main routine
|
||||||
of the inferior. Non-nil means display the layout shown for
|
of the debugged program. Non-nil means display the layout shown for
|
||||||
`gdba'."
|
`gdba'."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:group 'gud
|
:group 'gud
|
||||||
|
@ -384,8 +384,7 @@ With arg, use separate IO iff arg is positive."
|
||||||
(list t nil) nil "-c"
|
(list t nil) nil "-c"
|
||||||
(concat gdb-cpp-define-alist-program " "
|
(concat gdb-cpp-define-alist-program " "
|
||||||
gdb-cpp-define-alist-flags)))))
|
gdb-cpp-define-alist-flags)))))
|
||||||
(define-list (split-string output "\n" t))
|
(define-list (split-string output "\n" t)) (name))
|
||||||
(name))
|
|
||||||
(setq gdb-define-alist nil)
|
(setq gdb-define-alist nil)
|
||||||
(dolist (define define-list)
|
(dolist (define define-list)
|
||||||
(setq name (nth 1 (split-string define "[( ]")))
|
(setq name (nth 1 (split-string define "[( ]")))
|
||||||
|
@ -1291,6 +1290,7 @@ not GDB."
|
||||||
(progn
|
(progn
|
||||||
(setq gud-running t)
|
(setq gud-running t)
|
||||||
(setq gdb-inferior-status "running")
|
(setq gdb-inferior-status "running")
|
||||||
|
(setq gdb-signalled nil)
|
||||||
(gdb-force-mode-line-update
|
(gdb-force-mode-line-update
|
||||||
(propertize gdb-inferior-status 'face font-lock-type-face))
|
(propertize gdb-inferior-status 'face font-lock-type-face))
|
||||||
(gdb-remove-text-properties)
|
(gdb-remove-text-properties)
|
||||||
|
@ -2639,8 +2639,11 @@ corresponding to the mode line clicked."
|
||||||
(defun gdb-frame-memory-buffer ()
|
(defun gdb-frame-memory-buffer ()
|
||||||
"Display memory contents in a new frame."
|
"Display memory contents in a new frame."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((special-display-regexps (append special-display-regexps '(".*")))
|
(let* ((special-display-regexps (append special-display-regexps '(".*")))
|
||||||
(special-display-frame-alist gdb-frame-parameters))
|
(special-display-frame-alist
|
||||||
|
(cons '(left-fringe . 0)
|
||||||
|
(cons '(right-fringe . 0)
|
||||||
|
(cons '(width . 83) gdb-frame-parameters)))))
|
||||||
(display-buffer (gdb-get-buffer-create 'gdb-memory-buffer))))
|
(display-buffer (gdb-get-buffer-create 'gdb-memory-buffer))))
|
||||||
|
|
||||||
|
|
||||||
|
@ -2657,6 +2660,7 @@ corresponding to the mode line clicked."
|
||||||
|
|
||||||
(defvar gdb-locals-watch-map
|
(defvar gdb-locals-watch-map
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
|
(suppress-keymap map)
|
||||||
(define-key map "\r" (lambda () (interactive)
|
(define-key map "\r" (lambda () (interactive)
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(gud-watch)))
|
(gud-watch)))
|
||||||
|
@ -3512,10 +3516,32 @@ in_scope=\"\\(.*?\\)\".*?}")
|
||||||
|
|
||||||
(defvar gdb-locals-watch-map-1
|
(defvar gdb-locals-watch-map-1
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
|
(suppress-keymap map)
|
||||||
|
(define-key map "\r" 'gud-watch)
|
||||||
(define-key map [mouse-2] 'gud-watch)
|
(define-key map [mouse-2] 'gud-watch)
|
||||||
map)
|
map)
|
||||||
"Keymap to create watch expression of a complex data type local variable.")
|
"Keymap to create watch expression of a complex data type local variable.")
|
||||||
|
|
||||||
|
(defvar gdb-edit-locals-map-1
|
||||||
|
(let ((map (make-sparse-keymap)))
|
||||||
|
(suppress-keymap map)
|
||||||
|
(define-key map "\r" 'gdb-edit-locals-value)
|
||||||
|
(define-key map [mouse-2] 'gdb-edit-locals-value)
|
||||||
|
map)
|
||||||
|
"Keymap to edit value of a simple data type local variable.")
|
||||||
|
|
||||||
|
(defun gdb-edit-locals-value (&optional event)
|
||||||
|
"Assign a value to a variable displayed in the locals buffer."
|
||||||
|
(interactive (list last-input-event))
|
||||||
|
(save-excursion
|
||||||
|
(if event (posn-set-point (event-end event)))
|
||||||
|
(beginning-of-line)
|
||||||
|
(let* ((var (current-word))
|
||||||
|
(value (read-string (format "New value (%s): " var))))
|
||||||
|
(gdb-enqueue-input
|
||||||
|
(list (concat gdb-server-prefix"set variable " var " = " value "\n")
|
||||||
|
'ignore)))))
|
||||||
|
|
||||||
;; Dont display values of arrays or structures.
|
;; Dont display values of arrays or structures.
|
||||||
;; These can be expanded using gud-watch.
|
;; These can be expanded using gud-watch.
|
||||||
(defun gdb-stack-list-locals-handler ()
|
(defun gdb-stack-list-locals-handler ()
|
||||||
|
@ -3543,20 +3569,26 @@ in_scope=\"\\(.*?\\)\".*?}")
|
||||||
(let* ((window (get-buffer-window buf 0))
|
(let* ((window (get-buffer-window buf 0))
|
||||||
(start (window-start window))
|
(start (window-start window))
|
||||||
(p (window-point window))
|
(p (window-point window))
|
||||||
(buffer-read-only nil))
|
(buffer-read-only nil) (name) (value))
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(dolist (local locals-list)
|
(dolist (local locals-list)
|
||||||
(setq name (car local))
|
(setq name (car local))
|
||||||
(if (or (not (nth 2 local))
|
(setq value (nth 2 local))
|
||||||
(string-match "^\\0x" (nth 2 local)))
|
(if (or (not value)
|
||||||
|
(string-match "^\\0x" value))
|
||||||
(add-text-properties 0 (length name)
|
(add-text-properties 0 (length name)
|
||||||
`(mouse-face highlight
|
`(mouse-face highlight
|
||||||
help-echo "mouse-2: create watch expression"
|
help-echo "mouse-2: create watch expression"
|
||||||
local-map ,gdb-locals-watch-map-1)
|
local-map ,gdb-locals-watch-map-1)
|
||||||
name))
|
name)
|
||||||
|
(add-text-properties 0 (length value)
|
||||||
|
`(mouse-face highlight
|
||||||
|
help-echo "mouse-2: edit value"
|
||||||
|
local-map ,gdb-edit-locals-map-1)
|
||||||
|
value))
|
||||||
(insert
|
(insert
|
||||||
(concat name "\t" (nth 1 local)
|
(concat name "\t" (nth 1 local)
|
||||||
"\t" (nth 2 local) "\n")))
|
"\t" value "\n")))
|
||||||
(set-window-start window start)
|
(set-window-start window start)
|
||||||
(set-window-point window p))))))))
|
(set-window-point window p))))))))
|
||||||
|
|
||||||
|
|
|
@ -335,7 +335,7 @@ This variable's value takes effect when `grep-compute-defaults' is called.")
|
||||||
(defvar grep-find-use-xargs nil
|
(defvar grep-find-use-xargs nil
|
||||||
"Whether \\[grep-find] uses the `xargs' utility by default.
|
"Whether \\[grep-find] uses the `xargs' utility by default.
|
||||||
|
|
||||||
If nil, it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0';
|
If `exec', it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0';
|
||||||
if not nil and not `gnu', it uses `find -print' and `xargs'.
|
if not nil and not `gnu', it uses `find -print' and `xargs'.
|
||||||
|
|
||||||
This variable's value takes effect when `grep-compute-defaults' is called.")
|
This variable's value takes effect when `grep-compute-defaults' is called.")
|
||||||
|
@ -419,21 +419,29 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
|
||||||
(format "%s <C> %s <R> <F>" grep-program grep-options)))
|
(format "%s <C> %s <R> <F>" grep-program grep-options)))
|
||||||
(unless grep-find-use-xargs
|
(unless grep-find-use-xargs
|
||||||
(setq grep-find-use-xargs
|
(setq grep-find-use-xargs
|
||||||
(if (and
|
(cond
|
||||||
(grep-probe find-program `(nil nil nil ,null-device "-print0"))
|
((and
|
||||||
(grep-probe "xargs" `(nil nil nil "-0" "-e" "echo")))
|
(grep-probe find-program `(nil nil nil ,null-device "-print0"))
|
||||||
'gnu)))
|
(grep-probe "xargs" `(nil nil nil "-0" "-e" "echo")))
|
||||||
|
'gnu)
|
||||||
|
(t
|
||||||
|
'exec))))
|
||||||
(unless grep-find-command
|
(unless grep-find-command
|
||||||
(setq grep-find-command
|
(setq grep-find-command
|
||||||
(cond ((eq grep-find-use-xargs 'gnu)
|
(cond ((eq grep-find-use-xargs 'gnu)
|
||||||
(format "%s . -type f -print0 | xargs -0 -e %s"
|
(format "%s . -type f -print0 | xargs -0 -e %s"
|
||||||
find-program grep-command))
|
find-program grep-command))
|
||||||
(grep-find-use-xargs
|
((eq grep-find-use-xargs 'exec)
|
||||||
|
(let ((cmd0 (format "%s . -type f -exec %s"
|
||||||
|
find-program grep-command)))
|
||||||
|
(cons
|
||||||
|
(format "%s {} %s %s"
|
||||||
|
cmd0 null-device
|
||||||
|
(shell-quote-argument ";"))
|
||||||
|
(1+ (length cmd0)))))
|
||||||
|
(t
|
||||||
(format "%s . -type f -print | xargs %s"
|
(format "%s . -type f -print | xargs %s"
|
||||||
find-program grep-command))
|
find-program grep-command)))))
|
||||||
(t (cons (format "%s . -type f -exec %s {} %s \\;"
|
|
||||||
find-program grep-command null-device)
|
|
||||||
(+ 22 (length grep-command)))))))
|
|
||||||
(unless grep-find-template
|
(unless grep-find-template
|
||||||
(setq grep-find-template
|
(setq grep-find-template
|
||||||
(let ((gcmd (format "%s <C> %s <R>"
|
(let ((gcmd (format "%s <C> %s <R>"
|
||||||
|
@ -441,11 +449,13 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
|
||||||
(cond ((eq grep-find-use-xargs 'gnu)
|
(cond ((eq grep-find-use-xargs 'gnu)
|
||||||
(format "%s . <X> -type f <F> -print0 | xargs -0 -e %s"
|
(format "%s . <X> -type f <F> -print0 | xargs -0 -e %s"
|
||||||
find-program gcmd))
|
find-program gcmd))
|
||||||
(grep-find-use-xargs
|
((eq grep-find-use-xargs 'exec)
|
||||||
|
(format "%s . <X> -type f <F> -exec %s {} %s %s"
|
||||||
|
find-program gcmd null-device
|
||||||
|
(shell-quote-argument ";")))
|
||||||
|
(t
|
||||||
(format "%s . <X> -type f <F> -print | xargs %s"
|
(format "%s . <X> -type f <F> -print | xargs %s"
|
||||||
find-program gcmd))
|
find-program gcmd))))))))
|
||||||
(t (format "%s . <X> -type f <F> -exec %s {} %s \\;"
|
|
||||||
find-program gcmd null-device))))))))
|
|
||||||
(unless (or (not grep-highlight-matches) (eq grep-highlight-matches t))
|
(unless (or (not grep-highlight-matches) (eq grep-highlight-matches t))
|
||||||
(setq grep-highlight-matches
|
(setq grep-highlight-matches
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
@ -736,18 +746,26 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]."
|
||||||
(let ((command (grep-expand-template
|
(let ((command (grep-expand-template
|
||||||
grep-find-template
|
grep-find-template
|
||||||
regexp
|
regexp
|
||||||
(concat "\\( -name "
|
(concat (shell-quote-argument "(")
|
||||||
|
" -name "
|
||||||
(mapconcat #'shell-quote-argument
|
(mapconcat #'shell-quote-argument
|
||||||
(split-string files)
|
(split-string files)
|
||||||
" -o -name ")
|
" -o -name ")
|
||||||
" \\)")
|
" "
|
||||||
|
(shell-quote-argument ")"))
|
||||||
dir
|
dir
|
||||||
(and grep-find-ignored-directories
|
(and grep-find-ignored-directories
|
||||||
(concat "\\( -path '*/"
|
(concat (shell-quote-argument "(")
|
||||||
(mapconcat #'identity
|
;; we should use shell-quote-argument here
|
||||||
|
" -path "
|
||||||
|
(mapconcat #'(lambda (dir)
|
||||||
|
(shell-quote-argument
|
||||||
|
(concat "*/" dir)))
|
||||||
grep-find-ignored-directories
|
grep-find-ignored-directories
|
||||||
"' -o -path '*/")
|
" -o -path ")
|
||||||
"' \\) -prune -o ")))))
|
" "
|
||||||
|
(shell-quote-argument ")")
|
||||||
|
" -prune -o ")))))
|
||||||
(when command
|
(when command
|
||||||
(if current-prefix-arg
|
(if current-prefix-arg
|
||||||
(setq command
|
(setq command
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -181,12 +181,9 @@ the function is called."
|
||||||
|
|
||||||
;; this one is untouched --dv
|
;; this one is untouched --dv
|
||||||
(defun spaces-string (n)
|
(defun spaces-string (n)
|
||||||
|
"Returns a string with N spaces."
|
||||||
(if (<= n 8) (aref spaces-strings n)
|
(if (<= n 8) (aref spaces-strings n)
|
||||||
(let ((val ""))
|
(make-string n ? )))
|
||||||
(while (> n 8)
|
|
||||||
(setq val (concat " " val)
|
|
||||||
n (- n 8)))
|
|
||||||
(concat val (aref spaces-strings n)))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun delete-rectangle (start end &optional fill)
|
(defun delete-rectangle (start end &optional fill)
|
||||||
|
|
|
@ -899,7 +899,9 @@ and the greater of them is not at the start of a line."
|
||||||
|
|
||||||
(defun line-number-at-pos (&optional pos)
|
(defun line-number-at-pos (&optional pos)
|
||||||
"Return (narrowed) buffer line number at position POS.
|
"Return (narrowed) buffer line number at position POS.
|
||||||
If POS is nil, use current buffer location."
|
If POS is nil, use current buffer location.
|
||||||
|
Counting starts at (point-min), so the value refers
|
||||||
|
to the contents of the accessible portion of the buffer."
|
||||||
(let ((opoint (or pos (point))) start)
|
(let ((opoint (or pos (point))) start)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
160
lisp/startup.el
160
lisp/startup.el
|
@ -1269,11 +1269,16 @@ where FACE is a valid face specification, as it can be used with
|
||||||
"GNU Emacs is one component of the GNU/Linux operating system."
|
"GNU Emacs is one component of the GNU/Linux operating system."
|
||||||
"GNU Emacs is one component of the GNU operating system."))
|
"GNU Emacs is one component of the GNU operating system."))
|
||||||
(insert "\n")
|
(insert "\n")
|
||||||
(unless (equal (buffer-name fancy-splash-outer-buffer) "*scratch*")
|
(if fancy-splash-outer-buffer
|
||||||
(fancy-splash-insert :face 'variable-pitch
|
(fancy-splash-insert
|
||||||
(substitute-command-keys
|
:face 'variable-pitch
|
||||||
"Type \\[recenter] to begin editing your file.\n"))))
|
(substitute-command-keys
|
||||||
|
(concat
|
||||||
|
"Type \\[recenter] to begin editing"
|
||||||
|
(if (equal (buffer-name fancy-splash-outer-buffer)
|
||||||
|
"*scratch*")
|
||||||
|
".\n"
|
||||||
|
" your file.\n"))))))
|
||||||
|
|
||||||
(defun fancy-splash-tail ()
|
(defun fancy-splash-tail ()
|
||||||
"Insert the tail part of the splash screen into the current buffer."
|
"Insert the tail part of the splash screen into the current buffer."
|
||||||
|
@ -1343,47 +1348,65 @@ mouse."
|
||||||
(throw 'exit nil))
|
(throw 'exit nil))
|
||||||
|
|
||||||
|
|
||||||
(defun fancy-splash-screens ()
|
(defun fancy-splash-screens (&optional hide-on-input)
|
||||||
"Display fancy splash screens when Emacs starts."
|
"Display fancy splash screens when Emacs starts."
|
||||||
(setq fancy-splash-help-echo (startup-echo-area-message))
|
(setq fancy-splash-help-echo (startup-echo-area-message))
|
||||||
(let ((old-hourglass display-hourglass)
|
(if hide-on-input
|
||||||
(fancy-splash-outer-buffer (current-buffer))
|
(let ((old-hourglass display-hourglass)
|
||||||
splash-buffer
|
(fancy-splash-outer-buffer (current-buffer))
|
||||||
(old-minor-mode-map-alist minor-mode-map-alist)
|
splash-buffer
|
||||||
(old-emulation-mode-map-alists emulation-mode-map-alists)
|
(old-minor-mode-map-alist minor-mode-map-alist)
|
||||||
(frame (fancy-splash-frame))
|
(old-emulation-mode-map-alists emulation-mode-map-alists)
|
||||||
timer)
|
(frame (fancy-splash-frame))
|
||||||
(save-selected-window
|
timer)
|
||||||
(select-frame frame)
|
(save-selected-window
|
||||||
(switch-to-buffer "GNU Emacs")
|
(select-frame frame)
|
||||||
(setq tab-width 20)
|
(switch-to-buffer "GNU Emacs")
|
||||||
(setq splash-buffer (current-buffer))
|
(setq tab-width 20)
|
||||||
(catch 'stop-splashing
|
(setq splash-buffer (current-buffer))
|
||||||
(unwind-protect
|
(catch 'stop-splashing
|
||||||
(let ((map (make-sparse-keymap)))
|
(unwind-protect
|
||||||
(use-local-map map)
|
(let ((map (make-sparse-keymap)))
|
||||||
(define-key map [switch-frame] 'ignore)
|
(use-local-map map)
|
||||||
(define-key map [t] 'fancy-splash-default-action)
|
(define-key map [switch-frame] 'ignore)
|
||||||
(define-key map [mouse-movement] 'ignore)
|
(define-key map [t] 'fancy-splash-default-action)
|
||||||
(define-key map [mode-line t] 'ignore)
|
(define-key map [mouse-movement] 'ignore)
|
||||||
(setq cursor-type nil
|
(define-key map [mode-line t] 'ignore)
|
||||||
display-hourglass nil
|
(setq cursor-type nil
|
||||||
minor-mode-map-alist nil
|
display-hourglass nil
|
||||||
emulation-mode-map-alists nil
|
minor-mode-map-alist nil
|
||||||
buffer-undo-list t
|
emulation-mode-map-alists nil
|
||||||
mode-line-format (propertize "---- %b %-"
|
buffer-undo-list t
|
||||||
'face 'mode-line-buffer-id)
|
mode-line-format (propertize "---- %b %-"
|
||||||
fancy-splash-stop-time (+ (float-time)
|
'face 'mode-line-buffer-id)
|
||||||
fancy-splash-max-time)
|
fancy-splash-stop-time (+ (float-time)
|
||||||
timer (run-with-timer 0 fancy-splash-delay
|
fancy-splash-max-time)
|
||||||
#'fancy-splash-screens-1
|
timer (run-with-timer 0 fancy-splash-delay
|
||||||
splash-buffer))
|
#'fancy-splash-screens-1
|
||||||
(recursive-edit))
|
splash-buffer))
|
||||||
(cancel-timer timer)
|
(recursive-edit))
|
||||||
(setq display-hourglass old-hourglass
|
(cancel-timer timer)
|
||||||
minor-mode-map-alist old-minor-mode-map-alist
|
(setq display-hourglass old-hourglass
|
||||||
emulation-mode-map-alists old-emulation-mode-map-alists)
|
minor-mode-map-alist old-minor-mode-map-alist
|
||||||
(kill-buffer splash-buffer))))))
|
emulation-mode-map-alists old-emulation-mode-map-alists)
|
||||||
|
(kill-buffer splash-buffer)))))
|
||||||
|
;; If hide-on-input is non-nil, don't hide the buffer on input.
|
||||||
|
(if (or (window-minibuffer-p)
|
||||||
|
(window-dedicated-p (selected-window)))
|
||||||
|
(pop-to-buffer (current-buffer))
|
||||||
|
(switch-to-buffer "GNU Emacs"))
|
||||||
|
(erase-buffer)
|
||||||
|
(if pure-space-overflow
|
||||||
|
(insert "\
|
||||||
|
Warning Warning!!! Pure space overflow !!!Warning Warning
|
||||||
|
\(See the node Pure Storage in the Lisp manual for details.)\n"))
|
||||||
|
(let (fancy-splash-outer-buffer)
|
||||||
|
(fancy-splash-head)
|
||||||
|
(dolist (text fancy-splash-text)
|
||||||
|
(apply #'fancy-splash-insert text))
|
||||||
|
(fancy-splash-tail)
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
|
(goto-char (point-min)))))
|
||||||
|
|
||||||
(defun fancy-splash-frame ()
|
(defun fancy-splash-frame ()
|
||||||
"Return the frame to use for the fancy splash screen.
|
"Return the frame to use for the fancy splash screen.
|
||||||
|
@ -1414,14 +1437,16 @@ we put it on this frame."
|
||||||
(> window-height (+ image-height 19)))))))
|
(> window-height (+ image-height 19)))))))
|
||||||
|
|
||||||
|
|
||||||
(defun normal-splash-screen ()
|
(defun normal-splash-screen (&optional hide-on-input)
|
||||||
"Display splash screen when Emacs starts."
|
"Display splash screen when Emacs starts."
|
||||||
(let ((prev-buffer (current-buffer)))
|
(let ((prev-buffer (current-buffer)))
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(with-current-buffer (get-buffer-create "GNU Emacs")
|
(with-current-buffer (get-buffer-create "GNU Emacs")
|
||||||
|
(erase-buffer)
|
||||||
(set (make-local-variable 'tab-width) 8)
|
(set (make-local-variable 'tab-width) 8)
|
||||||
(set (make-local-variable 'mode-line-format)
|
(if hide-on-input
|
||||||
(propertize "---- %b %-" 'face 'mode-line-buffer-id))
|
(set (make-local-variable 'mode-line-format)
|
||||||
|
(propertize "---- %b %-" 'face 'mode-line-buffer-id)))
|
||||||
|
|
||||||
(if pure-space-overflow
|
(if pure-space-overflow
|
||||||
(insert "\
|
(insert "\
|
||||||
|
@ -1437,9 +1462,13 @@ Warning Warning!!! Pure space overflow !!!Warning Warning
|
||||||
", one component of the GNU/Linux operating system.\n"
|
", one component of the GNU/Linux operating system.\n"
|
||||||
", a part of the GNU operating system.\n"))
|
", a part of the GNU operating system.\n"))
|
||||||
|
|
||||||
(unless (equal (buffer-name prev-buffer) "*scratch*")
|
(if hide-on-input
|
||||||
(insert (substitute-command-keys
|
(insert (substitute-command-keys
|
||||||
"\nType \\[recenter] to begin editing your file.\n")))
|
(concat
|
||||||
|
"\nType \\[recenter] to begin editing"
|
||||||
|
(if (equal (buffer-name prev-buffer) "*scratch*")
|
||||||
|
".\n"
|
||||||
|
" your file.\n")))))
|
||||||
|
|
||||||
(if (display-mouse-p)
|
(if (display-mouse-p)
|
||||||
;; The user can use the mouse to activate menus
|
;; The user can use the mouse to activate menus
|
||||||
|
@ -1553,17 +1582,20 @@ Type \\[describe-distribution] for information on getting the latest version."))
|
||||||
;; Display the input that we set up in the buffer.
|
;; Display the input that we set up in the buffer.
|
||||||
(set-buffer-modified-p nil)
|
(set-buffer-modified-p nil)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(if (or (window-minibuffer-p)
|
(if (or (window-minibuffer-p)
|
||||||
(window-dedicated-p (selected-window)))
|
(window-dedicated-p (selected-window)))
|
||||||
;; There's no point is using pop-to-buffer since creating
|
;; If hide-on-input is nil, creating a new frame will
|
||||||
;; a new frame will generate enough events that the
|
;; generate enough events that the subsequent `sit-for'
|
||||||
;; subsequent `sit-for' will immediately return anyway.
|
;; will immediately return anyway.
|
||||||
nil ;; (pop-to-buffer (current-buffer))
|
(pop-to-buffer (current-buffer))
|
||||||
(save-window-excursion
|
(if hide-on-input
|
||||||
(switch-to-buffer (current-buffer))
|
(save-window-excursion
|
||||||
(sit-for 120))))
|
(switch-to-buffer (current-buffer))
|
||||||
|
(sit-for 120))
|
||||||
|
(switch-to-buffer (current-buffer)))))
|
||||||
;; Unwind ... ensure splash buffer is killed
|
;; Unwind ... ensure splash buffer is killed
|
||||||
(kill-buffer "GNU Emacs"))))
|
(if hide-on-input
|
||||||
|
(kill-buffer "GNU Emacs")))))
|
||||||
|
|
||||||
|
|
||||||
(defun startup-echo-area-message ()
|
(defun startup-echo-area-message ()
|
||||||
|
@ -1579,14 +1611,14 @@ Type \\[describe-distribution] for information on getting the latest version."))
|
||||||
(message "%s" (startup-echo-area-message))))
|
(message "%s" (startup-echo-area-message))))
|
||||||
|
|
||||||
|
|
||||||
(defun display-splash-screen ()
|
(defun display-splash-screen (&optional hide-on-input)
|
||||||
"Display splash screen according to display.
|
"Display splash screen according to display.
|
||||||
Fancy splash screens are used on graphic displays,
|
Fancy splash screens are used on graphic displays,
|
||||||
normal otherwise."
|
normal otherwise."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (use-fancy-splash-screens-p)
|
(if (use-fancy-splash-screens-p)
|
||||||
(fancy-splash-screens)
|
(fancy-splash-screens hide-on-input)
|
||||||
(normal-splash-screen)))
|
(normal-splash-screen hide-on-input)))
|
||||||
|
|
||||||
|
|
||||||
(defun command-line-1 (command-line-args-left)
|
(defun command-line-1 (command-line-args-left)
|
||||||
|
@ -1889,7 +1921,7 @@ normal otherwise."
|
||||||
;; If user typed input during all that work,
|
;; If user typed input during all that work,
|
||||||
;; abort the startup screen. Otherwise, display it now.
|
;; abort the startup screen. Otherwise, display it now.
|
||||||
(unless (input-pending-p)
|
(unless (input-pending-p)
|
||||||
(display-splash-screen))))
|
(display-splash-screen t))))
|
||||||
|
|
||||||
|
|
||||||
(defun command-line-normalize-file-name (file)
|
(defun command-line-normalize-file-name (file)
|
||||||
|
|
|
@ -1589,7 +1589,7 @@ in `selection-converter-alist', which see."
|
||||||
(put 'autosave-now 'mac-apple-event-id "asav") ; kAEAutosaveNow
|
(put 'autosave-now 'mac-apple-event-id "asav") ; kAEAutosaveNow
|
||||||
;; kAEInternetEventClass
|
;; kAEInternetEventClass
|
||||||
(put 'get-url 'mac-apple-event-id "GURL") ; kAEGetURL
|
(put 'get-url 'mac-apple-event-id "GURL") ; kAEGetURL
|
||||||
;; Converted HICommand events
|
;; Converted HI command events
|
||||||
(put 'about 'mac-apple-event-id "abou") ; kHICommandAbout
|
(put 'about 'mac-apple-event-id "abou") ; kHICommandAbout
|
||||||
|
|
||||||
(defmacro mac-event-spec (event)
|
(defmacro mac-event-spec (event)
|
||||||
|
@ -1789,7 +1789,7 @@ Currently the `mailto' scheme is supported."
|
||||||
|
|
||||||
(define-key mac-apple-event-map [internet-event get-url] 'mac-ae-get-url)
|
(define-key mac-apple-event-map [internet-event get-url] 'mac-ae-get-url)
|
||||||
|
|
||||||
(define-key mac-apple-event-map [hicommand about] 'display-splash-screen)
|
(define-key mac-apple-event-map [hi-command about] 'display-splash-screen)
|
||||||
|
|
||||||
;;; Converted Carbon Events
|
;;; Converted Carbon Events
|
||||||
(defun mac-handle-toolbar-switch-mode (event)
|
(defun mac-handle-toolbar-switch-mode (event)
|
||||||
|
@ -2258,7 +2258,8 @@ See also `mac-dnd-known-types'."
|
||||||
;; If dropping in an ordinary window which we could use,
|
;; If dropping in an ordinary window which we could use,
|
||||||
;; let dnd-open-file-other-window specify what to do.
|
;; let dnd-open-file-other-window specify what to do.
|
||||||
(progn
|
(progn
|
||||||
(goto-char (posn-point (event-start event)))
|
(when (not mouse-yank-at-point)
|
||||||
|
(goto-char (posn-point (event-start event))))
|
||||||
(funcall handler window action data))
|
(funcall handler window action data))
|
||||||
;; If we can't display the file here,
|
;; If we can't display the file here,
|
||||||
;; make a new window for it.
|
;; make a new window for it.
|
||||||
|
@ -2433,8 +2434,8 @@ It returns a name of the created fontset."
|
||||||
|
|
||||||
;; Initiate drag and drop
|
;; Initiate drag and drop
|
||||||
|
|
||||||
(global-set-key [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
|
(define-key special-event-map [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
|
||||||
(global-set-key [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
|
(define-key special-event-map [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
|
||||||
|
|
||||||
|
|
||||||
;;;; Non-toolkit Scroll bars
|
;;;; Non-toolkit Scroll bars
|
||||||
|
|
|
@ -9467,6 +9467,7 @@ onto the ring."
|
||||||
"Follow a Gnus link to GROUP and ARTICLE."
|
"Follow a Gnus link to GROUP and ARTICLE."
|
||||||
(require 'gnus)
|
(require 'gnus)
|
||||||
(funcall (cdr (assq 'gnus org-link-frame-setup)))
|
(funcall (cdr (assq 'gnus org-link-frame-setup)))
|
||||||
|
(if gnus-other-frame-object (select-frame gnus-other-frame-object))
|
||||||
(if group (gnus-fetch-group group))
|
(if group (gnus-fetch-group group))
|
||||||
(if article
|
(if article
|
||||||
(or (gnus-summary-goto-article article nil 'force)
|
(or (gnus-summary-goto-article article nil 'force)
|
||||||
|
|
|
@ -172,12 +172,12 @@
|
||||||
:group 'multimedia)
|
:group 'multimedia)
|
||||||
|
|
||||||
(defcustom tumme-dir "~/.emacs.d/tumme/"
|
(defcustom tumme-dir "~/.emacs.d/tumme/"
|
||||||
"*Directory where thumbnail images are stored."
|
"Directory where thumbnail images are stored."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-thumbnail-storage 'use-tumme-dir
|
(defcustom tumme-thumbnail-storage 'use-tumme-dir
|
||||||
"*How to store tumme's thumbnail files.
|
"How to store tumme's thumbnail files.
|
||||||
Tumme can store thumbnail files in one of two ways and this is
|
Tumme can store thumbnail files in one of two ways and this is
|
||||||
controlled by this variable. \"Use tumme dir\" means that the
|
controlled by this variable. \"Use tumme dir\" means that the
|
||||||
thumbnails are stored in a central directory. \"Per directory\"
|
thumbnails are stored in a central directory. \"Per directory\"
|
||||||
|
@ -193,17 +193,17 @@ that allows sharing of thumbnails across different programs."
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-db-file "~/.emacs.d/tumme/.tumme_db"
|
(defcustom tumme-db-file "~/.emacs.d/tumme/.tumme_db"
|
||||||
"*Database file where file names and their associated tags are stored."
|
"Database file where file names and their associated tags are stored."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-temp-image-file "~/.emacs.d/tumme/.tumme_temp"
|
(defcustom tumme-temp-image-file "~/.emacs.d/tumme/.tumme_temp"
|
||||||
"*Name of temporary image file used by various commands."
|
"Name of temporary image file used by various commands."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-gallery-dir "~/.emacs.d/tumme/.tumme_gallery"
|
(defcustom tumme-gallery-dir "~/.emacs.d/tumme/.tumme_gallery"
|
||||||
"*Directory to store generated gallery html pages.
|
"Directory to store generated gallery html pages.
|
||||||
This path needs to be \"shared\" to the public so that it can access
|
This path needs to be \"shared\" to the public so that it can access
|
||||||
the index.html page that tumme creates."
|
the index.html page that tumme creates."
|
||||||
:type 'string
|
:type 'string
|
||||||
|
@ -211,7 +211,7 @@ the index.html page that tumme creates."
|
||||||
|
|
||||||
(defcustom tumme-gallery-image-root-url
|
(defcustom tumme-gallery-image-root-url
|
||||||
"http://your.own.server/tummepics"
|
"http://your.own.server/tummepics"
|
||||||
"*URL where the full size images are to be found.
|
"URL where the full size images are to be found.
|
||||||
Note that this path has to be configured in your web server. Tumme
|
Note that this path has to be configured in your web server. Tumme
|
||||||
expects to find pictures in this directory."
|
expects to find pictures in this directory."
|
||||||
:type 'string
|
:type 'string
|
||||||
|
@ -219,7 +219,7 @@ expects to find pictures in this directory."
|
||||||
|
|
||||||
(defcustom tumme-gallery-thumb-image-root-url
|
(defcustom tumme-gallery-thumb-image-root-url
|
||||||
"http://your.own.server/tummethumbs"
|
"http://your.own.server/tummethumbs"
|
||||||
"*URL where the thumbnail images are to be found.
|
"URL where the thumbnail images are to be found.
|
||||||
Note that this path has to be configured in your web server. Tumme
|
Note that this path has to be configured in your web server. Tumme
|
||||||
expects to find pictures in this directory."
|
expects to find pictures in this directory."
|
||||||
:type 'string
|
:type 'string
|
||||||
|
@ -227,14 +227,14 @@ expects to find pictures in this directory."
|
||||||
|
|
||||||
(defcustom tumme-cmd-create-thumbnail-program
|
(defcustom tumme-cmd-create-thumbnail-program
|
||||||
"convert"
|
"convert"
|
||||||
"*Executable used to create thumbnail.
|
"Executable used to create thumbnail.
|
||||||
Used together with `tumme-cmd-create-thumbnail-options'."
|
Used together with `tumme-cmd-create-thumbnail-options'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-create-thumbnail-options
|
(defcustom tumme-cmd-create-thumbnail-options
|
||||||
"%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
|
"%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
|
||||||
"*Format of command used to create thumbnail image.
|
"Format of command used to create thumbnail image.
|
||||||
Available options are %p which is replaced by
|
Available options are %p which is replaced by
|
||||||
`tumme-cmd-create-thumbnail-program', %w which is replaced by
|
`tumme-cmd-create-thumbnail-program', %w which is replaced by
|
||||||
`tumme-thumb-width', %h which is replaced by `tumme-thumb-height',
|
`tumme-thumb-width', %h which is replaced by `tumme-thumb-height',
|
||||||
|
@ -245,14 +245,14 @@ which is replaced by the file name of the thumbnail file."
|
||||||
|
|
||||||
(defcustom tumme-cmd-create-temp-image-program
|
(defcustom tumme-cmd-create-temp-image-program
|
||||||
"convert"
|
"convert"
|
||||||
"*Executable used to create temporary image.
|
"Executable used to create temporary image.
|
||||||
Used together with `tumme-cmd-create-temp-image-options'."
|
Used together with `tumme-cmd-create-temp-image-options'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-create-temp-image-options
|
(defcustom tumme-cmd-create-temp-image-options
|
||||||
"%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
|
"%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
|
||||||
"*Format of command used to create temporary image for display window.
|
"Format of command used to create temporary image for display window.
|
||||||
Available options are %p which is replaced by
|
Available options are %p which is replaced by
|
||||||
`tumme-cmd-create-temp-image-program', %w and %h which is replaced by
|
`tumme-cmd-create-temp-image-program', %w and %h which is replaced by
|
||||||
the calculated max size for width and height in the image display window,
|
the calculated max size for width and height in the image display window,
|
||||||
|
@ -262,13 +262,13 @@ is replaced by the file name of the temporary file."
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-pngnq-program (executable-find "pngnq")
|
(defcustom tumme-cmd-pngnq-program (executable-find "pngnq")
|
||||||
"*The file name of the `pngnq' program.
|
"The file name of the `pngnq' program.
|
||||||
It quantizes colors of PNG images down to 256 colors."
|
It quantizes colors of PNG images down to 256 colors."
|
||||||
:type '(choice (const :tag "Not Set" nil) string)
|
:type '(choice (const :tag "Not Set" nil) string)
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush")
|
(defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush")
|
||||||
"*The file name of the `pngcrush' program.
|
"The file name of the `pngcrush' program.
|
||||||
It optimizes the compression of PNG images. Also it adds PNG textual chunks
|
It optimizes the compression of PNG images. Also it adds PNG textual chunks
|
||||||
with the information required by the Thumbnail Managing Standard."
|
with the information required by the Thumbnail Managing Standard."
|
||||||
:type '(choice (const :tag "Not Set" nil) string)
|
:type '(choice (const :tag "Not Set" nil) string)
|
||||||
|
@ -305,20 +305,20 @@ with the information required by the Thumbnail Managing Standard."
|
||||||
"-text b \"Thumb::URI\" \"file://%f\" "
|
"-text b \"Thumb::URI\" \"file://%f\" "
|
||||||
"%q %t"
|
"%q %t"
|
||||||
" ; rm %q")))
|
" ; rm %q")))
|
||||||
"*Command to create thumbnails according to the Thumbnail Managing Standard."
|
"Command to create thumbnails according to the Thumbnail Managing Standard."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-rotate-thumbnail-program
|
(defcustom tumme-cmd-rotate-thumbnail-program
|
||||||
"mogrify"
|
"mogrify"
|
||||||
"*Executable used to rotate thumbnail.
|
"Executable used to rotate thumbnail.
|
||||||
Used together with `tumme-cmd-rotate-thumbnail-options'."
|
Used together with `tumme-cmd-rotate-thumbnail-options'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-rotate-thumbnail-options
|
(defcustom tumme-cmd-rotate-thumbnail-options
|
||||||
"%p -rotate %d \"%t\""
|
"%p -rotate %d \"%t\""
|
||||||
"*Format of command used to rotate thumbnail image.
|
"Format of command used to rotate thumbnail image.
|
||||||
Available options are %p which is replaced by
|
Available options are %p which is replaced by
|
||||||
`tumme-cmd-rotate-thumbnail-program', %d which is replaced by the
|
`tumme-cmd-rotate-thumbnail-program', %d which is replaced by the
|
||||||
number of (positive) degrees to rotate the image, normally 90 or 270
|
number of (positive) degrees to rotate the image, normally 90 or 270
|
||||||
|
@ -329,14 +329,14 @@ of the thumbnail file."
|
||||||
|
|
||||||
(defcustom tumme-cmd-rotate-original-program
|
(defcustom tumme-cmd-rotate-original-program
|
||||||
"jpegtran"
|
"jpegtran"
|
||||||
"*Executable used to rotate original image.
|
"Executable used to rotate original image.
|
||||||
Used together with `tumme-cmd-rotate-original-options'."
|
Used together with `tumme-cmd-rotate-original-options'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-rotate-original-options
|
(defcustom tumme-cmd-rotate-original-options
|
||||||
"%p -rotate %d -copy all \"%o\" > %t"
|
"%p -rotate %d -copy all \"%o\" > %t"
|
||||||
"*Format of command used to rotate original image.
|
"Format of command used to rotate original image.
|
||||||
Available options are %p which is replaced by
|
Available options are %p which is replaced by
|
||||||
`tumme-cmd-rotate-original-program', %d which is replaced by the
|
`tumme-cmd-rotate-original-program', %d which is replaced by the
|
||||||
number of (positive) degrees to rotate the image, normally 90 or
|
number of (positive) degrees to rotate the image, normally 90 or
|
||||||
|
@ -348,7 +348,7 @@ original image file name and %t which is replaced by
|
||||||
|
|
||||||
(defcustom tumme-temp-rotate-image-file
|
(defcustom tumme-temp-rotate-image-file
|
||||||
"~/.emacs.d/tumme/.tumme_rotate_temp"
|
"~/.emacs.d/tumme/.tumme_rotate_temp"
|
||||||
"*Temporary file for rotate operations."
|
"Temporary file for rotate operations."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
|
@ -361,14 +361,14 @@ original file with `tumme-temp-rotate-image-file'."
|
||||||
|
|
||||||
(defcustom tumme-cmd-write-exif-data-program
|
(defcustom tumme-cmd-write-exif-data-program
|
||||||
"exiftool"
|
"exiftool"
|
||||||
"*Program used to write EXIF data to image.
|
"Program used to write EXIF data to image.
|
||||||
Used together with `tumme-cmd-write-exif-data-options'."
|
Used together with `tumme-cmd-write-exif-data-options'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-write-exif-data-options
|
(defcustom tumme-cmd-write-exif-data-options
|
||||||
"%p -%t=\"%v\" \"%f\""
|
"%p -%t=\"%v\" \"%f\""
|
||||||
"*Format of command used to write EXIF data.
|
"Format of command used to write EXIF data.
|
||||||
Available options are %p which is replaced by
|
Available options are %p which is replaced by
|
||||||
`tumme-cmd-write-exif-data-program', %f which is replaced by the
|
`tumme-cmd-write-exif-data-program', %f which is replaced by the
|
||||||
image file name, %t which is replaced by the tag name and %v
|
image file name, %t which is replaced by the tag name and %v
|
||||||
|
@ -378,14 +378,14 @@ which is replaced by the tag value."
|
||||||
|
|
||||||
(defcustom tumme-cmd-read-exif-data-program
|
(defcustom tumme-cmd-read-exif-data-program
|
||||||
"exiftool"
|
"exiftool"
|
||||||
"*Program used to read EXIF data to image.
|
"Program used to read EXIF data to image.
|
||||||
Used together with `tumme-cmd-read-exif-data-program-options'."
|
Used together with `tumme-cmd-read-exif-data-program-options'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-cmd-read-exif-data-options
|
(defcustom tumme-cmd-read-exif-data-options
|
||||||
"%p -s -s -s -%t \"%f\""
|
"%p -s -s -s -%t \"%f\""
|
||||||
"*Format of command used to read EXIF data.
|
"Format of command used to read EXIF data.
|
||||||
Available options are %p which is replaced by
|
Available options are %p which is replaced by
|
||||||
`tumme-cmd-write-exif-data-options', %f which is replaced
|
`tumme-cmd-write-exif-data-options', %f which is replaced
|
||||||
by the image file name and %t which is replaced by the tag name."
|
by the image file name and %t which is replaced by the tag name."
|
||||||
|
@ -394,7 +394,7 @@ by the image file name and %t which is replaced by the tag name."
|
||||||
|
|
||||||
(defcustom tumme-gallery-hidden-tags
|
(defcustom tumme-gallery-hidden-tags
|
||||||
(list "private" "hidden" "pending")
|
(list "private" "hidden" "pending")
|
||||||
"*List of \"hidden\" tags.
|
"List of \"hidden\" tags.
|
||||||
Used by `tumme-gallery-generate' to leave out \"hidden\" images."
|
Used by `tumme-gallery-generate' to leave out \"hidden\" images."
|
||||||
:type '(repeat string)
|
:type '(repeat string)
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
@ -416,18 +416,18 @@ This is the default size for both `tumme-thumb-width' and `tumme-thumb-height'."
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-thumb-relief 2
|
(defcustom tumme-thumb-relief 2
|
||||||
"*Size of button-like border around thumbnails."
|
"Size of button-like border around thumbnails."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-thumb-margin 2
|
(defcustom tumme-thumb-margin 2
|
||||||
"*Size of the margin around thumbnails.
|
"Size of the margin around thumbnails.
|
||||||
This is where you see the cursor."
|
This is where you see the cursor."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-line-up-method 'dynamic
|
(defcustom tumme-line-up-method 'dynamic
|
||||||
"*Default method for line-up of thumbnails in thumbnail buffer.
|
"Default method for line-up of thumbnails in thumbnail buffer.
|
||||||
Used by `tumme-display-thumbs' and other functions that needs to
|
Used by `tumme-display-thumbs' and other functions that needs to
|
||||||
line-up thumbnails. Dynamic means to use the available width of the
|
line-up thumbnails. Dynamic means to use the available width of the
|
||||||
window containing the thumbnail buffer, Fixed means to use
|
window containing the thumbnail buffer, Fixed means to use
|
||||||
|
@ -441,19 +441,19 @@ line-up means that no automatic line-up will be done."
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-thumbs-per-row 3
|
(defcustom tumme-thumbs-per-row 3
|
||||||
"*Number of thumbnails to display per row in thumb buffer."
|
"Number of thumbnails to display per row in thumb buffer."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-display-window-width-correction 1
|
(defcustom tumme-display-window-width-correction 1
|
||||||
"*Number to be used to correct image display window width.
|
"Number to be used to correct image display window width.
|
||||||
Change if the default (1) does not work (i.e. if the image does not
|
Change if the default (1) does not work (i.e. if the image does not
|
||||||
completely fit)."
|
completely fit)."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-display-window-height-correction 0
|
(defcustom tumme-display-window-height-correction 0
|
||||||
"*Number to be used to correct image display window height.
|
"Number to be used to correct image display window height.
|
||||||
Change if the default (0) does not work (i.e. if the image does not
|
Change if the default (0) does not work (i.e. if the image does not
|
||||||
completely fit)."
|
completely fit)."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
|
@ -487,7 +487,7 @@ dired and you might want to turn it off."
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-display-properties-format "%b: %f (%t): %c"
|
(defcustom tumme-display-properties-format "%b: %f (%t): %c"
|
||||||
"*Display format for thumbnail properties.
|
"Display format for thumbnail properties.
|
||||||
%b is replaced with associated dired buffer name, %f with file name
|
%b is replaced with associated dired buffer name, %f with file name
|
||||||
\(without path) of original image file, %t with the list of tags and %c
|
\(without path) of original image file, %t with the list of tags and %c
|
||||||
with the comment."
|
with the comment."
|
||||||
|
@ -500,20 +500,20 @@ with the comment."
|
||||||
(cond ((executable-find "display"))
|
(cond ((executable-find "display"))
|
||||||
((executable-find "xli"))
|
((executable-find "xli"))
|
||||||
((executable-find "qiv") "qiv -t"))
|
((executable-find "qiv") "qiv -t"))
|
||||||
"*Name of external viewer.
|
"Name of external viewer.
|
||||||
Including parameters. Used when displaying original image from
|
Including parameters. Used when displaying original image from
|
||||||
`tumme-thumbnail-mode'."
|
`tumme-thumbnail-mode'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-main-image-directory "~/pics/"
|
(defcustom tumme-main-image-directory "~/pics/"
|
||||||
"*Name of main image directory, if any.
|
"Name of main image directory, if any.
|
||||||
Used by `tumme-copy-with-exif-file-name'."
|
Used by `tumme-copy-with-exif-file-name'."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
||||||
(defcustom tumme-show-all-from-dir-max-files 50
|
(defcustom tumme-show-all-from-dir-max-files 50
|
||||||
"*Maximum number of files to show using `tumme-show-all-from-dir'.
|
"Maximum number of files to show using `tumme-show-all-from-dir'.
|
||||||
before warning the user."
|
before warning the user."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
:group 'tumme)
|
:group 'tumme)
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* url-handlers.el (url-file-local-copy): Tell url-copy-file that the
|
||||||
|
dest file will already exist.
|
||||||
|
|
||||||
2006-07-31 Stefan Monnier <monnier@iro.umontreal.ca>
|
2006-07-31 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
* url-util.el (url-hexify-string): Only utf-8 encode if it's
|
* url-util.el (url-hexify-string): Only utf-8 encode if it's
|
||||||
|
|
|
@ -213,7 +213,7 @@ A prefix arg makes KEEP-TIME non-nil."
|
||||||
Returns the name of the local copy, or nil, if FILE is directly
|
Returns the name of the local copy, or nil, if FILE is directly
|
||||||
accessible."
|
accessible."
|
||||||
(let ((filename (make-temp-file "url")))
|
(let ((filename (make-temp-file "url")))
|
||||||
(url-copy-file url filename)
|
(url-copy-file url filename 'ok-if-already-exists)
|
||||||
filename))
|
filename))
|
||||||
|
|
||||||
(defun url-insert (buffer &optional beg end)
|
(defun url-insert (buffer &optional beg end)
|
||||||
|
|
|
@ -518,13 +518,15 @@ and:
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun whitespace-cleanup ()
|
(defun whitespace-cleanup ()
|
||||||
"Cleanup the five different kinds of whitespace problems.
|
"Cleanup the five different kinds of whitespace problems.
|
||||||
|
It normally applies to the whole buffer, but in Transient Mark mode
|
||||||
|
when the mark is active it applies to the region.
|
||||||
See `whitespace-buffer' docstring for a summary of the problems."
|
See `whitespace-buffer' docstring for a summary of the problems."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (and transient-mark-mode mark-active)
|
(if (and transient-mark-mode mark-active)
|
||||||
(whitespace-cleanup-region (region-beginning) (region-end))
|
(whitespace-cleanup-region (region-beginning) (region-end))
|
||||||
(whitespace-cleanup-internal)))
|
(whitespace-cleanup-internal)))
|
||||||
|
|
||||||
(defun whitespace-cleanup-internal ()
|
(defun whitespace-cleanup-internal (&optional region-only)
|
||||||
;; If this buffer really contains a file, then run, else quit.
|
;; If this buffer really contains a file, then run, else quit.
|
||||||
(whitespace-check-whitespace-mode current-prefix-arg)
|
(whitespace-check-whitespace-mode current-prefix-arg)
|
||||||
(if (and buffer-file-name whitespace-mode)
|
(if (and buffer-file-name whitespace-mode)
|
||||||
|
@ -569,9 +571,12 @@ See `whitespace-buffer' docstring for a summary of the problems."
|
||||||
;; Call this recursively till everything is taken care of
|
;; Call this recursively till everything is taken care of
|
||||||
(if whitespace-any
|
(if whitespace-any
|
||||||
(whitespace-cleanup-internal)
|
(whitespace-cleanup-internal)
|
||||||
|
;; if we are done, talk to the user
|
||||||
(progn
|
(progn
|
||||||
(if (not whitespace-silent)
|
(unless whitespace-silent
|
||||||
(message "%s clean" buffer-file-name))
|
(if region-only
|
||||||
|
(message "The region is now clean")
|
||||||
|
(message "%s is now clean" buffer-file-name)))
|
||||||
(whitespace-update-modeline)))
|
(whitespace-update-modeline)))
|
||||||
(setq tab-width whitespace-tabwith-saved))))
|
(setq tab-width whitespace-tabwith-saved))))
|
||||||
|
|
||||||
|
@ -582,7 +587,7 @@ See `whitespace-buffer' docstring for a summary of the problems."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(narrow-to-region s e)
|
(narrow-to-region s e)
|
||||||
(whitespace-cleanup-internal))
|
(whitespace-cleanup-internal t))
|
||||||
(whitespace-buffer t)))
|
(whitespace-buffer t)))
|
||||||
|
|
||||||
(defun whitespace-buffer-leading ()
|
(defun whitespace-buffer-leading ()
|
||||||
|
|
|
@ -325,7 +325,8 @@ nil if not."
|
||||||
;; If dropping in an ordinary window which we could use,
|
;; If dropping in an ordinary window which we could use,
|
||||||
;; let dnd-open-file-other-window specify what to do.
|
;; let dnd-open-file-other-window specify what to do.
|
||||||
(progn
|
(progn
|
||||||
(goto-char (posn-point (event-start event)))
|
(when (not mouse-yank-at-point)
|
||||||
|
(goto-char (posn-point (event-start event))))
|
||||||
(funcall handler window action data))
|
(funcall handler window action data))
|
||||||
;; If we can't display the file here,
|
;; If we can't display the file here,
|
||||||
;; make a new window for it.
|
;; make a new window for it.
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
2006-08-21 Robert J. Chassell <bob@rattlesnake.com>
|
||||||
|
|
||||||
|
* emacs-lisp-intro.texi: deleted in directory copy of texinfo.tex
|
||||||
|
and pointed towards ../man/texinfo.tex so only one file
|
||||||
|
needs updating. Added comment of what to do when building on own.
|
||||||
|
|
||||||
|
* texinfo.tex: changed to version 2006-02-13.16
|
||||||
|
to enable a DVI build using the more recent versions of TeX.
|
||||||
|
|
||||||
2006-05-25 David Kastrup <dak@gnu.org>
|
2006-05-25 David Kastrup <dak@gnu.org>
|
||||||
|
|
||||||
* emacs-lisp-intro.texi (setcar): replace an antelope rather than
|
* emacs-lisp-intro.texi (setcar): replace an antelope rather than
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
\input texinfo @c -*-texinfo-*-
|
\input ../man/texinfo @c -*-texinfo-*-
|
||||||
|
@c change above to \input texinfo if building on own.
|
||||||
@comment %**start of header
|
@comment %**start of header
|
||||||
@setfilename ../info/eintr
|
@setfilename ../info/eintr
|
||||||
@c setfilename emacs-lisp-intro.info
|
@c setfilename emacs-lisp-intro.info
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,28 @@
|
||||||
|
2006-08-27 Michael Olson <mwolson@gnu.org>
|
||||||
|
|
||||||
|
* processes.texi (Transaction Queues): Remove stray quote
|
||||||
|
character.
|
||||||
|
|
||||||
|
2006-08-25 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* os.texi (Idle Timers): run-with-idle-timer allows Lisp time value.
|
||||||
|
Add xref.
|
||||||
|
|
||||||
|
2006-08-24 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
|
* os.texi (Timers): Avoid waiting inside timers.
|
||||||
|
|
||||||
|
2006-08-21 Lute Kamstra <lute@gnu.org>
|
||||||
|
|
||||||
|
* Makefile.in: Use ../man/texinfo.tex to build elisp.dvi.
|
||||||
|
|
||||||
|
2006-08-20 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* os.texi (Idle Timers): New node, split out from Timers.
|
||||||
|
Document current-idle-time.
|
||||||
|
* commands.texi (Reading One Event): Update xref.
|
||||||
|
* elisp.texi (Top): Update subnode menu.
|
||||||
|
|
||||||
2006-08-16 Richard Stallman <rms@gnu.org>
|
2006-08-16 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
* keymaps.texi (Extended Menu Items): Show format of cached
|
* keymaps.texi (Extended Menu Items): Show format of cached
|
||||||
|
|
|
@ -27,6 +27,7 @@ srcdir = @srcdir@
|
||||||
VPATH=@srcdir@
|
VPATH=@srcdir@
|
||||||
|
|
||||||
infodir = $(srcdir)/../info
|
infodir = $(srcdir)/../info
|
||||||
|
usermanualdir = $(srcdir)/../man
|
||||||
|
|
||||||
TEXI2DVI = texi2dvi
|
TEXI2DVI = texi2dvi
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
@ -103,7 +104,7 @@ $(infodir)/elisp: $(srcs)
|
||||||
$(MAKEINFO) -I. -I$(srcdir) $(srcdir)/elisp.texi -o $(infodir)/elisp
|
$(MAKEINFO) -I. -I$(srcdir) $(srcdir)/elisp.texi -o $(infodir)/elisp
|
||||||
|
|
||||||
elisp.dvi: $(srcs)
|
elisp.dvi: $(srcs)
|
||||||
$(TEXI2DVI) -I $(srcdir) $(srcdir)/elisp.texi
|
$(TEXI2DVI) -I $(srcdir) -I $(usermanualdir) $(srcdir)/elisp.texi
|
||||||
|
|
||||||
# This is for use in a separate distro of the Emacs Lisp manual.
|
# This is for use in a separate distro of the Emacs Lisp manual.
|
||||||
install: elisp
|
install: elisp
|
||||||
|
|
|
@ -2231,7 +2231,7 @@ necessary for input to arrive.
|
||||||
|
|
||||||
If @var{seconds} is @code{nil}, Emacs is considered idle while waiting
|
If @var{seconds} is @code{nil}, Emacs is considered idle while waiting
|
||||||
for user input to arrive. Idle timers---those created with
|
for user input to arrive. Idle timers---those created with
|
||||||
@code{run-with-idle-timer} (@pxref{Timers})---can run during this
|
@code{run-with-idle-timer} (@pxref{Idle Timers})---can run during this
|
||||||
period. However, if @var{seconds} is non-@code{nil}, the state of
|
period. However, if @var{seconds} is non-@code{nil}, the state of
|
||||||
idleness remains unchanged. If Emacs is non-idle when
|
idleness remains unchanged. If Emacs is non-idle when
|
||||||
@code{read-event} is called, it remains non-idle throughout the
|
@code{read-event} is called, it remains non-idle throughout the
|
||||||
|
|
|
@ -1039,6 +1039,8 @@ Operating System Interface
|
||||||
* Processor Run Time:: Getting the run time used by Emacs.
|
* Processor Run Time:: Getting the run time used by Emacs.
|
||||||
* Time Calculations:: Adding, subtracting, comparing times, etc.
|
* Time Calculations:: Adding, subtracting, comparing times, etc.
|
||||||
* Timers:: Setting a timer to call a function at a certain time.
|
* Timers:: Setting a timer to call a function at a certain time.
|
||||||
|
* Idle Timers:: Setting a timer to call a function when Emacs has
|
||||||
|
been idle for a certain length of time.
|
||||||
* Terminal Input:: Accessing and recordingo terminal input.
|
* Terminal Input:: Accessing and recordingo terminal input.
|
||||||
* Terminal Output:: Controlling and recording terminal output.
|
* Terminal Output:: Controlling and recording terminal output.
|
||||||
* Sound Output:: Playing sounds on the computer's speaker.
|
* Sound Output:: Playing sounds on the computer's speaker.
|
||||||
|
|
|
@ -28,6 +28,8 @@ pertaining to the terminal and the screen.
|
||||||
* Processor Run Time:: Getting the run time used by Emacs.
|
* Processor Run Time:: Getting the run time used by Emacs.
|
||||||
* Time Calculations:: Adding, subtracting, comparing times, etc.
|
* Time Calculations:: Adding, subtracting, comparing times, etc.
|
||||||
* Timers:: Setting a timer to call a function at a certain time.
|
* Timers:: Setting a timer to call a function at a certain time.
|
||||||
|
* Idle Timers:: Setting a timer to call a function when Emacs has
|
||||||
|
been idle for a certain length of time.
|
||||||
* Terminal Input:: Accessing and recording terminal input.
|
* Terminal Input:: Accessing and recording terminal input.
|
||||||
* Terminal Output:: Controlling and recording terminal output.
|
* Terminal Output:: Controlling and recording terminal output.
|
||||||
* Sound Output:: Playing sounds on the computer's speaker.
|
* Sound Output:: Playing sounds on the computer's speaker.
|
||||||
|
@ -1392,6 +1394,13 @@ both before and after changing the buffer, to separate the timer's
|
||||||
changes from user commands' changes and prevent a single undo entry
|
changes from user commands' changes and prevent a single undo entry
|
||||||
from growing to be quite large.
|
from growing to be quite large.
|
||||||
|
|
||||||
|
Timer functions should also avoid calling functions that cause Emacs
|
||||||
|
to wait, such as @code{sit-for} (@pxref{Waiting}). This can lead to
|
||||||
|
unpredictable effects, since other timers (or even the same timer) can
|
||||||
|
run while waiting. If a timer function needs to perform an action
|
||||||
|
after a certain time has elapsed, it can do this by scheduling a new
|
||||||
|
timer.
|
||||||
|
|
||||||
If a timer function calls functions that can change the match data,
|
If a timer function calls functions that can change the match data,
|
||||||
it should save and restore the match data. @xref{Saving Match Data}.
|
it should save and restore the match data. @xref{Saving Match Data}.
|
||||||
|
|
||||||
|
@ -1473,10 +1482,26 @@ calls one of those primitives. So use @code{with-timeout} only with a
|
||||||
a timer to avoid waiting too long for an answer. @xref{Yes-or-No
|
a timer to avoid waiting too long for an answer. @xref{Yes-or-No
|
||||||
Queries}.
|
Queries}.
|
||||||
|
|
||||||
|
@defun cancel-timer timer
|
||||||
|
This cancels the requested action for @var{timer}, which should be a
|
||||||
|
timer---usually, one previously returned by @code{run-at-time} or
|
||||||
|
@code{run-with-idle-timer}. This cancels the effect of that call to
|
||||||
|
one of these functions; the arrival of the specified time will not
|
||||||
|
cause anything special to happen.
|
||||||
|
@end defun
|
||||||
|
|
||||||
|
@node Idle Timers
|
||||||
|
@section Idle Timers
|
||||||
|
|
||||||
|
Here is how to set up a timer that runs when Emacs is idle for a
|
||||||
|
certain length of time. Aside from how to set them up, idle timers
|
||||||
|
work just like ordinary timers.
|
||||||
|
|
||||||
@deffn Command run-with-idle-timer secs repeat function &rest args
|
@deffn Command run-with-idle-timer secs repeat function &rest args
|
||||||
Set up a timer which runs when Emacs has been idle for @var{secs}
|
Set up a timer which runs when Emacs has been idle for @var{secs}
|
||||||
seconds. The value of @var{secs} may be an integer or a floating point
|
seconds. The value of @var{secs} may be an integer or a floating point
|
||||||
number.
|
number; a value of the type returned by @code{current-idle-time}
|
||||||
|
is also allowed.
|
||||||
|
|
||||||
If @var{repeat} is @code{nil}, the timer runs just once, the first time
|
If @var{repeat} is @code{nil}, the timer runs just once, the first time
|
||||||
Emacs remains idle for a long enough time. More often @var{repeat} is
|
Emacs remains idle for a long enough time. More often @var{repeat} is
|
||||||
|
@ -1484,7 +1509,7 @@ non-@code{nil}, which means to run the timer @emph{each time} Emacs
|
||||||
remains idle for @var{secs} seconds.
|
remains idle for @var{secs} seconds.
|
||||||
|
|
||||||
The function @code{run-with-idle-timer} returns a timer value which you
|
The function @code{run-with-idle-timer} returns a timer value which you
|
||||||
can use in calling @code{cancel-timer} (see below).
|
can use in calling @code{cancel-timer} (@pxref{Timers}).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@cindex idleness
|
@cindex idleness
|
||||||
|
@ -1508,11 +1533,49 @@ minutes, and even if there have been garbage collections and autosaves.
|
||||||
input. Then it becomes idle again, and all the idle timers that are
|
input. Then it becomes idle again, and all the idle timers that are
|
||||||
set up to repeat will subsequently run another time, one by one.
|
set up to repeat will subsequently run another time, one by one.
|
||||||
|
|
||||||
@defun cancel-timer timer
|
@c Emacs 19 feature
|
||||||
Cancel the requested action for @var{timer}, which should be a value
|
@defun current-idle-time
|
||||||
previously returned by @code{run-at-time} or @code{run-with-idle-timer}.
|
This function returns the length of time Emacs has been idle, as a
|
||||||
This cancels the effect of that call to one of these functions; the
|
list of three integers: @code{(@var{high} @var{low} @var{microsec})}.
|
||||||
arrival of the specified time will not cause anything special to happen.
|
The integers @var{high} and @var{low} combine to give the number of
|
||||||
|
seconds of idleness, which is
|
||||||
|
@ifnottex
|
||||||
|
@var{high} * 2**16 + @var{low}.
|
||||||
|
@end ifnottex
|
||||||
|
@tex
|
||||||
|
$high*2^{16}+low$.
|
||||||
|
@end tex
|
||||||
|
|
||||||
|
The third element, @var{microsec}, gives the microseconds since the
|
||||||
|
start of the current second (or 0 for systems that return time with
|
||||||
|
the resolution of only one second).
|
||||||
|
|
||||||
|
The main use of this function is when an idle timer function wants to
|
||||||
|
``take a break'' for a while. It can set up another idle timer to
|
||||||
|
call the same function again, after a few seconds more idleness.
|
||||||
|
Here's an example:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
(defvar resume-timer nil
|
||||||
|
"Timer that `timer-function' used to reschedule itself, or nil.")
|
||||||
|
|
||||||
|
(defun timer-function ()
|
||||||
|
;; @r{If the user types a command while @code{resume-timer}}
|
||||||
|
;; @r{is active, the next time this function is called from}
|
||||||
|
;; @r{its main idle timer, deactivate @code{resume-timer}.}
|
||||||
|
(when resume-timer
|
||||||
|
(cancel-timer resume-timer))
|
||||||
|
...@var{do the work for a while}...
|
||||||
|
(when @var{taking-a-break}
|
||||||
|
(setq resume-timer
|
||||||
|
(run-with-idle-timer
|
||||||
|
;; Compute an idle time @var{break-length}
|
||||||
|
;; more than the current value.
|
||||||
|
(time-add (current-idle-time)
|
||||||
|
(seconds-to-time @var{break-length}))
|
||||||
|
nil
|
||||||
|
'timer-function))))
|
||||||
|
@end smallexample
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@node Terminal Input
|
@node Terminal Input
|
||||||
|
|
|
@ -1520,7 +1520,7 @@ text at the end of the entire answer, but nothing before; that's how
|
||||||
|
|
||||||
If the argument @var{delay-question} is non-nil, delay sending this
|
If the argument @var{delay-question} is non-nil, delay sending this
|
||||||
question until the process has finished replying to any previous
|
question until the process has finished replying to any previous
|
||||||
questions. This produces more reliable results with some processes."
|
questions. This produces more reliable results with some processes.
|
||||||
|
|
||||||
The return value of @code{tq-enqueue} itself is not meaningful.
|
The return value of @code{tq-enqueue} itself is not meaningful.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
|
@ -1,3 +1,29 @@
|
||||||
|
2006-08-25 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* display.texi (Display Custom): Add variables overline-margin
|
||||||
|
and x-underline-at-descent-line.
|
||||||
|
|
||||||
|
2006-08-25 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* entering.texi (Exiting): Rewrite to give graphical displays
|
||||||
|
priority over text terminals.
|
||||||
|
|
||||||
|
* search.texi (Incremental Search): Move index entries.
|
||||||
|
|
||||||
|
2006-08-23 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
|
* custom.texi (Init File): Reference Find Init to avoid "home
|
||||||
|
directory" confusion.
|
||||||
|
|
||||||
|
2006-08-22 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
||||||
|
* building.texi (Other GDB-UI Buffers): Describe how to edit
|
||||||
|
a value in the locals buffer.
|
||||||
|
|
||||||
|
2006-08-21 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* search.texi (Basic Isearch): Add `isearch' index entry.
|
||||||
|
|
||||||
2006-08-16 Richard Stallman <rms@gnu.org>
|
2006-08-16 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
* misc.texi (Saving Emacs Sessions): Clean up wording.
|
* misc.texi (Saving Emacs Sessions): Clean up wording.
|
||||||
|
@ -11,7 +37,7 @@
|
||||||
2006-08-15 Carsten Dominik <dominik@science.uva.nl>
|
2006-08-15 Carsten Dominik <dominik@science.uva.nl>
|
||||||
|
|
||||||
* org.texi (Installation, Activation): Split from Installation and
|
* org.texi (Installation, Activation): Split from Installation and
|
||||||
Activation.
|
Activation.
|
||||||
(Clocking work time): Documented new features.
|
(Clocking work time): Documented new features.
|
||||||
|
|
||||||
2006-08-15 Nick Roberts <nickrob@snap.net.nz>
|
2006-08-15 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
|
@ -1028,7 +1028,8 @@ as are the commands to send signals to the debugged program.
|
||||||
@item Locals Buffer
|
@item Locals Buffer
|
||||||
The locals buffer displays the values of local variables of the
|
The locals buffer displays the values of local variables of the
|
||||||
current frame for simple data types (@pxref{Frame Info, Frame Info,
|
current frame for simple data types (@pxref{Frame Info, Frame Info,
|
||||||
Information on a frame, gdb, The GNU debugger}).
|
Information on a frame, gdb, The GNU debugger}). Press @key{RET} or
|
||||||
|
click @kbd{Mouse-2} on the value if you want to edit it.
|
||||||
|
|
||||||
Arrays and structures display their type only. With GDB 6.4 or later,
|
Arrays and structures display their type only. With GDB 6.4 or later,
|
||||||
move point to their name and press @key{RET}, or alternatively click
|
move point to their name and press @key{RET}, or alternatively click
|
||||||
|
@ -1040,7 +1041,7 @@ of GDB, use @kbd{Mouse-2} or @key{RET} on the type description
|
||||||
@findex toggle-gdb-all-registers
|
@findex toggle-gdb-all-registers
|
||||||
The registers buffer displays the values held by the registers
|
The registers buffer displays the values held by the registers
|
||||||
(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{RET} or
|
(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{RET} or
|
||||||
click @kbd{Mouse-2} on a register if you want to change its value.
|
click @kbd{Mouse-2} on a register if you want to edit its value.
|
||||||
With GDB 6.4 or later, recently changed register values display with
|
With GDB 6.4 or later, recently changed register values display with
|
||||||
@code{font-lock-warning-face}. With earlier versions of GDB, you can
|
@code{font-lock-warning-face}. With earlier versions of GDB, you can
|
||||||
press @key{SPC} to toggle the display of floating point registers
|
press @key{SPC} to toggle the display of floating point registers
|
||||||
|
|
|
@ -2063,9 +2063,8 @@ Reference Manual}.
|
||||||
@cindex rebinding keys, permanently
|
@cindex rebinding keys, permanently
|
||||||
@cindex startup (init file)
|
@cindex startup (init file)
|
||||||
|
|
||||||
When Emacs is started, it normally loads a Lisp program from the
|
When Emacs is started, it normally loads a Lisp program from the file
|
||||||
file @file{.emacs} or @file{.emacs.el} in your home directory
|
@file{.emacs} or @file{.emacs.el} in your home directory (@pxref{Find Init}).
|
||||||
(see @ref{General Variables, HOME}, if you don't know where that is).
|
|
||||||
We call this file your @dfn{init file} because it specifies how to
|
We call this file your @dfn{init file} because it specifies how to
|
||||||
initialize Emacs for you. You can use the command line switch
|
initialize Emacs for you. You can use the command line switch
|
||||||
@samp{-q} to prevent loading your init file, and @samp{-u} (or
|
@samp{-q} to prevent loading your init file, and @samp{-u} (or
|
||||||
|
|
|
@ -1215,6 +1215,17 @@ page for other output. On such terminals, you might want to set the variable
|
||||||
assume, when resumed, that the screen page it is using still contains
|
assume, when resumed, that the screen page it is using still contains
|
||||||
what Emacs last wrote there.
|
what Emacs last wrote there.
|
||||||
|
|
||||||
|
@vindex overline-margin
|
||||||
|
On graphical display, this variables specifies the number of pixes
|
||||||
|
the overline is shown above the text. The value includes the height of
|
||||||
|
the overline itself (1 pixel). The default value is 2 pixels.
|
||||||
|
|
||||||
|
@vindex x-underline-at-descent-line
|
||||||
|
On graphical display, the underline is normally drawn at the
|
||||||
|
baseline level of the font. If @code{x-underline-at-descent-line} is
|
||||||
|
non-@code{nil}, the underline is drawn at the same position as the
|
||||||
|
font's decent line.
|
||||||
|
|
||||||
@ignore
|
@ignore
|
||||||
arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4
|
arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4
|
||||||
@end ignore
|
@end ignore
|
||||||
|
|
|
@ -69,20 +69,19 @@ already running Emacs. @xref{Emacs Server}.
|
||||||
@cindex leaving Emacs
|
@cindex leaving Emacs
|
||||||
@cindex quitting Emacs
|
@cindex quitting Emacs
|
||||||
|
|
||||||
There are two commands for exiting Emacs, and three kinds of exiting:
|
There are two commands for exiting Emacs, and three kinds of
|
||||||
@dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and @dfn{killing}
|
exiting: @dfn{iconifying} Emacs, @dfn{suspending} Emacs, and
|
||||||
Emacs.
|
@dfn{killing} Emacs.
|
||||||
|
|
||||||
|
@dfn{Iconifying} means replacing the Emacs frame with a small box or
|
||||||
|
``icon'' on the screen. This is the usual way to exit Emacs when
|
||||||
|
you're using a graphical display---if you bother to ``exit'' at all.
|
||||||
|
(Just switching to another application is usually sufficient.)
|
||||||
|
|
||||||
@dfn{Suspending} means stopping Emacs temporarily and returning
|
@dfn{Suspending} means stopping Emacs temporarily and returning
|
||||||
control to its parent process (usually a shell), allowing you to resume
|
control to its parent process (usually a shell), allowing you to
|
||||||
editing later in the same Emacs job, with the same buffers, same kill
|
resume editing later in the same Emacs job. This is the usual way to
|
||||||
ring, same undo history, and so on. This is the usual way to exit Emacs
|
exit Emacs when running it on a text terminal.
|
||||||
when running on a text terminal.
|
|
||||||
|
|
||||||
@dfn{Iconifying} means replacing the Emacs frame with a small box
|
|
||||||
somewhere on the screen. This is the usual way to exit Emacs when you're
|
|
||||||
using a graphics terminal---if you bother to ``exit'' at all. (Just switching
|
|
||||||
to another application is usually sufficient.)
|
|
||||||
|
|
||||||
@dfn{Killing} Emacs means destroying the Emacs job. You can run Emacs
|
@dfn{Killing} Emacs means destroying the Emacs job. You can run Emacs
|
||||||
again later, but you will get a fresh Emacs; there is no way to resume
|
again later, but you will get a fresh Emacs; there is no way to resume
|
||||||
|
@ -97,12 +96,18 @@ Kill Emacs (@code{save-buffers-kill-emacs}).
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@kindex C-z
|
@kindex C-z
|
||||||
@findex suspend-emacs
|
@findex iconify-or-deiconify-frame
|
||||||
To suspend or iconify Emacs, type @kbd{C-z} (@code{suspend-emacs}).
|
On graphical displays, @kbd{C-z} runs the command
|
||||||
On text terminals, this suspends Emacs. On graphical displays,
|
@code{iconify-or-deiconify-frame}, which temporarily iconifies (or
|
||||||
it iconifies the Emacs frame.
|
``minimizes'') the selected Emacs frame (@pxref{Frames}). You can
|
||||||
|
then use the window manager to select some other application. (You
|
||||||
|
could select another application without iconifying Emacs first, but
|
||||||
|
getting the Emacs frame out of the way can make it more convenient to
|
||||||
|
find the other application.)
|
||||||
|
|
||||||
Suspending Emacs takes you back to the shell from which you invoked
|
@findex suspend-emacs
|
||||||
|
On a text terminal, @kbd{C-z} runs the command @code{suspend-emacs}.
|
||||||
|
Suspending Emacs takes you back to the shell from which you invoked
|
||||||
Emacs. You can resume Emacs with the shell command @command{%emacs}
|
Emacs. You can resume Emacs with the shell command @command{%emacs}
|
||||||
in most common shells. On systems that don't support suspending
|
in most common shells. On systems that don't support suspending
|
||||||
programs, @kbd{C-z} starts an inferior shell that communicates
|
programs, @kbd{C-z} starts an inferior shell that communicates
|
||||||
|
@ -112,19 +117,12 @@ subshell. (The way to do that is probably with @kbd{C-d} or
|
||||||
systems, you can only get back to the shell from which Emacs was run
|
systems, you can only get back to the shell from which Emacs was run
|
||||||
(to log out, for example) when you kill Emacs.
|
(to log out, for example) when you kill Emacs.
|
||||||
|
|
||||||
|
@vindex cannot-suspend
|
||||||
Suspending can fail if you run Emacs under a shell that doesn't
|
Suspending can fail if you run Emacs under a shell that doesn't
|
||||||
support suspending programs, even if the system itself does support
|
support suspendion of its subjobs, even if the system itself does
|
||||||
it. In such a case, you can set the variable @code{cannot-suspend} to
|
support it. In such a case, you can set the variable
|
||||||
a non-@code{nil} value to force @kbd{C-z} to start an inferior shell.
|
@code{cannot-suspend} to a non-@code{nil} value to force @kbd{C-z} to
|
||||||
(One might also describe Emacs's parent shell as ``inferior'' for
|
start an inferior shell.
|
||||||
failing to support job control properly, but that is a matter of
|
|
||||||
taste.)
|
|
||||||
|
|
||||||
On graphical displays, @kbd{C-z} has a different meaning: it runs
|
|
||||||
the command @code{iconify-or-deiconify-frame}, which temporarily
|
|
||||||
iconifies (or ``minimizes'') the selected Emacs frame
|
|
||||||
(@pxref{Frames}). Then you can use the window manager to get back to
|
|
||||||
a shell window.
|
|
||||||
|
|
||||||
@kindex C-x C-c
|
@kindex C-x C-c
|
||||||
@findex save-buffers-kill-emacs
|
@findex save-buffers-kill-emacs
|
||||||
|
|
|
@ -33,6 +33,8 @@ asks interactively which occurrences to replace.
|
||||||
|
|
||||||
@node Incremental Search
|
@node Incremental Search
|
||||||
@section Incremental Search
|
@section Incremental Search
|
||||||
|
@cindex incremental search
|
||||||
|
@cindex isearch
|
||||||
|
|
||||||
An incremental search begins searching as soon as you type the first
|
An incremental search begins searching as soon as you type the first
|
||||||
character of the search string. As you type in the search string, Emacs
|
character of the search string. As you type in the search string, Emacs
|
||||||
|
@ -63,7 +65,6 @@ Incremental search backward (@code{isearch-backward}).
|
||||||
|
|
||||||
@node Basic Isearch
|
@node Basic Isearch
|
||||||
@subsection Basics of Incremental Search
|
@subsection Basics of Incremental Search
|
||||||
@cindex incremental search
|
|
||||||
|
|
||||||
@kindex C-s
|
@kindex C-s
|
||||||
@findex isearch-forward
|
@findex isearch-forward
|
||||||
|
|
151
src/ChangeLog
151
src/ChangeLog
|
@ -1,3 +1,146 @@
|
||||||
|
2006-08-28 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* xdisp.c (get_window_cursor_type): Replace BOX cursor on images
|
||||||
|
with a hollow box cursor if image is larger than 32x32 (or the default
|
||||||
|
frame font if that is bigger). Replace any other cursor on images
|
||||||
|
with hollow box cursor, as redisplay doesn't support bar and hbar
|
||||||
|
cursors on images.
|
||||||
|
|
||||||
|
2006-08-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||||
|
|
||||||
|
* alloc.c (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Undo previous
|
||||||
|
change. Move mutex lock/unlock operations inside BLOCK_INPUT.
|
||||||
|
|
||||||
|
* dired.c (directory_files_internal_unwind, directory_files_internal)
|
||||||
|
(file_name_completion): Add BLOCK_INPUT around opendir/closedir.
|
||||||
|
|
||||||
|
* image.c [MAC_OS] (image_load_qt_1): Use ComponentResult instead
|
||||||
|
of OSErr.
|
||||||
|
|
||||||
|
* keyboard.c (in_sighandler): Remove variable.
|
||||||
|
(Fcurrent_idle_time): Add missing `doc:'.
|
||||||
|
(input_available_signal, init_keyboard): Undo previous change.
|
||||||
|
|
||||||
|
* keyboard.h (in_sighandler): Remove extern.
|
||||||
|
|
||||||
|
* mac.c (create_apple_event_from_event_ref, select)
|
||||||
|
(Fmac_get_file_creator, Fmac_get_file_type, Fmac_set_file_creator)
|
||||||
|
(Fmac_set_file_type, cfstring_create_normalized)
|
||||||
|
(mac_get_system_locale, select_and_poll_event, sys_select): Use
|
||||||
|
OSStatus instead of OSErr.
|
||||||
|
|
||||||
|
* macfns.c [TARGET_API_MAC_CARBON] (mac_update_proxy_icon): Don't
|
||||||
|
use FRAME_FILE_NAME. Use (FS)UpdateAlias.
|
||||||
|
(Fx_create_frame): Apply 2006-07-03 for xfns.c.
|
||||||
|
|
||||||
|
* macselect.c (get_scrap_from_symbol, clear_scrap, put_scrap_string)
|
||||||
|
(put_scrap_private_timestamp, scrap_has_target_type, get_scrap_string)
|
||||||
|
(get_scrap_private_timestamp, get_scrap_target_type_list)
|
||||||
|
(x_own_selection, x_get_foreign_selection)
|
||||||
|
(Fx_disown_selection_internal, Fx_selection_owner_p)
|
||||||
|
(Fx_selection_exists_p): Use OSStatus instead of OSErr.
|
||||||
|
|
||||||
|
* macterm.c (mac_draw_string_common, mac_query_char_extents)
|
||||||
|
(x_iconify_frame, XLoadQueryFont, install_window_handler)
|
||||||
|
(mac_handle_command_event, init_command_handler, init_menu_bar):
|
||||||
|
Use OSStatus instead of OSErr.
|
||||||
|
(x_free_frame_resources) [TARGET_API_MAC_CARBON]: Don't use
|
||||||
|
FRAME_FILE_NAME.
|
||||||
|
(x_query_font): Apply 2006-08-04 change for xterm.c.
|
||||||
|
(Qhi_command): Rename from Qhicommand. All uses changed.
|
||||||
|
|
||||||
|
* macterm.h (struct mac_output) [TARGET_API_MAC_CARBON]: Remove member
|
||||||
|
file_name.
|
||||||
|
(FRAME_FILE_NAME): Remove macro.
|
||||||
|
(install_window_handler, create_apple_event_from_event_ref):
|
||||||
|
Return OSStatus instead of OSErr.
|
||||||
|
|
||||||
|
2006-08-26 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* buffer.c (Fset_buffer_multibyte):
|
||||||
|
* editfns.c (Fcurrent_time, Fget_internal_run_time):
|
||||||
|
* macfns.c (Fxw_color_values):
|
||||||
|
* w32fns.c (Fxw_color_values):
|
||||||
|
* xfns.c (Fxw_color_values): Simplify; use list3.
|
||||||
|
|
||||||
|
* fileio.c (Fmake_directory_internal, Fdelete_directory)
|
||||||
|
(Fdelete_file): Simplify; use list1.
|
||||||
|
(Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
|
||||||
|
Simplify; remove NO_ARG_ARRAY stuff, use list2.
|
||||||
|
|
||||||
|
2006-08-25 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* keyboard.c (Fcurrent_idle_time): Simplify.
|
||||||
|
|
||||||
|
2006-08-25 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* fns.c (sxhash_string): Rotate properly; don't lose bits.
|
||||||
|
|
||||||
|
2006-08-24 Francesc Rocher <francesc.rocher@gmail.com>
|
||||||
|
|
||||||
|
* xdisp.c (overline_margin): New variable.
|
||||||
|
(x_produce_glyphs): Use it.
|
||||||
|
(syms_of_xdisp): DEFVAR_INT it.
|
||||||
|
|
||||||
|
* xterm.c (x_underline_at_descent_line): New variable.
|
||||||
|
(syms_of_xterm): DEFVAR_BOOL it.
|
||||||
|
(x_draw_glyph_string): Use it.
|
||||||
|
Draw underline and overline up to the end of line if the face
|
||||||
|
extends to the end of line.
|
||||||
|
|
||||||
|
* macterm.c: Likewise.
|
||||||
|
|
||||||
|
* w32term.c: Likewise.
|
||||||
|
|
||||||
|
2006-08-24 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
||||||
|
* buffer.c (Fswitch_to_buffer): Move buffer to front of
|
||||||
|
buffer-alist if necessary.
|
||||||
|
|
||||||
|
2006-08-22 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* xdisp.c (update_tool_bar): Redisplay toolbar also when only
|
||||||
|
number of items changes.
|
||||||
|
|
||||||
|
2006-08-22 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* buffer.c (Fset_buffer_multibyte): Record proper undo entry.
|
||||||
|
|
||||||
|
2006-08-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||||
|
|
||||||
|
* keyboard.c: Clarify difference between in_sighandler and
|
||||||
|
handling_signal.
|
||||||
|
|
||||||
|
2006-08-21 Kim F. Storm <storm@cua.dk>
|
||||||
|
|
||||||
|
* macterm.c (x_draw_stretch_glyph_string):
|
||||||
|
* w32term.c (x_draw_stretch_glyph_string):
|
||||||
|
* xterm.c (x_draw_stretch_glyph_string): It is ok to draw a
|
||||||
|
stretch glyph in left marginal areas on header and mode lines.
|
||||||
|
|
||||||
|
2006-08-21 Kenichi Handa <handa@m17n.org>
|
||||||
|
|
||||||
|
* keyboard.c (syms_of_keyboard): Docstring of
|
||||||
|
Vunread_post_input_method_events and Vunread_input_method_events
|
||||||
|
fixed.
|
||||||
|
|
||||||
|
2006-08-20 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
|
* keyboard.c (show_help_echo): Preserve mouse movement flag if
|
||||||
|
tracking mouse.
|
||||||
|
|
||||||
|
2006-08-20 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* xfaces.c (load_pixmap): Add quotes in error message.
|
||||||
|
|
||||||
|
* keyboard.c (Fcurrent_idle_time): New function.
|
||||||
|
(syms_of_keyboard): defsubr it.
|
||||||
|
|
||||||
|
2006-08-18 Nick Roberts <nickrob@snap.net.nz>
|
||||||
|
|
||||||
|
* window.c (Fset_window_fringes): Do nothing on a tty.
|
||||||
|
(Fwindow_fringes): Put ? operator after the line break.
|
||||||
|
|
||||||
2006-08-16 Andreas Schwab <schwab@suse.de>
|
2006-08-16 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* print.c (debug_output_compilation_hack): Fix return type.
|
* print.c (debug_output_compilation_hack): Fix return type.
|
||||||
|
@ -795,8 +938,8 @@
|
||||||
|
|
||||||
2006-06-14 Chong Yidong <cyd@stupidchicken.com>
|
2006-06-14 Chong Yidong <cyd@stupidchicken.com>
|
||||||
|
|
||||||
* xdisp.c (back_to_previous_visible_line_start): Reset
|
* xdisp.c (back_to_previous_visible_line_start):
|
||||||
it->continuation_lines_width.
|
Reset it->continuation_lines_width.
|
||||||
|
|
||||||
2006-06-14 Richard Stallman <rms@gnu.org>
|
2006-06-14 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
@ -867,8 +1010,8 @@
|
||||||
|
|
||||||
2006-06-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
2006-06-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||||
|
|
||||||
* macterm.c [USE_MAC_TSM] (mac_handle_text_input_event): Exclude
|
* macterm.c [USE_MAC_TSM] (mac_handle_text_input_event):
|
||||||
0x7f from ASCII range.
|
Exclude 0x7f from ASCII range.
|
||||||
|
|
||||||
2006-06-05 Jason Rumney <jasonr@gnu.org>
|
2006-06-05 Jason Rumney <jasonr@gnu.org>
|
||||||
|
|
||||||
|
|
22
src/alloc.c
22
src/alloc.c
|
@ -130,27 +130,17 @@ static pthread_mutex_t alloc_mutex;
|
||||||
#define BLOCK_INPUT_ALLOC \
|
#define BLOCK_INPUT_ALLOC \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (!in_sighandler) \
|
if (pthread_self () == main_thread) \
|
||||||
{ \
|
BLOCK_INPUT; \
|
||||||
pthread_mutex_lock (&alloc_mutex); \
|
pthread_mutex_lock (&alloc_mutex); \
|
||||||
if (pthread_self () == main_thread) \
|
|
||||||
BLOCK_INPUT; \
|
|
||||||
else \
|
|
||||||
sigblock (sigmask (SIGIO)); \
|
|
||||||
} \
|
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
#define UNBLOCK_INPUT_ALLOC \
|
#define UNBLOCK_INPUT_ALLOC \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (!in_sighandler) \
|
pthread_mutex_unlock (&alloc_mutex); \
|
||||||
{ \
|
if (pthread_self () == main_thread) \
|
||||||
pthread_mutex_unlock (&alloc_mutex); \
|
UNBLOCK_INPUT; \
|
||||||
if (pthread_self () == main_thread) \
|
|
||||||
UNBLOCK_INPUT; \
|
|
||||||
else \
|
|
||||||
sigunblock (sigmask (SIGIO)); \
|
|
||||||
} \
|
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
|
|
40
src/buffer.c
40
src/buffer.c
|
@ -1685,9 +1685,18 @@ the window-buffer correspondences. */)
|
||||||
char *err;
|
char *err;
|
||||||
|
|
||||||
if (EQ (buffer, Fwindow_buffer (selected_window)))
|
if (EQ (buffer, Fwindow_buffer (selected_window)))
|
||||||
/* Basically a NOP. Avoid signalling an error if the selected window
|
{
|
||||||
is dedicated, or a minibuffer, ... */
|
/* Basically a NOP. Avoid signalling an error in the case where
|
||||||
return Fset_buffer (buffer);
|
the selected window is dedicated, or a minibuffer. */
|
||||||
|
|
||||||
|
/* But do put this buffer at the front of the buffer list,
|
||||||
|
unless that has been inhibited. Note that even if
|
||||||
|
BUFFER is at the front of the main buffer-list already,
|
||||||
|
we still want to move it to the front of the frame's buffer list. */
|
||||||
|
if (NILP (norecord))
|
||||||
|
record_buffer (buffer);
|
||||||
|
return Fset_buffer (buffer);
|
||||||
|
}
|
||||||
|
|
||||||
err = no_switch_window (selected_window);
|
err = no_switch_window (selected_window);
|
||||||
if (err) error (err);
|
if (err) error (err);
|
||||||
|
@ -2118,10 +2127,11 @@ current buffer is cleared. */)
|
||||||
{
|
{
|
||||||
struct Lisp_Marker *tail, *markers;
|
struct Lisp_Marker *tail, *markers;
|
||||||
struct buffer *other;
|
struct buffer *other;
|
||||||
int undo_enabled_p = !EQ (current_buffer->undo_list, Qt);
|
|
||||||
int begv, zv;
|
int begv, zv;
|
||||||
int narrowed = (BEG != BEGV || Z != ZV);
|
int narrowed = (BEG != BEGV || Z != ZV);
|
||||||
int modified_p = !NILP (Fbuffer_modified_p (Qnil));
|
int modified_p = !NILP (Fbuffer_modified_p (Qnil));
|
||||||
|
Lisp_Object old_undo = current_buffer->undo_list;
|
||||||
|
struct gcpro gcpro1;
|
||||||
|
|
||||||
if (current_buffer->base_buffer)
|
if (current_buffer->base_buffer)
|
||||||
error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
|
error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
|
||||||
|
@ -2130,10 +2140,11 @@ current buffer is cleared. */)
|
||||||
if (NILP (flag) == NILP (current_buffer->enable_multibyte_characters))
|
if (NILP (flag) == NILP (current_buffer->enable_multibyte_characters))
|
||||||
return flag;
|
return flag;
|
||||||
|
|
||||||
/* It would be better to update the list,
|
GCPRO1 (old_undo);
|
||||||
but this is good enough for now. */
|
|
||||||
if (undo_enabled_p)
|
/* Don't record these buffer changes. We will put a special undo entry
|
||||||
current_buffer->undo_list = Qt;
|
instead. */
|
||||||
|
current_buffer->undo_list = Qt;
|
||||||
|
|
||||||
/* If the cached position is for this buffer, clear it out. */
|
/* If the cached position is for this buffer, clear it out. */
|
||||||
clear_charpos_cache (current_buffer);
|
clear_charpos_cache (current_buffer);
|
||||||
|
@ -2346,8 +2357,17 @@ current buffer is cleared. */)
|
||||||
set_intervals_multibyte (1);
|
set_intervals_multibyte (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (undo_enabled_p)
|
if (!EQ (old_undo, Qt))
|
||||||
current_buffer->undo_list = Qnil;
|
{
|
||||||
|
/* Represent all the above changes by a special undo entry. */
|
||||||
|
extern Lisp_Object Qapply;
|
||||||
|
current_buffer->undo_list = Fcons (list3 (Qapply,
|
||||||
|
intern ("set-buffer-multibyte"),
|
||||||
|
NILP (flag) ? Qt : Qnil),
|
||||||
|
old_undo);
|
||||||
|
}
|
||||||
|
|
||||||
|
UNGCPRO;
|
||||||
|
|
||||||
/* Changing the multibyteness of a buffer means that all windows
|
/* Changing the multibyteness of a buffer means that all windows
|
||||||
showing that buffer must be updated thoroughly. */
|
showing that buffer must be updated thoroughly. */
|
||||||
|
|
|
@ -135,7 +135,9 @@ directory_files_internal_unwind (dh)
|
||||||
Lisp_Object dh;
|
Lisp_Object dh;
|
||||||
{
|
{
|
||||||
DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer;
|
DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer;
|
||||||
|
BLOCK_INPUT;
|
||||||
closedir (d);
|
closedir (d);
|
||||||
|
UNBLOCK_INPUT;
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +199,9 @@ directory_files_internal (directory, full, match, nosort, attrs, id_format)
|
||||||
/* Now *bufp is the compiled form of MATCH; don't call anything
|
/* Now *bufp is the compiled form of MATCH; don't call anything
|
||||||
which might compile a new regexp until we're done with the loop! */
|
which might compile a new regexp until we're done with the loop! */
|
||||||
|
|
||||||
|
BLOCK_INPUT;
|
||||||
d = opendir (SDATA (dirfilename));
|
d = opendir (SDATA (dirfilename));
|
||||||
|
UNBLOCK_INPUT;
|
||||||
if (d == NULL)
|
if (d == NULL)
|
||||||
report_file_error ("Opening directory", Fcons (directory, Qnil));
|
report_file_error ("Opening directory", Fcons (directory, Qnil));
|
||||||
|
|
||||||
|
@ -322,7 +326,9 @@ directory_files_internal (directory, full, match, nosort, attrs, id_format)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BLOCK_INPUT;
|
||||||
closedir (d);
|
closedir (d);
|
||||||
|
UNBLOCK_INPUT;
|
||||||
|
|
||||||
/* Discard the unwind protect. */
|
/* Discard the unwind protect. */
|
||||||
specpdl_ptr = specpdl + count;
|
specpdl_ptr = specpdl + count;
|
||||||
|
@ -509,7 +515,9 @@ file_name_completion (file, dirname, all_flag, ver_flag)
|
||||||
{
|
{
|
||||||
int inner_count = SPECPDL_INDEX ();
|
int inner_count = SPECPDL_INDEX ();
|
||||||
|
|
||||||
|
BLOCK_INPUT;
|
||||||
d = opendir (SDATA (Fdirectory_file_name (encoded_dir)));
|
d = opendir (SDATA (Fdirectory_file_name (encoded_dir)));
|
||||||
|
UNBLOCK_INPUT;
|
||||||
if (!d)
|
if (!d)
|
||||||
report_file_error ("Opening directory", Fcons (dirname, Qnil));
|
report_file_error ("Opening directory", Fcons (dirname, Qnil));
|
||||||
|
|
||||||
|
|
|
@ -1433,14 +1433,11 @@ resolution finer than a second. */)
|
||||||
()
|
()
|
||||||
{
|
{
|
||||||
EMACS_TIME t;
|
EMACS_TIME t;
|
||||||
Lisp_Object result[3];
|
|
||||||
|
|
||||||
EMACS_GET_TIME (t);
|
EMACS_GET_TIME (t);
|
||||||
XSETINT (result[0], (EMACS_SECS (t) >> 16) & 0xffff);
|
return list3 (make_number ((EMACS_SECS (t) >> 16) & 0xffff),
|
||||||
XSETINT (result[1], (EMACS_SECS (t) >> 0) & 0xffff);
|
make_number ((EMACS_SECS (t) >> 0) & 0xffff),
|
||||||
XSETINT (result[2], EMACS_USECS (t));
|
make_number (EMACS_USECS (t)));
|
||||||
|
|
||||||
return Flist (3, result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time,
|
DEFUN ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time,
|
||||||
|
@ -1458,7 +1455,6 @@ systems that do not provide resolution finer than a second. */)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETRUSAGE
|
#ifdef HAVE_GETRUSAGE
|
||||||
struct rusage usage;
|
struct rusage usage;
|
||||||
Lisp_Object result[3];
|
|
||||||
int secs, usecs;
|
int secs, usecs;
|
||||||
|
|
||||||
if (getrusage (RUSAGE_SELF, &usage) < 0)
|
if (getrusage (RUSAGE_SELF, &usage) < 0)
|
||||||
|
@ -1474,11 +1470,9 @@ systems that do not provide resolution finer than a second. */)
|
||||||
secs++;
|
secs++;
|
||||||
}
|
}
|
||||||
|
|
||||||
XSETINT (result[0], (secs >> 16) & 0xffff);
|
return list3 (make_number ((secs >> 16) & 0xffff),
|
||||||
XSETINT (result[1], (secs >> 0) & 0xffff);
|
make_number ((secs >> 0) & 0xffff),
|
||||||
XSETINT (result[2], usecs);
|
make_number (usecs));
|
||||||
|
|
||||||
return Flist (3, result);
|
|
||||||
#else
|
#else
|
||||||
return Fcurrent_time ();
|
return Fcurrent_time ();
|
||||||
#endif
|
#endif
|
||||||
|
|
43
src/fileio.c
43
src/fileio.c
|
@ -2653,7 +2653,7 @@ DEFUN ("make-directory-internal", Fmake_directory_internal,
|
||||||
#else
|
#else
|
||||||
if (mkdir (dir, 0777) != 0)
|
if (mkdir (dir, 0777) != 0)
|
||||||
#endif
|
#endif
|
||||||
report_file_error ("Creating directory", Flist (1, &directory));
|
report_file_error ("Creating directory", list1 (directory));
|
||||||
|
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
@ -2679,7 +2679,7 @@ DEFUN ("delete-directory", Fdelete_directory, Sdelete_directory, 1, 1, "FDelete
|
||||||
dir = SDATA (encoded_dir);
|
dir = SDATA (encoded_dir);
|
||||||
|
|
||||||
if (rmdir (dir) != 0)
|
if (rmdir (dir) != 0)
|
||||||
report_file_error ("Removing directory", Flist (1, &directory));
|
report_file_error ("Removing directory", list1 (directory));
|
||||||
|
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
@ -2710,7 +2710,7 @@ If file has multiple names, it continues to exist with the other names. */)
|
||||||
encoded_file = ENCODE_FILE (filename);
|
encoded_file = ENCODE_FILE (filename);
|
||||||
|
|
||||||
if (0 > unlink (SDATA (encoded_file)))
|
if (0 > unlink (SDATA (encoded_file)))
|
||||||
report_file_error ("Removing old name", Flist (1, &filename));
|
report_file_error ("Removing old name", list1 (filename));
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2744,9 +2744,6 @@ This is what happens in interactive use with M-x. */)
|
||||||
(file, newname, ok_if_already_exists)
|
(file, newname, ok_if_already_exists)
|
||||||
Lisp_Object file, newname, ok_if_already_exists;
|
Lisp_Object file, newname, ok_if_already_exists;
|
||||||
{
|
{
|
||||||
#ifdef NO_ARG_ARRAY
|
|
||||||
Lisp_Object args[2];
|
|
||||||
#endif
|
|
||||||
Lisp_Object handler;
|
Lisp_Object handler;
|
||||||
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
|
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
|
||||||
Lisp_Object encoded_file, encoded_newname, symlink_target;
|
Lisp_Object encoded_file, encoded_newname, symlink_target;
|
||||||
|
@ -2815,15 +2812,7 @@ This is what happens in interactive use with M-x. */)
|
||||||
Fdelete_file (file);
|
Fdelete_file (file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#ifdef NO_ARG_ARRAY
|
report_file_error ("Renaming", list2 (file, newname));
|
||||||
{
|
|
||||||
args[0] = file;
|
|
||||||
args[1] = newname;
|
|
||||||
report_file_error ("Renaming", Flist (2, args));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
report_file_error ("Renaming", Flist (2, &file));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
UNGCPRO;
|
UNGCPRO;
|
||||||
return Qnil;
|
return Qnil;
|
||||||
|
@ -2839,9 +2828,6 @@ This is what happens in interactive use with M-x. */)
|
||||||
(file, newname, ok_if_already_exists)
|
(file, newname, ok_if_already_exists)
|
||||||
Lisp_Object file, newname, ok_if_already_exists;
|
Lisp_Object file, newname, ok_if_already_exists;
|
||||||
{
|
{
|
||||||
#ifdef NO_ARG_ARRAY
|
|
||||||
Lisp_Object args[2];
|
|
||||||
#endif
|
|
||||||
Lisp_Object handler;
|
Lisp_Object handler;
|
||||||
Lisp_Object encoded_file, encoded_newname;
|
Lisp_Object encoded_file, encoded_newname;
|
||||||
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
|
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
|
||||||
|
@ -2881,15 +2867,7 @@ This is what happens in interactive use with M-x. */)
|
||||||
|
|
||||||
unlink (SDATA (newname));
|
unlink (SDATA (newname));
|
||||||
if (0 > link (SDATA (encoded_file), SDATA (encoded_newname)))
|
if (0 > link (SDATA (encoded_file), SDATA (encoded_newname)))
|
||||||
{
|
report_file_error ("Adding new name", list2 (file, newname));
|
||||||
#ifdef NO_ARG_ARRAY
|
|
||||||
args[0] = file;
|
|
||||||
args[1] = newname;
|
|
||||||
report_file_error ("Adding new name", Flist (2, args));
|
|
||||||
#else
|
|
||||||
report_file_error ("Adding new name", Flist (2, &file));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
UNGCPRO;
|
UNGCPRO;
|
||||||
return Qnil;
|
return Qnil;
|
||||||
|
@ -2907,9 +2885,6 @@ This happens for interactive use with M-x. */)
|
||||||
(filename, linkname, ok_if_already_exists)
|
(filename, linkname, ok_if_already_exists)
|
||||||
Lisp_Object filename, linkname, ok_if_already_exists;
|
Lisp_Object filename, linkname, ok_if_already_exists;
|
||||||
{
|
{
|
||||||
#ifdef NO_ARG_ARRAY
|
|
||||||
Lisp_Object args[2];
|
|
||||||
#endif
|
|
||||||
Lisp_Object handler;
|
Lisp_Object handler;
|
||||||
Lisp_Object encoded_filename, encoded_linkname;
|
Lisp_Object encoded_filename, encoded_linkname;
|
||||||
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
|
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
|
||||||
|
@ -2965,13 +2940,7 @@ This happens for interactive use with M-x. */)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NO_ARG_ARRAY
|
report_file_error ("Making symbolic link", list2 (filename, linkname));
|
||||||
args[0] = filename;
|
|
||||||
args[1] = linkname;
|
|
||||||
report_file_error ("Making symbolic link", Flist (2, args));
|
|
||||||
#else
|
|
||||||
report_file_error ("Making symbolic link", Flist (2, &filename));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
UNGCPRO;
|
UNGCPRO;
|
||||||
return Qnil;
|
return Qnil;
|
||||||
|
|
|
@ -4402,7 +4402,7 @@ sxhash_string (ptr, len)
|
||||||
c = *p++;
|
c = *p++;
|
||||||
if (c >= 0140)
|
if (c >= 0140)
|
||||||
c -= 40;
|
c -= 40;
|
||||||
hash = ((hash << 3) + (hash >> 28) + c);
|
hash = ((hash << 4) + (hash >> 28) + c);
|
||||||
}
|
}
|
||||||
|
|
||||||
return hash & INTMASK;
|
return hash & INTMASK;
|
||||||
|
|
|
@ -2396,7 +2396,7 @@ image_load_qt_1 (f, img, type, fss, dh)
|
||||||
FSSpec *fss;
|
FSSpec *fss;
|
||||||
Handle dh;
|
Handle dh;
|
||||||
{
|
{
|
||||||
OSErr err;
|
ComponentResult err;
|
||||||
GraphicsImportComponent gi;
|
GraphicsImportComponent gi;
|
||||||
Rect rect;
|
Rect rect;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
186
src/keyboard.c
186
src/keyboard.c
|
@ -100,9 +100,6 @@ int interrupt_input_pending;
|
||||||
/* File descriptor to use for input. */
|
/* File descriptor to use for input. */
|
||||||
extern int input_fd;
|
extern int input_fd;
|
||||||
|
|
||||||
/* Nonzero if we are executing from the SIGIO signal handler. */
|
|
||||||
int in_sighandler;
|
|
||||||
|
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
/* Make all keyboard buffers much bigger when using X windows. */
|
/* Make all keyboard buffers much bigger when using X windows. */
|
||||||
#ifdef MAC_OS8
|
#ifdef MAC_OS8
|
||||||
|
@ -1390,6 +1387,72 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0,
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_MOUSE
|
||||||
|
|
||||||
|
/* Restore mouse tracking enablement. See Ftrack_mouse for the only use
|
||||||
|
of this function. */
|
||||||
|
|
||||||
|
static Lisp_Object
|
||||||
|
tracking_off (old_value)
|
||||||
|
Lisp_Object old_value;
|
||||||
|
{
|
||||||
|
do_mouse_tracking = old_value;
|
||||||
|
if (NILP (old_value))
|
||||||
|
{
|
||||||
|
/* Redisplay may have been preempted because there was input
|
||||||
|
available, and it assumes it will be called again after the
|
||||||
|
input has been processed. If the only input available was
|
||||||
|
the sort that we have just disabled, then we need to call
|
||||||
|
redisplay. */
|
||||||
|
if (!readable_events (READABLE_EVENTS_DO_TIMERS_NOW))
|
||||||
|
{
|
||||||
|
redisplay_preserve_echo_area (6);
|
||||||
|
get_input_pending (&input_pending,
|
||||||
|
READABLE_EVENTS_DO_TIMERS_NOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN ("track-mouse", Ftrack_mouse, Strack_mouse, 0, UNEVALLED, 0,
|
||||||
|
doc: /* Evaluate BODY with mouse movement events enabled.
|
||||||
|
Within a `track-mouse' form, mouse motion generates input events that
|
||||||
|
you can read with `read-event'.
|
||||||
|
Normally, mouse motion is ignored.
|
||||||
|
usage: (track-mouse BODY ...) */)
|
||||||
|
(args)
|
||||||
|
Lisp_Object args;
|
||||||
|
{
|
||||||
|
int count = SPECPDL_INDEX ();
|
||||||
|
Lisp_Object val;
|
||||||
|
|
||||||
|
record_unwind_protect (tracking_off, do_mouse_tracking);
|
||||||
|
|
||||||
|
do_mouse_tracking = Qt;
|
||||||
|
|
||||||
|
val = Fprogn (args);
|
||||||
|
return unbind_to (count, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If mouse has moved on some frame, return one of those frames.
|
||||||
|
Return 0 otherwise. */
|
||||||
|
|
||||||
|
static FRAME_PTR
|
||||||
|
some_mouse_moved ()
|
||||||
|
{
|
||||||
|
Lisp_Object tail, frame;
|
||||||
|
|
||||||
|
FOR_EACH_FRAME (tail, frame)
|
||||||
|
{
|
||||||
|
if (XFRAME (frame)->mouse_moved)
|
||||||
|
return XFRAME (frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_MOUSE */
|
||||||
|
|
||||||
/* This is the actual command reading loop,
|
/* This is the actual command reading loop,
|
||||||
sans error-handling encapsulation. */
|
sans error-handling encapsulation. */
|
||||||
|
|
||||||
|
@ -2310,7 +2373,17 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo)
|
||||||
|
|
||||||
#ifdef HAVE_MOUSE
|
#ifdef HAVE_MOUSE
|
||||||
if (!noninteractive && STRINGP (help))
|
if (!noninteractive && STRINGP (help))
|
||||||
help = call1 (Qmouse_fixup_help_message, help);
|
{
|
||||||
|
/* The mouse-fixup-help-message Lisp function can call
|
||||||
|
mouse_position_hook, which resets the mouse_moved flags.
|
||||||
|
This causes trouble if we are trying to read a mouse motion
|
||||||
|
event (i.e., if we are inside a `track-mouse' form), so we
|
||||||
|
restore the mouse_moved flag. */
|
||||||
|
FRAME_PTR f = NILP (do_mouse_tracking) ? NULL : some_mouse_moved ();
|
||||||
|
help = call1 (Qmouse_fixup_help_message, help);
|
||||||
|
if (f)
|
||||||
|
f->mouse_moved = 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (STRINGP (help) || NILP (help))
|
if (STRINGP (help) || NILP (help))
|
||||||
|
@ -3464,72 +3537,6 @@ restore_getcjmp (temp)
|
||||||
bcopy (temp, getcjmp, sizeof getcjmp);
|
bcopy (temp, getcjmp, sizeof getcjmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MOUSE
|
|
||||||
|
|
||||||
/* Restore mouse tracking enablement. See Ftrack_mouse for the only use
|
|
||||||
of this function. */
|
|
||||||
|
|
||||||
static Lisp_Object
|
|
||||||
tracking_off (old_value)
|
|
||||||
Lisp_Object old_value;
|
|
||||||
{
|
|
||||||
do_mouse_tracking = old_value;
|
|
||||||
if (NILP (old_value))
|
|
||||||
{
|
|
||||||
/* Redisplay may have been preempted because there was input
|
|
||||||
available, and it assumes it will be called again after the
|
|
||||||
input has been processed. If the only input available was
|
|
||||||
the sort that we have just disabled, then we need to call
|
|
||||||
redisplay. */
|
|
||||||
if (!readable_events (READABLE_EVENTS_DO_TIMERS_NOW))
|
|
||||||
{
|
|
||||||
redisplay_preserve_echo_area (6);
|
|
||||||
get_input_pending (&input_pending,
|
|
||||||
READABLE_EVENTS_DO_TIMERS_NOW);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Qnil;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFUN ("track-mouse", Ftrack_mouse, Strack_mouse, 0, UNEVALLED, 0,
|
|
||||||
doc: /* Evaluate BODY with mouse movement events enabled.
|
|
||||||
Within a `track-mouse' form, mouse motion generates input events that
|
|
||||||
you can read with `read-event'.
|
|
||||||
Normally, mouse motion is ignored.
|
|
||||||
usage: (track-mouse BODY ...) */)
|
|
||||||
(args)
|
|
||||||
Lisp_Object args;
|
|
||||||
{
|
|
||||||
int count = SPECPDL_INDEX ();
|
|
||||||
Lisp_Object val;
|
|
||||||
|
|
||||||
record_unwind_protect (tracking_off, do_mouse_tracking);
|
|
||||||
|
|
||||||
do_mouse_tracking = Qt;
|
|
||||||
|
|
||||||
val = Fprogn (args);
|
|
||||||
return unbind_to (count, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If mouse has moved on some frame, return one of those frames.
|
|
||||||
Return 0 otherwise. */
|
|
||||||
|
|
||||||
static FRAME_PTR
|
|
||||||
some_mouse_moved ()
|
|
||||||
{
|
|
||||||
Lisp_Object tail, frame;
|
|
||||||
|
|
||||||
FOR_EACH_FRAME (tail, frame)
|
|
||||||
{
|
|
||||||
if (XFRAME (frame)->mouse_moved)
|
|
||||||
return XFRAME (frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* HAVE_MOUSE */
|
|
||||||
|
|
||||||
/* Low level keyboard/mouse input.
|
/* Low level keyboard/mouse input.
|
||||||
kbd_buffer_store_event places events in kbd_buffer, and
|
kbd_buffer_store_event places events in kbd_buffer, and
|
||||||
kbd_buffer_get_event retrieves them. */
|
kbd_buffer_get_event retrieves them. */
|
||||||
|
@ -4543,6 +4550,32 @@ timer_check (do_it_now)
|
||||||
UNGCPRO;
|
UNGCPRO;
|
||||||
return nexttime;
|
return nexttime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN ("current-idle-time", Fcurrent_idle_time, Scurrent_idle_time, 0, 0, 0,
|
||||||
|
doc: /* Return the current length of Emacs idleness.
|
||||||
|
The value is returned as a list of three integers. The first has the
|
||||||
|
most significant 16 bits of the seconds, while the second has the
|
||||||
|
least significant 16 bits. The third integer gives the microsecond
|
||||||
|
count.
|
||||||
|
|
||||||
|
The microsecond count is zero on systems that do not provide
|
||||||
|
resolution finer than a second. */)
|
||||||
|
()
|
||||||
|
{
|
||||||
|
if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
|
||||||
|
{
|
||||||
|
EMACS_TIME now, idleness_now;
|
||||||
|
|
||||||
|
EMACS_GET_TIME (now);
|
||||||
|
EMACS_SUB_TIME (idleness_now, now, timer_idleness_start_time);
|
||||||
|
|
||||||
|
return list3 (make_number ((EMACS_SECS (idleness_now) >> 16) & 0xffff),
|
||||||
|
make_number ((EMACS_SECS (idleness_now) >> 0) & 0xffff),
|
||||||
|
make_number (EMACS_USECS (idleness_now)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
/* Caches for modify_event_symbol. */
|
/* Caches for modify_event_symbol. */
|
||||||
static Lisp_Object accent_key_syms;
|
static Lisp_Object accent_key_syms;
|
||||||
|
@ -6936,8 +6969,6 @@ input_available_signal (signo)
|
||||||
SIGNAL_THREAD_CHECK (signo);
|
SIGNAL_THREAD_CHECK (signo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
in_sighandler = 1;
|
|
||||||
|
|
||||||
if (input_available_clear_time)
|
if (input_available_clear_time)
|
||||||
EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0);
|
EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0);
|
||||||
|
|
||||||
|
@ -6949,7 +6980,6 @@ input_available_signal (signo)
|
||||||
sigfree ();
|
sigfree ();
|
||||||
#endif
|
#endif
|
||||||
errno = old_errno;
|
errno = old_errno;
|
||||||
in_sighandler = 0;
|
|
||||||
}
|
}
|
||||||
#endif /* SIGIO */
|
#endif /* SIGIO */
|
||||||
|
|
||||||
|
@ -10816,7 +10846,6 @@ init_keyboard ()
|
||||||
do_mouse_tracking = Qnil;
|
do_mouse_tracking = Qnil;
|
||||||
#endif
|
#endif
|
||||||
input_pending = 0;
|
input_pending = 0;
|
||||||
in_sighandler = 0;
|
|
||||||
|
|
||||||
/* This means that command_loop_1 won't try to select anything the first
|
/* This means that command_loop_1 won't try to select anything the first
|
||||||
time through. */
|
time through. */
|
||||||
|
@ -11130,6 +11159,7 @@ syms_of_keyboard ()
|
||||||
menu_bar_items_vector = Qnil;
|
menu_bar_items_vector = Qnil;
|
||||||
staticpro (&menu_bar_items_vector);
|
staticpro (&menu_bar_items_vector);
|
||||||
|
|
||||||
|
defsubr (&Scurrent_idle_time);
|
||||||
defsubr (&Sevent_convert_list);
|
defsubr (&Sevent_convert_list);
|
||||||
defsubr (&Sread_key_sequence);
|
defsubr (&Sread_key_sequence);
|
||||||
defsubr (&Sread_key_sequence_vector);
|
defsubr (&Sread_key_sequence_vector);
|
||||||
|
@ -11187,14 +11217,16 @@ These events are processed first, before actual keyboard input. */);
|
||||||
|
|
||||||
DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events,
|
DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events,
|
||||||
doc: /* List of events to be processed as input by input methods.
|
doc: /* List of events to be processed as input by input methods.
|
||||||
These events are processed after `unread-command-events', but
|
These events are processed before `unread-command-events'
|
||||||
before actual keyboard input. */);
|
and actual keyboard input without given to `input-method-function'. */);
|
||||||
Vunread_post_input_method_events = Qnil;
|
Vunread_post_input_method_events = Qnil;
|
||||||
|
|
||||||
DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events,
|
DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events,
|
||||||
doc: /* List of events to be processed as input by input methods.
|
doc: /* List of events to be processed as input by input methods.
|
||||||
These events are processed after `unread-command-events', but
|
These events are processed after `unread-command-events', but
|
||||||
before actual keyboard input. */);
|
before actual keyboard input.
|
||||||
|
If there's an active input method, the events are given to
|
||||||
|
`input-method-function'. */);
|
||||||
Vunread_input_method_events = Qnil;
|
Vunread_input_method_events = Qnil;
|
||||||
|
|
||||||
DEFVAR_LISP ("meta-prefix-char", &meta_prefix_char,
|
DEFVAR_LISP ("meta-prefix-char", &meta_prefix_char,
|
||||||
|
|
|
@ -190,9 +190,6 @@ extern EMACS_INT num_nonmacro_input_events;
|
||||||
/* Nonzero means polling for input is temporarily suppressed. */
|
/* Nonzero means polling for input is temporarily suppressed. */
|
||||||
extern int poll_suppress_count;
|
extern int poll_suppress_count;
|
||||||
|
|
||||||
/* Nonzero if we are executing from the SIGIO signal handler. */
|
|
||||||
extern int in_sighandler;
|
|
||||||
|
|
||||||
/* Keymap mapping ASCII function key sequences onto their preferred forms.
|
/* Keymap mapping ASCII function key sequences onto their preferred forms.
|
||||||
Initialized by the terminal-specific lisp files. */
|
Initialized by the terminal-specific lisp files. */
|
||||||
extern Lisp_Object Vfunction_key_map;
|
extern Lisp_Object Vfunction_key_map;
|
||||||
|
|
22
src/mac.c
22
src/mac.c
|
@ -831,7 +831,7 @@ create_apple_event (class, id, result)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSErr
|
OSStatus
|
||||||
create_apple_event_from_event_ref (event, num_params, names, types, result)
|
create_apple_event_from_event_ref (event, num_params, names, types, result)
|
||||||
EventRef event;
|
EventRef event;
|
||||||
UInt32 num_params;
|
UInt32 num_params;
|
||||||
|
@ -839,7 +839,7 @@ create_apple_event_from_event_ref (event, num_params, names, types, result)
|
||||||
EventParamType *types;
|
EventParamType *types;
|
||||||
AppleEvent *result;
|
AppleEvent *result;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
UInt32 i, size;
|
UInt32 i, size;
|
||||||
CFStringRef string;
|
CFStringRef string;
|
||||||
CFDataRef data;
|
CFDataRef data;
|
||||||
|
@ -2424,7 +2424,7 @@ select (n, rfds, wfds, efds, timeout)
|
||||||
SELECT_TYPE *efds;
|
SELECT_TYPE *efds;
|
||||||
struct timeval *timeout;
|
struct timeval *timeout;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
EventTimeout timeout_sec =
|
EventTimeout timeout_sec =
|
||||||
(timeout
|
(timeout
|
||||||
|
@ -4192,7 +4192,7 @@ DEFUN ("mac-get-file-creator", Fmac_get_file_creator, Smac_get_file_creator, 1,
|
||||||
(filename)
|
(filename)
|
||||||
Lisp_Object filename;
|
Lisp_Object filename;
|
||||||
{
|
{
|
||||||
OSErr status;
|
OSStatus status;
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
FSRef fref;
|
FSRef fref;
|
||||||
#else
|
#else
|
||||||
|
@ -4246,7 +4246,7 @@ DEFUN ("mac-get-file-type", Fmac_get_file_type, Smac_get_file_type, 1, 1, 0,
|
||||||
(filename)
|
(filename)
|
||||||
Lisp_Object filename;
|
Lisp_Object filename;
|
||||||
{
|
{
|
||||||
OSErr status;
|
OSStatus status;
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
FSRef fref;
|
FSRef fref;
|
||||||
#else
|
#else
|
||||||
|
@ -4302,7 +4302,7 @@ assumed. Return non-nil if successful. */)
|
||||||
(filename, code)
|
(filename, code)
|
||||||
Lisp_Object filename, code;
|
Lisp_Object filename, code;
|
||||||
{
|
{
|
||||||
OSErr status;
|
OSStatus status;
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
FSRef fref;
|
FSRef fref;
|
||||||
#else
|
#else
|
||||||
|
@ -4362,7 +4362,7 @@ CODE must be a 4-character string. Return non-nil if successful. */)
|
||||||
(filename, code)
|
(filename, code)
|
||||||
Lisp_Object filename, code;
|
Lisp_Object filename, code;
|
||||||
{
|
{
|
||||||
OSErr status;
|
OSStatus status;
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
FSRef fref;
|
FSRef fref;
|
||||||
#else
|
#else
|
||||||
|
@ -4775,7 +4775,7 @@ cfstring_create_normalized (str, symbol)
|
||||||
UnicodeMapping map;
|
UnicodeMapping map;
|
||||||
CFIndex length;
|
CFIndex length;
|
||||||
UniChar *in_text, *buffer = NULL, *out_buf = NULL;
|
UniChar *in_text, *buffer = NULL, *out_buf = NULL;
|
||||||
OSErr err = noErr;
|
OSStatus err = noErr;
|
||||||
ByteCount out_read, out_size, out_len;
|
ByteCount out_read, out_size, out_len;
|
||||||
|
|
||||||
map.unicodeEncoding = CreateTextEncoding (kTextEncodingUnicodeDefault,
|
map.unicodeEncoding = CreateTextEncoding (kTextEncodingUnicodeDefault,
|
||||||
|
@ -4910,7 +4910,7 @@ On successful conversion, return the result string, else return nil. */)
|
||||||
static Lisp_Object
|
static Lisp_Object
|
||||||
mac_get_system_locale ()
|
mac_get_system_locale ()
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
LangCode lang;
|
LangCode lang;
|
||||||
RegionCode region;
|
RegionCode region;
|
||||||
LocaleRef locale;
|
LocaleRef locale;
|
||||||
|
@ -4987,7 +4987,7 @@ select_and_poll_event (n, rfds, wfds, efds, timeout)
|
||||||
struct timeval *timeout;
|
struct timeval *timeout;
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
|
|
||||||
r = select (n, rfds, wfds, efds, timeout);
|
r = select (n, rfds, wfds, efds, timeout);
|
||||||
if (r != -1)
|
if (r != -1)
|
||||||
|
@ -5017,7 +5017,7 @@ sys_select (n, rfds, wfds, efds, timeout)
|
||||||
SELECT_TYPE *efds;
|
SELECT_TYPE *efds;
|
||||||
struct timeval *timeout;
|
struct timeval *timeout;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
int i, r;
|
int i, r;
|
||||||
EMACS_TIME select_timeout;
|
EMACS_TIME select_timeout;
|
||||||
|
|
||||||
|
|
100
src/macfns.c
100
src/macfns.c
|
@ -1945,63 +1945,80 @@ static void
|
||||||
mac_update_proxy_icon (f)
|
mac_update_proxy_icon (f)
|
||||||
struct frame *f;
|
struct frame *f;
|
||||||
{
|
{
|
||||||
|
OSStatus err;
|
||||||
Lisp_Object file_name =
|
Lisp_Object file_name =
|
||||||
XBUFFER (XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer)->filename;
|
XBUFFER (XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer)->filename;
|
||||||
Window w = FRAME_MAC_WINDOW (f);
|
Window w = FRAME_MAC_WINDOW (f);
|
||||||
|
AliasHandle alias = NULL;
|
||||||
if (FRAME_FILE_NAME (f) == NULL && !STRINGP (file_name))
|
|
||||||
return;
|
|
||||||
if (FRAME_FILE_NAME (f) && STRINGP (file_name)
|
|
||||||
&& strcmp (FRAME_FILE_NAME (f), SDATA (file_name)) == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (FRAME_FILE_NAME (f))
|
|
||||||
{
|
|
||||||
xfree (FRAME_FILE_NAME (f));
|
|
||||||
FRAME_FILE_NAME (f) = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
BLOCK_INPUT;
|
BLOCK_INPUT;
|
||||||
|
|
||||||
|
err = GetWindowProxyAlias (w, &alias);
|
||||||
|
if (err == errWindowDoesNotHaveProxy && !STRINGP (file_name))
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (STRINGP (file_name))
|
if (STRINGP (file_name))
|
||||||
{
|
{
|
||||||
OSStatus err;
|
|
||||||
AEDesc desc;
|
AEDesc desc;
|
||||||
|
#ifdef MAC_OSX
|
||||||
|
FSRef fref;
|
||||||
|
#else
|
||||||
|
FSSpec fss;
|
||||||
|
#endif
|
||||||
|
Boolean changed;
|
||||||
Lisp_Object encoded_file_name = ENCODE_FILE (file_name);
|
Lisp_Object encoded_file_name = ENCODE_FILE (file_name);
|
||||||
|
|
||||||
#ifdef MAC_OS8
|
#ifdef MAC_OSX
|
||||||
SetPortWindowPort (w);
|
|
||||||
#endif
|
|
||||||
err = AECoercePtr (TYPE_FILE_NAME, SDATA (encoded_file_name),
|
err = AECoercePtr (TYPE_FILE_NAME, SDATA (encoded_file_name),
|
||||||
SBYTES (encoded_file_name), typeAlias, &desc);
|
SBYTES (encoded_file_name), typeFSRef, &desc);
|
||||||
|
#else
|
||||||
|
SetPortWindowPort (w);
|
||||||
|
err = AECoercePtr (TYPE_FILE_NAME, SDATA (encoded_file_name),
|
||||||
|
SBYTES (encoded_file_name), typeFSS, &desc);
|
||||||
|
#endif
|
||||||
if (err == noErr)
|
if (err == noErr)
|
||||||
{
|
{
|
||||||
Size size = AEGetDescDataSize (&desc);
|
#ifdef MAC_OSX
|
||||||
AliasHandle alias = (AliasHandle) NewHandle (size);
|
err = AEGetDescData (&desc, &fref, sizeof (FSRef));
|
||||||
|
#else
|
||||||
if (alias == NULL)
|
err = AEGetDescData (&desc, &fss, sizeof (FSSpec));
|
||||||
err = memFullErr;
|
#endif
|
||||||
else
|
|
||||||
{
|
|
||||||
HLock ((Handle) alias);
|
|
||||||
err = AEGetDescData (&desc, *alias, size);
|
|
||||||
HUnlock ((Handle) alias);
|
|
||||||
if (err == noErr)
|
|
||||||
err = SetWindowProxyAlias (w, alias);
|
|
||||||
DisposeHandle ((Handle) alias);
|
|
||||||
}
|
|
||||||
AEDisposeDesc (&desc);
|
AEDisposeDesc (&desc);
|
||||||
}
|
}
|
||||||
if (err == noErr)
|
if (err == noErr)
|
||||||
{
|
{
|
||||||
FRAME_FILE_NAME (f) = xmalloc (SBYTES (file_name) + 1);
|
if (alias)
|
||||||
strcpy (FRAME_FILE_NAME (f), SDATA (file_name));
|
{
|
||||||
|
#ifdef MAC_OSX
|
||||||
|
err = FSUpdateAlias (NULL, &fref, alias, &changed);
|
||||||
|
#else
|
||||||
|
err = UpdateAlias (NULL, &fss, alias, &changed);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
if (err != noErr || alias == NULL)
|
||||||
|
{
|
||||||
|
if (alias)
|
||||||
|
DisposeHandle ((Handle) alias);
|
||||||
|
#ifdef MAC_OSX
|
||||||
|
err = FSNewAliasMinimal (&fref, &alias);
|
||||||
|
#else
|
||||||
|
err = NewAliasMinimal (&fss, &alias);
|
||||||
|
#endif
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (err == noErr)
|
||||||
|
if (changed)
|
||||||
|
err = SetWindowProxyAlias (w, alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FRAME_FILE_NAME (f) == NULL)
|
if (alias)
|
||||||
|
DisposeHandle ((Handle) alias);
|
||||||
|
|
||||||
|
if (err != noErr || !STRINGP (file_name))
|
||||||
RemoveWindowProxy (w);
|
RemoveWindowProxy (w);
|
||||||
|
|
||||||
|
out:
|
||||||
UNBLOCK_INPUT;
|
UNBLOCK_INPUT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2566,7 +2583,6 @@ This function is an internal primitive--use `make-frame' instead. */)
|
||||||
f->output_data.mac = (struct mac_output *) xmalloc (sizeof (struct mac_output));
|
f->output_data.mac = (struct mac_output *) xmalloc (sizeof (struct mac_output));
|
||||||
bzero (f->output_data.mac, sizeof (struct mac_output));
|
bzero (f->output_data.mac, sizeof (struct mac_output));
|
||||||
FRAME_FONTSET (f) = -1;
|
FRAME_FONTSET (f) = -1;
|
||||||
record_unwind_protect (unwind_create_frame, frame);
|
|
||||||
|
|
||||||
f->icon_name
|
f->icon_name
|
||||||
= mac_get_arg (parms, Qicon_name, "iconName", "Title", RES_TYPE_STRING);
|
= mac_get_arg (parms, Qicon_name, "iconName", "Title", RES_TYPE_STRING);
|
||||||
|
@ -2574,6 +2590,9 @@ This function is an internal primitive--use `make-frame' instead. */)
|
||||||
f->icon_name = Qnil;
|
f->icon_name = Qnil;
|
||||||
|
|
||||||
/* FRAME_MAC_DISPLAY_INFO (f) = dpyinfo; */
|
/* FRAME_MAC_DISPLAY_INFO (f) = dpyinfo; */
|
||||||
|
|
||||||
|
/* With FRAME_MAC_DISPLAY_INFO set up, this unwind-protect is safe. */
|
||||||
|
record_unwind_protect (unwind_create_frame, frame);
|
||||||
#if GLYPH_DEBUG
|
#if GLYPH_DEBUG
|
||||||
image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
|
image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
|
||||||
dpyinfo_refcount = dpyinfo->reference_count;
|
dpyinfo_refcount = dpyinfo->reference_count;
|
||||||
|
@ -2876,14 +2895,9 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
|
||||||
CHECK_STRING (color);
|
CHECK_STRING (color);
|
||||||
|
|
||||||
if (mac_defined_color (f, SDATA (color), &foo, 0))
|
if (mac_defined_color (f, SDATA (color), &foo, 0))
|
||||||
{
|
return list3 (make_number (foo.red),
|
||||||
Lisp_Object rgb[3];
|
make_number (foo.green),
|
||||||
|
make_number (foo.blue));
|
||||||
rgb[0] = make_number (foo.red);
|
|
||||||
rgb[1] = make_number (foo.green);
|
|
||||||
rgb[2] = make_number (foo.blue);
|
|
||||||
return Flist (3, rgb);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,15 +31,15 @@ typedef int ScrapRef;
|
||||||
typedef ResType ScrapFlavorType;
|
typedef ResType ScrapFlavorType;
|
||||||
#endif /* !TARGET_API_MAC_CARBON */
|
#endif /* !TARGET_API_MAC_CARBON */
|
||||||
|
|
||||||
static OSErr get_scrap_from_symbol P_ ((Lisp_Object, int, ScrapRef *));
|
static OSStatus get_scrap_from_symbol P_ ((Lisp_Object, int, ScrapRef *));
|
||||||
static ScrapFlavorType get_flavor_type_from_symbol P_ ((Lisp_Object));
|
static ScrapFlavorType get_flavor_type_from_symbol P_ ((Lisp_Object));
|
||||||
static int valid_scrap_target_type_p P_ ((Lisp_Object));
|
static int valid_scrap_target_type_p P_ ((Lisp_Object));
|
||||||
static OSErr clear_scrap P_ ((ScrapRef *));
|
static OSStatus clear_scrap P_ ((ScrapRef *));
|
||||||
static OSErr put_scrap_string P_ ((ScrapRef, Lisp_Object, Lisp_Object));
|
static OSStatus put_scrap_string P_ ((ScrapRef, Lisp_Object, Lisp_Object));
|
||||||
static OSErr put_scrap_private_timestamp P_ ((ScrapRef, unsigned long));
|
static OSStatus put_scrap_private_timestamp P_ ((ScrapRef, unsigned long));
|
||||||
static ScrapFlavorType scrap_has_target_type P_ ((ScrapRef, Lisp_Object));
|
static ScrapFlavorType scrap_has_target_type P_ ((ScrapRef, Lisp_Object));
|
||||||
static Lisp_Object get_scrap_string P_ ((ScrapRef, Lisp_Object));
|
static Lisp_Object get_scrap_string P_ ((ScrapRef, Lisp_Object));
|
||||||
static OSErr get_scrap_private_timestamp P_ ((ScrapRef, unsigned long *));
|
static OSStatus get_scrap_private_timestamp P_ ((ScrapRef, unsigned long *));
|
||||||
static Lisp_Object get_scrap_target_type_list P_ ((ScrapRef));
|
static Lisp_Object get_scrap_target_type_list P_ ((ScrapRef));
|
||||||
static void x_own_selection P_ ((Lisp_Object, Lisp_Object));
|
static void x_own_selection P_ ((Lisp_Object, Lisp_Object));
|
||||||
static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int));
|
static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int));
|
||||||
|
@ -108,13 +108,13 @@ static Lisp_Object Vmac_service_selection;
|
||||||
reference is set to *SCRAP, and it becomes NULL if there's no
|
reference is set to *SCRAP, and it becomes NULL if there's no
|
||||||
corresponding scrap. Clear the scrap if CLEAR_P is non-zero. */
|
corresponding scrap. Clear the scrap if CLEAR_P is non-zero. */
|
||||||
|
|
||||||
static OSErr
|
static OSStatus
|
||||||
get_scrap_from_symbol (sym, clear_p, scrap)
|
get_scrap_from_symbol (sym, clear_p, scrap)
|
||||||
Lisp_Object sym;
|
Lisp_Object sym;
|
||||||
int clear_p;
|
int clear_p;
|
||||||
ScrapRef *scrap;
|
ScrapRef *scrap;
|
||||||
{
|
{
|
||||||
OSErr err = noErr;
|
OSStatus err = noErr;
|
||||||
Lisp_Object str = Fget (sym, Qmac_scrap_name);
|
Lisp_Object str = Fget (sym, Qmac_scrap_name);
|
||||||
|
|
||||||
if (!STRINGP (str))
|
if (!STRINGP (str))
|
||||||
|
@ -172,7 +172,7 @@ valid_scrap_target_type_p (sym)
|
||||||
|
|
||||||
/* Clear the scrap whose reference is *SCRAP. */
|
/* Clear the scrap whose reference is *SCRAP. */
|
||||||
|
|
||||||
static INLINE OSErr
|
static INLINE OSStatus
|
||||||
clear_scrap (scrap)
|
clear_scrap (scrap)
|
||||||
ScrapRef *scrap;
|
ScrapRef *scrap;
|
||||||
{
|
{
|
||||||
|
@ -190,7 +190,7 @@ clear_scrap (scrap)
|
||||||
/* Put Lisp String STR to the scrap SCRAP. The target type is
|
/* Put Lisp String STR to the scrap SCRAP. The target type is
|
||||||
specified by TYPE. */
|
specified by TYPE. */
|
||||||
|
|
||||||
static OSErr
|
static OSStatus
|
||||||
put_scrap_string (scrap, type, str)
|
put_scrap_string (scrap, type, str)
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
Lisp_Object type, str;
|
Lisp_Object type, str;
|
||||||
|
@ -211,7 +211,7 @@ put_scrap_string (scrap, type, str)
|
||||||
/* Put TIMESTAMP to the scrap SCRAP. The timestamp is used for
|
/* Put TIMESTAMP to the scrap SCRAP. The timestamp is used for
|
||||||
checking if the scrap is owned by the process. */
|
checking if the scrap is owned by the process. */
|
||||||
|
|
||||||
static INLINE OSErr
|
static INLINE OSStatus
|
||||||
put_scrap_private_timestamp (scrap, timestamp)
|
put_scrap_private_timestamp (scrap, timestamp)
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
unsigned long timestamp;
|
unsigned long timestamp;
|
||||||
|
@ -233,7 +233,7 @@ scrap_has_target_type (scrap, type)
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
Lisp_Object type;
|
Lisp_Object type;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type);
|
ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type);
|
||||||
|
|
||||||
if (flavor_type)
|
if (flavor_type)
|
||||||
|
@ -264,7 +264,7 @@ get_scrap_string (scrap, type)
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
Lisp_Object type;
|
Lisp_Object type;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
Lisp_Object result = Qnil;
|
Lisp_Object result = Qnil;
|
||||||
ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type);
|
ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type);
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
|
@ -310,12 +310,12 @@ get_scrap_string (scrap, type)
|
||||||
|
|
||||||
/* Get timestamp from the scrap SCRAP and set to *TIMPSTAMP. */
|
/* Get timestamp from the scrap SCRAP and set to *TIMPSTAMP. */
|
||||||
|
|
||||||
static OSErr
|
static OSStatus
|
||||||
get_scrap_private_timestamp (scrap, timestamp)
|
get_scrap_private_timestamp (scrap, timestamp)
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
unsigned long *timestamp;
|
unsigned long *timestamp;
|
||||||
{
|
{
|
||||||
OSErr err = noErr;
|
OSStatus err = noErr;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
ScrapFlavorFlags flags;
|
ScrapFlavorFlags flags;
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ get_scrap_target_type_list (scrap)
|
||||||
{
|
{
|
||||||
Lisp_Object result = Qnil, rest, target_type;
|
Lisp_Object result = Qnil, rest, target_type;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
UInt32 count, i, type;
|
UInt32 count, i, type;
|
||||||
ScrapFlavorInfo *flavor_info = NULL;
|
ScrapFlavorInfo *flavor_info = NULL;
|
||||||
Lisp_Object strings = Qnil;
|
Lisp_Object strings = Qnil;
|
||||||
|
@ -425,7 +425,7 @@ static void
|
||||||
x_own_selection (selection_name, selection_value)
|
x_own_selection (selection_name, selection_value)
|
||||||
Lisp_Object selection_name, selection_value;
|
Lisp_Object selection_name, selection_value;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
struct gcpro gcpro1, gcpro2;
|
struct gcpro gcpro1, gcpro2;
|
||||||
Lisp_Object rest, handler_fn, value, type;
|
Lisp_Object rest, handler_fn, value, type;
|
||||||
|
@ -671,7 +671,7 @@ static Lisp_Object
|
||||||
x_get_foreign_selection (selection_symbol, target_type, time_stamp)
|
x_get_foreign_selection (selection_symbol, target_type, time_stamp)
|
||||||
Lisp_Object selection_symbol, target_type, time_stamp;
|
Lisp_Object selection_symbol, target_type, time_stamp;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
Lisp_Object result = Qnil;
|
Lisp_Object result = Qnil;
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ Disowning it means there is no such selection. */)
|
||||||
Lisp_Object selection;
|
Lisp_Object selection;
|
||||||
Lisp_Object time;
|
Lisp_Object time;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
Lisp_Object local_selection_data;
|
Lisp_Object local_selection_data;
|
||||||
|
|
||||||
|
@ -828,7 +828,7 @@ and t is the same as `SECONDARY'. */)
|
||||||
(selection)
|
(selection)
|
||||||
Lisp_Object selection;
|
Lisp_Object selection;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
Lisp_Object result = Qnil, local_selection_data;
|
Lisp_Object result = Qnil, local_selection_data;
|
||||||
|
|
||||||
|
@ -873,7 +873,7 @@ and t is the same as `SECONDARY'. */)
|
||||||
(selection)
|
(selection)
|
||||||
Lisp_Object selection;
|
Lisp_Object selection;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ScrapRef scrap;
|
ScrapRef scrap;
|
||||||
Lisp_Object result = Qnil, rest;
|
Lisp_Object result = Qnil, rest;
|
||||||
|
|
||||||
|
@ -931,7 +931,7 @@ struct suspended_ae_info
|
||||||
struct suspended_ae_info *next;
|
struct suspended_ae_info *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* List of deferred apple events at the startup time. */
|
/* List of apple events deferred at the startup time. */
|
||||||
static struct suspended_ae_info *deferred_apple_events = NULL;
|
static struct suspended_ae_info *deferred_apple_events = NULL;
|
||||||
|
|
||||||
/* List of suspended apple events, in order of expiration_tick. */
|
/* List of suspended apple events, in order of expiration_tick. */
|
||||||
|
|
|
@ -904,7 +904,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
|
||||||
#if USE_ATSUI
|
#if USE_ATSUI
|
||||||
if (GC_FONT (gc)->mac_style)
|
if (GC_FONT (gc)->mac_style)
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ATSUTextLayout text_layout;
|
ATSUTextLayout text_layout;
|
||||||
|
|
||||||
xassert (bytes_per_char == 2);
|
xassert (bytes_per_char == 2);
|
||||||
|
@ -1131,7 +1131,7 @@ mac_draw_image_string_16 (f, gc, x, y, buf, nchars, bg_width)
|
||||||
the font of the current graphics port. If CG_GLYPH is not NULL,
|
the font of the current graphics port. If CG_GLYPH is not NULL,
|
||||||
*CG_GLYPH is set to the glyph ID or 0 if it cannot be obtained. */
|
*CG_GLYPH is set to the glyph ID or 0 if it cannot be obtained. */
|
||||||
|
|
||||||
static OSErr
|
static OSStatus
|
||||||
mac_query_char_extents (style, c,
|
mac_query_char_extents (style, c,
|
||||||
font_ascent_return, font_descent_return,
|
font_ascent_return, font_descent_return,
|
||||||
overall_return, cg_glyph)
|
overall_return, cg_glyph)
|
||||||
|
@ -1149,7 +1149,7 @@ mac_query_char_extents (style, c,
|
||||||
void *cg_glyph;
|
void *cg_glyph;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
OSErr err = noErr;
|
OSStatus err = noErr;
|
||||||
int width;
|
int width;
|
||||||
Rect char_bounds;
|
Rect char_bounds;
|
||||||
|
|
||||||
|
@ -1195,7 +1195,7 @@ mac_query_char_extents (style, c,
|
||||||
#if USE_CG_TEXT_DRAWING
|
#if USE_CG_TEXT_DRAWING
|
||||||
if (err == noErr && cg_glyph)
|
if (err == noErr && cg_glyph)
|
||||||
{
|
{
|
||||||
OSErr err1;
|
OSStatus err1;
|
||||||
ATSUGlyphInfoArray glyph_info_array;
|
ATSUGlyphInfoArray glyph_info_array;
|
||||||
ByteCount count = sizeof (ATSUGlyphInfoArray);
|
ByteCount count = sizeof (ATSUGlyphInfoArray);
|
||||||
|
|
||||||
|
@ -3585,7 +3585,9 @@ x_draw_stretch_glyph_string (s)
|
||||||
int background_width = s->background_width;
|
int background_width = s->background_width;
|
||||||
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
|
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
|
||||||
|
|
||||||
if (x < left_x)
|
/* Don't draw into left margin, fringe or scrollbar area
|
||||||
|
except for header line and mode line. */
|
||||||
|
if (x < left_x && !s->row->mode_line_p)
|
||||||
{
|
{
|
||||||
background_width -= left_x - x;
|
background_width -= left_x - x;
|
||||||
x = left_x;
|
x = left_x;
|
||||||
|
@ -3679,14 +3681,14 @@ x_draw_glyph_string (s)
|
||||||
|
|
||||||
if (s->face->underline_defaulted_p)
|
if (s->face->underline_defaulted_p)
|
||||||
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
||||||
s->width, h);
|
s->background_width, h);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XGCValues xgcv;
|
XGCValues xgcv;
|
||||||
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
||||||
XSetForeground (s->display, s->gc, s->face->underline_color);
|
XSetForeground (s->display, s->gc, s->face->underline_color);
|
||||||
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
||||||
s->width, h);
|
s->background_width, h);
|
||||||
XSetForeground (s->display, s->gc, xgcv.foreground);
|
XSetForeground (s->display, s->gc, xgcv.foreground);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3698,14 +3700,14 @@ x_draw_glyph_string (s)
|
||||||
|
|
||||||
if (s->face->overline_color_defaulted_p)
|
if (s->face->overline_color_defaulted_p)
|
||||||
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
||||||
s->width, h);
|
s->background_width, h);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XGCValues xgcv;
|
XGCValues xgcv;
|
||||||
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
||||||
XSetForeground (s->display, s->gc, s->face->overline_color);
|
XSetForeground (s->display, s->gc, s->face->overline_color);
|
||||||
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
mac_fill_rectangle (s->f, s->gc, s->x, s->y + dy,
|
||||||
s->width, h);
|
s->background_width, h);
|
||||||
XSetForeground (s->display, s->gc, xgcv.foreground);
|
XSetForeground (s->display, s->gc, xgcv.foreground);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6331,7 +6333,7 @@ void
|
||||||
x_iconify_frame (f)
|
x_iconify_frame (f)
|
||||||
struct frame *f;
|
struct frame *f;
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
|
|
||||||
/* A deactivate event does not occur when the last visible frame is
|
/* A deactivate event does not occur when the last visible frame is
|
||||||
iconified. So if we clear the highlight here, it will not be
|
iconified. So if we clear the highlight here, it will not be
|
||||||
|
@ -6395,11 +6397,6 @@ x_free_frame_resources (f)
|
||||||
if (FRAME_SIZE_HINTS (f))
|
if (FRAME_SIZE_HINTS (f))
|
||||||
xfree (FRAME_SIZE_HINTS (f));
|
xfree (FRAME_SIZE_HINTS (f));
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
|
||||||
if (FRAME_FILE_NAME (f))
|
|
||||||
xfree (FRAME_FILE_NAME (f));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
xfree (f->output_data.mac);
|
xfree (f->output_data.mac);
|
||||||
f->output_data.mac = NULL;
|
f->output_data.mac = NULL;
|
||||||
|
|
||||||
|
@ -7217,7 +7214,7 @@ init_font_name_table ()
|
||||||
if (!NILP (assq_no_quit (make_number (kTextEncodingMacUnicode),
|
if (!NILP (assq_no_quit (make_number (kTextEncodingMacUnicode),
|
||||||
text_encoding_info_alist)))
|
text_encoding_info_alist)))
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
struct Lisp_Hash_Table *h;
|
struct Lisp_Hash_Table *h;
|
||||||
unsigned hash_code;
|
unsigned hash_code;
|
||||||
ItemCount nfonts, i;
|
ItemCount nfonts, i;
|
||||||
|
@ -7799,7 +7796,7 @@ XLoadQueryFont (Display *dpy, char *fontname)
|
||||||
#if USE_ATSUI
|
#if USE_ATSUI
|
||||||
if (strcmp (charset, "iso10646-1") == 0) /* XXX */
|
if (strcmp (charset, "iso10646-1") == 0) /* XXX */
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
ATSUAttributeTag tags[] = {kATSUFontTag, kATSUSizeTag,
|
ATSUAttributeTag tags[] = {kATSUFontTag, kATSUSizeTag,
|
||||||
kATSUQDBoldfaceTag, kATSUQDItalicTag};
|
kATSUQDBoldfaceTag, kATSUQDItalicTag};
|
||||||
ByteCount sizes[] = {sizeof (ATSUFontID), sizeof (Fixed),
|
ByteCount sizes[] = {sizeof (ATSUFontID), sizeof (Fixed),
|
||||||
|
@ -7882,7 +7879,7 @@ XLoadQueryFont (Display *dpy, char *fontname)
|
||||||
#if USE_ATSUI
|
#if USE_ATSUI
|
||||||
if (font->mac_style)
|
if (font->mac_style)
|
||||||
{
|
{
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
UniChar c;
|
UniChar c;
|
||||||
|
|
||||||
font->min_byte1 = 0;
|
font->min_byte1 = 0;
|
||||||
|
@ -8363,8 +8360,8 @@ x_query_font (f, fontname)
|
||||||
|
|
||||||
for (i = 0; i < dpyinfo->n_fonts; i++)
|
for (i = 0; i < dpyinfo->n_fonts; i++)
|
||||||
if (dpyinfo->font_table[i].name
|
if (dpyinfo->font_table[i].name
|
||||||
&& (!strcmp (dpyinfo->font_table[i].name, fontname)
|
&& (!xstricmp (dpyinfo->font_table[i].name, fontname)
|
||||||
|| !strcmp (dpyinfo->font_table[i].full_name, fontname)))
|
|| !xstricmp (dpyinfo->font_table[i].full_name, fontname)))
|
||||||
return (dpyinfo->font_table + i);
|
return (dpyinfo->font_table + i);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -8558,7 +8555,7 @@ Point saved_menu_event_location;
|
||||||
|
|
||||||
/* Apple Events */
|
/* Apple Events */
|
||||||
#if USE_CARBON_EVENTS
|
#if USE_CARBON_EVENTS
|
||||||
static Lisp_Object Qhicommand;
|
static Lisp_Object Qhi_command;
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
extern Lisp_Object Qwindow;
|
extern Lisp_Object Qwindow;
|
||||||
static Lisp_Object Qtoolbar_switch_mode;
|
static Lisp_Object Qtoolbar_switch_mode;
|
||||||
|
@ -8600,7 +8597,7 @@ static Lisp_Object Qservice, Qpaste, Qperform;
|
||||||
static pascal OSStatus mac_handle_window_event (EventHandlerCallRef,
|
static pascal OSStatus mac_handle_window_event (EventHandlerCallRef,
|
||||||
EventRef, void *);
|
EventRef, void *);
|
||||||
#endif
|
#endif
|
||||||
OSErr install_window_handler (WindowPtr);
|
OSStatus install_window_handler (WindowPtr);
|
||||||
|
|
||||||
extern void init_emacs_passwd_dir ();
|
extern void init_emacs_passwd_dir ();
|
||||||
extern int emacs_main (int, char **, char **);
|
extern int emacs_main (int, char **, char **);
|
||||||
|
@ -9401,15 +9398,15 @@ mac_handle_command_event (next_handler, event, data)
|
||||||
if (err != noErr || command.commandID == 0)
|
if (err != noErr || command.commandID == 0)
|
||||||
return eventNotHandledErr;
|
return eventNotHandledErr;
|
||||||
|
|
||||||
/* A HICommand event is mapped to an Apple event whose event class
|
/* A HI command event is mapped to an Apple event whose event class
|
||||||
symbol is `hicommand' and event ID is its command ID. */
|
symbol is `hi-command' and event ID is its command ID. */
|
||||||
err = mac_store_event_ref_as_apple_event (0, command.commandID,
|
err = mac_store_event_ref_as_apple_event (0, command.commandID,
|
||||||
Qhicommand, Qnil,
|
Qhi_command, Qnil,
|
||||||
event, num_params, names, types);
|
event, num_params, names, types);
|
||||||
return err == noErr ? noErr : eventNotHandledErr;
|
return err == noErr ? noErr : eventNotHandledErr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static OSErr
|
static OSStatus
|
||||||
init_command_handler ()
|
init_command_handler ()
|
||||||
{
|
{
|
||||||
EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}};
|
EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}};
|
||||||
|
@ -9910,11 +9907,11 @@ mac_store_service_event (event)
|
||||||
#endif /* USE_CARBON_EVENTS */
|
#endif /* USE_CARBON_EVENTS */
|
||||||
|
|
||||||
|
|
||||||
OSErr
|
OSStatus
|
||||||
install_window_handler (window)
|
install_window_handler (window)
|
||||||
WindowPtr window;
|
WindowPtr window;
|
||||||
{
|
{
|
||||||
OSErr err = noErr;
|
OSStatus err = noErr;
|
||||||
#if USE_CARBON_EVENTS
|
#if USE_CARBON_EVENTS
|
||||||
EventTypeSpec specs_window[] =
|
EventTypeSpec specs_window[] =
|
||||||
{{kEventClassWindow, kEventWindowUpdate},
|
{{kEventClassWindow, kEventWindowUpdate},
|
||||||
|
@ -11324,7 +11321,7 @@ static void
|
||||||
init_menu_bar ()
|
init_menu_bar ()
|
||||||
{
|
{
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
OSErr err;
|
OSStatus err;
|
||||||
MenuRef menu;
|
MenuRef menu;
|
||||||
MenuItemIndex menu_index;
|
MenuItemIndex menu_index;
|
||||||
|
|
||||||
|
@ -11507,7 +11504,7 @@ syms_of_macterm ()
|
||||||
Fput (Qsuper, Qmodifier_value, make_number (super_modifier));
|
Fput (Qsuper, Qmodifier_value, make_number (super_modifier));
|
||||||
|
|
||||||
#if USE_CARBON_EVENTS
|
#if USE_CARBON_EVENTS
|
||||||
Qhicommand = intern ("hicommand"); staticpro (&Qhicommand);
|
Qhi_command = intern ("hi-command"); staticpro (&Qhi_command);
|
||||||
#ifdef MAC_OSX
|
#ifdef MAC_OSX
|
||||||
Qtoolbar_switch_mode = intern ("toolbar-switch-mode");
|
Qtoolbar_switch_mode = intern ("toolbar-switch-mode");
|
||||||
staticpro (&Qtoolbar_switch_mode);
|
staticpro (&Qtoolbar_switch_mode);
|
||||||
|
|
|
@ -335,11 +335,6 @@ struct mac_output {
|
||||||
/* Hints for the size and the position of a window. */
|
/* Hints for the size and the position of a window. */
|
||||||
XSizeHints *size_hints;
|
XSizeHints *size_hints;
|
||||||
|
|
||||||
#if TARGET_API_MAC_CARBON
|
|
||||||
/* File name for the proxy icon of this frame. Might be NULL. */
|
|
||||||
char *file_name;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USE_CG_DRAWING
|
#if USE_CG_DRAWING
|
||||||
/* Quartz 2D graphics context. */
|
/* Quartz 2D graphics context. */
|
||||||
CGContextRef cg_context;
|
CGContextRef cg_context;
|
||||||
|
@ -365,8 +360,6 @@ typedef struct mac_output mac_output;
|
||||||
|
|
||||||
#define FRAME_SIZE_HINTS(f) ((f)->output_data.mac->size_hints)
|
#define FRAME_SIZE_HINTS(f) ((f)->output_data.mac->size_hints)
|
||||||
|
|
||||||
#define FRAME_FILE_NAME(f) ((f)->output_data.mac->file_name)
|
|
||||||
|
|
||||||
/* This gives the mac_display_info structure for the display F is on. */
|
/* This gives the mac_display_info structure for the display F is on. */
|
||||||
#define FRAME_MAC_DISPLAY_INFO(f) (&one_mac_display_info)
|
#define FRAME_MAC_DISPLAY_INFO(f) (&one_mac_display_info)
|
||||||
#define FRAME_X_DISPLAY_INFO(f) (&one_mac_display_info)
|
#define FRAME_X_DISPLAY_INFO(f) (&one_mac_display_info)
|
||||||
|
@ -634,7 +627,7 @@ extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
|
||||||
extern int mac_font_panel_visible_p P_ ((void));
|
extern int mac_font_panel_visible_p P_ ((void));
|
||||||
extern OSStatus mac_show_hide_font_panel P_ ((void));
|
extern OSStatus mac_show_hide_font_panel P_ ((void));
|
||||||
extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int));
|
extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int));
|
||||||
extern OSErr install_window_handler P_ ((WindowPtr));
|
extern OSStatus install_window_handler P_ ((WindowPtr));
|
||||||
extern void remove_window_handler P_ ((WindowPtr));
|
extern void remove_window_handler P_ ((WindowPtr));
|
||||||
extern void do_menu_choice P_ ((SInt32));
|
extern void do_menu_choice P_ ((SInt32));
|
||||||
extern OSStatus mac_post_mouse_moved_event P_ ((void));
|
extern OSStatus mac_post_mouse_moved_event P_ ((void));
|
||||||
|
@ -675,10 +668,10 @@ extern void mac_clear_font_name_table P_ ((void));
|
||||||
extern Lisp_Object mac_aedesc_to_lisp P_ ((const AEDesc *));
|
extern Lisp_Object mac_aedesc_to_lisp P_ ((const AEDesc *));
|
||||||
extern OSErr mac_ae_put_lisp P_ ((AEDescList *, UInt32, Lisp_Object));
|
extern OSErr mac_ae_put_lisp P_ ((AEDescList *, UInt32, Lisp_Object));
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
extern OSErr create_apple_event_from_event_ref P_ ((EventRef, UInt32,
|
extern OSStatus create_apple_event_from_event_ref P_ ((EventRef, UInt32,
|
||||||
EventParamName *,
|
EventParamName *,
|
||||||
EventParamType *,
|
EventParamType *,
|
||||||
AppleEvent *));
|
AppleEvent *));
|
||||||
extern OSErr create_apple_event_from_drag_ref P_ ((DragRef, UInt32,
|
extern OSErr create_apple_event_from_drag_ref P_ ((DragRef, UInt32,
|
||||||
FlavorType *,
|
FlavorType *,
|
||||||
AppleEvent *));
|
AppleEvent *));
|
||||||
|
|
17
src/w32fns.c
17
src/w32fns.c
|
@ -6417,17 +6417,12 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
|
||||||
CHECK_STRING (color);
|
CHECK_STRING (color);
|
||||||
|
|
||||||
if (w32_defined_color (f, SDATA (color), &foo, 0))
|
if (w32_defined_color (f, SDATA (color), &foo, 0))
|
||||||
{
|
return list3 (make_number ((GetRValue (foo.pixel) << 8)
|
||||||
Lisp_Object rgb[3];
|
| GetRValue (foo.pixel)),
|
||||||
|
make_number ((GetGValue (foo.pixel) << 8)
|
||||||
rgb[0] = make_number ((GetRValue (foo.pixel) << 8)
|
| GetGValue (foo.pixel)),
|
||||||
| GetRValue (foo.pixel));
|
make_number ((GetBValue (foo.pixel) << 8)
|
||||||
rgb[1] = make_number ((GetGValue (foo.pixel) << 8)
|
| GetBValue (foo.pixel)));
|
||||||
| GetGValue (foo.pixel));
|
|
||||||
rgb[2] = make_number ((GetBValue (foo.pixel) << 8)
|
|
||||||
| GetBValue (foo.pixel));
|
|
||||||
return Flist (3, rgb);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,10 @@ static Lisp_Object last_window;
|
||||||
(Not yet supported, see TODO in x_draw_glyph_string.) */
|
(Not yet supported, see TODO in x_draw_glyph_string.) */
|
||||||
int x_use_underline_position_properties;
|
int x_use_underline_position_properties;
|
||||||
|
|
||||||
|
/* Non-zero means to draw the underline at the same place as the descent line. */
|
||||||
|
|
||||||
|
int x_underline_at_descent_line;
|
||||||
|
|
||||||
extern unsigned int msh_mousewheel;
|
extern unsigned int msh_mousewheel;
|
||||||
|
|
||||||
extern void free_frame_menubar ();
|
extern void free_frame_menubar ();
|
||||||
|
@ -2569,7 +2573,9 @@ x_draw_stretch_glyph_string (s)
|
||||||
int background_width = s->background_width;
|
int background_width = s->background_width;
|
||||||
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
|
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
|
||||||
|
|
||||||
if (x < left_x)
|
/* Don't draw into left margin, fringe or scrollbar area
|
||||||
|
except for header line and mode line. */
|
||||||
|
if (x < left_x && !s->row->mode_line_p)
|
||||||
{
|
{
|
||||||
background_width -= left_x - x;
|
background_width -= left_x - x;
|
||||||
x = left_x;
|
x = left_x;
|
||||||
|
@ -2658,21 +2664,27 @@ x_draw_glyph_string (s)
|
||||||
&& (s->font->bdf || !s->font->tm.tmUnderlined))
|
&& (s->font->bdf || !s->font->tm.tmUnderlined))
|
||||||
{
|
{
|
||||||
unsigned long h = 1;
|
unsigned long h = 1;
|
||||||
unsigned long dy = s->height - h;
|
unsigned long dy = 0;
|
||||||
|
|
||||||
/* TODO: Use font information for positioning and thickness
|
if (x_underline_at_descent_line)
|
||||||
of underline. See OUTLINETEXTMETRIC, and xterm.c.
|
dy = s->height - h;
|
||||||
Note: If you make this work, don't forget to change the
|
else
|
||||||
doc string of x-use-underline-position-properties below. */
|
{
|
||||||
|
/* TODO: Use font information for positioning and thickness of
|
||||||
|
underline. See OUTLINETEXTMETRIC, and xterm.c. Note: If
|
||||||
|
you make this work, don't forget to change the doc string of
|
||||||
|
x-use-underline-position-properties below. */
|
||||||
|
dy = s->height - h;
|
||||||
|
}
|
||||||
if (s->face->underline_defaulted_p)
|
if (s->face->underline_defaulted_p)
|
||||||
{
|
{
|
||||||
w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
|
w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
|
||||||
s->y + dy, s->width, 1);
|
s->y + dy, s->background_width, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
|
w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
|
||||||
s->y + dy, s->width, 1);
|
s->y + dy, s->background_width, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2684,12 +2696,12 @@ x_draw_glyph_string (s)
|
||||||
if (s->face->overline_color_defaulted_p)
|
if (s->face->overline_color_defaulted_p)
|
||||||
{
|
{
|
||||||
w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
|
w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
|
||||||
s->y + dy, s->width, h);
|
s->y + dy, s->background_width, h);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
|
w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
|
||||||
s->y + dy, s->width, h);
|
s->y + dy, s->background_width, h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6685,6 +6697,14 @@ to 4.1, set this to nil.
|
||||||
NOTE: Not supported on MS-Windows yet. */);
|
NOTE: Not supported on MS-Windows yet. */);
|
||||||
x_use_underline_position_properties = 0;
|
x_use_underline_position_properties = 0;
|
||||||
|
|
||||||
|
DEFVAR_BOOL ("x-underline-at-descent-line",
|
||||||
|
&x_underline_at_descent_line,
|
||||||
|
doc: /* *Non-nil means to draw the underline at the same place as the descent line.
|
||||||
|
nil means to draw the underline according to the value of the variable
|
||||||
|
`x-use-underline-position-properties', which is usually at the baseline
|
||||||
|
level. The default value is nil. */);
|
||||||
|
x_underline_at_descent_line = 0;
|
||||||
|
|
||||||
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
|
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
|
||||||
doc: /* If not nil, Emacs uses toolkit scroll bars. */);
|
doc: /* If not nil, Emacs uses toolkit scroll bars. */);
|
||||||
Vx_toolkit_scroll_bars = Qt;
|
Vx_toolkit_scroll_bars = Qt;
|
||||||
|
|
15
src/window.c
15
src/window.c
|
@ -6656,10 +6656,12 @@ display marginal areas and the text area. */)
|
||||||
CHECK_NATNUM (left_width);
|
CHECK_NATNUM (left_width);
|
||||||
if (!NILP (right_width))
|
if (!NILP (right_width))
|
||||||
CHECK_NATNUM (right_width);
|
CHECK_NATNUM (right_width);
|
||||||
|
|
||||||
if (!EQ (w->left_fringe_width, left_width)
|
/* Do nothing on a tty. */
|
||||||
|| !EQ (w->right_fringe_width, right_width)
|
if (FRAME_WINDOW_P (WINDOW_XFRAME (w))
|
||||||
|| !EQ (w->fringes_outside_margins, outside_margins))
|
&& (!EQ (w->left_fringe_width, left_width)
|
||||||
|
|| !EQ (w->right_fringe_width, right_width)
|
||||||
|
|| !EQ (w->fringes_outside_margins, outside_margins)))
|
||||||
{
|
{
|
||||||
w->left_fringe_width = left_width;
|
w->left_fringe_width = left_width;
|
||||||
w->right_fringe_width = right_width;
|
w->right_fringe_width = right_width;
|
||||||
|
@ -6687,10 +6689,11 @@ Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). */)
|
||||||
Lisp_Object window;
|
Lisp_Object window;
|
||||||
{
|
{
|
||||||
struct window *w = decode_window (window);
|
struct window *w = decode_window (window);
|
||||||
|
|
||||||
return Fcons (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)),
|
return Fcons (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)),
|
||||||
Fcons (make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)),
|
Fcons (make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)),
|
||||||
Fcons ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) ?
|
Fcons ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
|
||||||
Qt : Qnil), Qnil)));
|
? Qt : Qnil), Qnil)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
46
src/xdisp.c
46
src/xdisp.c
|
@ -717,6 +717,10 @@ Lisp_Object Vresize_mini_windows;
|
||||||
|
|
||||||
struct buffer *displayed_buffer;
|
struct buffer *displayed_buffer;
|
||||||
|
|
||||||
|
/* Space between overline and text. */
|
||||||
|
|
||||||
|
EMACS_INT overline_margin;
|
||||||
|
|
||||||
/* Value returned from text property handlers (see below). */
|
/* Value returned from text property handlers (see below). */
|
||||||
|
|
||||||
enum prop_handled
|
enum prop_handled
|
||||||
|
@ -9545,7 +9549,8 @@ update_tool_bar (f, save_match_data)
|
||||||
&new_n_tool_bar);
|
&new_n_tool_bar);
|
||||||
|
|
||||||
/* Redisplay the tool-bar if we changed it. */
|
/* Redisplay the tool-bar if we changed it. */
|
||||||
if (NILP (Fequal (new_tool_bar, f->tool_bar_items)))
|
if (new_n_tool_bar != f->n_tool_bar_items
|
||||||
|
|| NILP (Fequal (new_tool_bar, f->tool_bar_items)))
|
||||||
{
|
{
|
||||||
/* Redisplay that happens asynchronously due to an expose event
|
/* Redisplay that happens asynchronously due to an expose event
|
||||||
may access f->tool_bar_items. Make sure we update both
|
may access f->tool_bar_items. Make sure we update both
|
||||||
|
@ -20611,7 +20616,7 @@ x_produce_glyphs (it)
|
||||||
/* If face has an overline, add the height of the overline
|
/* If face has an overline, add the height of the overline
|
||||||
(1 pixel) and a 1 pixel margin to the character height. */
|
(1 pixel) and a 1 pixel margin to the character height. */
|
||||||
if (face->overline_p)
|
if (face->overline_p)
|
||||||
it->ascent += 2;
|
it->ascent += overline_margin;
|
||||||
|
|
||||||
if (it->constrain_row_ascent_descent_p)
|
if (it->constrain_row_ascent_descent_p)
|
||||||
{
|
{
|
||||||
|
@ -20811,7 +20816,7 @@ x_produce_glyphs (it)
|
||||||
/* If face has an overline, add the height of the overline
|
/* If face has an overline, add the height of the overline
|
||||||
(1 pixel) and a 1 pixel margin to the character height. */
|
(1 pixel) and a 1 pixel margin to the character height. */
|
||||||
if (face->overline_p)
|
if (face->overline_p)
|
||||||
it->ascent += 2;
|
it->ascent += overline_margin;
|
||||||
|
|
||||||
take_vertical_position_into_account (it);
|
take_vertical_position_into_account (it);
|
||||||
|
|
||||||
|
@ -21166,7 +21171,7 @@ x_produce_glyphs (it)
|
||||||
/* If face has an overline, add the height of the overline
|
/* If face has an overline, add the height of the overline
|
||||||
(1 pixel) and a 1 pixel margin to the character height. */
|
(1 pixel) and a 1 pixel margin to the character height. */
|
||||||
if (face->overline_p)
|
if (face->overline_p)
|
||||||
it->ascent += 2;
|
it->ascent += overline_margin;
|
||||||
|
|
||||||
take_vertical_position_into_account (it);
|
take_vertical_position_into_account (it);
|
||||||
|
|
||||||
|
@ -21542,9 +21547,30 @@ get_window_cursor_type (w, glyph, width, active_cursor)
|
||||||
/* Use normal cursor if not blinked off. */
|
/* Use normal cursor if not blinked off. */
|
||||||
if (!w->cursor_off_p)
|
if (!w->cursor_off_p)
|
||||||
{
|
{
|
||||||
if (glyph != NULL && glyph->type == IMAGE_GLYPH) {
|
if (glyph != NULL && glyph->type == IMAGE_GLYPH)
|
||||||
if (cursor_type == FILLED_BOX_CURSOR)
|
{
|
||||||
cursor_type = HOLLOW_BOX_CURSOR;
|
if (cursor_type == FILLED_BOX_CURSOR)
|
||||||
|
{
|
||||||
|
/* Using a block cursor on large images can be very annoying.
|
||||||
|
So use a hollow cursor for "large" images. */
|
||||||
|
struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id);
|
||||||
|
if (img != NULL && IMAGEP (img->spec))
|
||||||
|
{
|
||||||
|
/* Arbitrarily, interpret "Large" as >32x32 and >NxN
|
||||||
|
where N = size of default frame font size.
|
||||||
|
This should cover most of the "tiny" icons people may use. */
|
||||||
|
if (img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w))
|
||||||
|
|| img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w)))
|
||||||
|
cursor_type = HOLLOW_BOX_CURSOR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (cursor_type != NO_CURSOR)
|
||||||
|
{
|
||||||
|
/* Display current only supports BOX and HOLLOW cursors for images.
|
||||||
|
So for now, unconditionally use a HOLLOW cursor when cursor is
|
||||||
|
not a solid box cursor. */
|
||||||
|
cursor_type = HOLLOW_BOX_CURSOR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return cursor_type;
|
return cursor_type;
|
||||||
}
|
}
|
||||||
|
@ -24443,6 +24469,12 @@ whose contents depend on various data. */);
|
||||||
doc: /* Inhibit try_cursor_movement display optimization. */);
|
doc: /* Inhibit try_cursor_movement display optimization. */);
|
||||||
inhibit_try_cursor_movement = 0;
|
inhibit_try_cursor_movement = 0;
|
||||||
#endif /* GLYPH_DEBUG */
|
#endif /* GLYPH_DEBUG */
|
||||||
|
|
||||||
|
DEFVAR_INT ("overline-margin", &overline_margin,
|
||||||
|
doc: /* *Space between overline and text, in pixels.
|
||||||
|
The default value is 2: the height of the overline (1 pixel) plus 1 pixel
|
||||||
|
margin to the caracter height. */);
|
||||||
|
overline_margin = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1200,7 +1200,7 @@ load_pixmap (f, name, w_ptr, h_ptr)
|
||||||
|
|
||||||
if (bitmap_id < 0)
|
if (bitmap_id < 0)
|
||||||
{
|
{
|
||||||
add_to_log ("Invalid or undefined bitmap %s", name, Qnil);
|
add_to_log ("Invalid or undefined bitmap `%s'", name, Qnil);
|
||||||
bitmap_id = 0;
|
bitmap_id = 0;
|
||||||
|
|
||||||
if (w_ptr)
|
if (w_ptr)
|
||||||
|
|
11
src/xfns.c
11
src/xfns.c
|
@ -3531,14 +3531,9 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
|
||||||
CHECK_STRING (color);
|
CHECK_STRING (color);
|
||||||
|
|
||||||
if (x_defined_color (f, SDATA (color), &foo, 0))
|
if (x_defined_color (f, SDATA (color), &foo, 0))
|
||||||
{
|
return list3 (make_number (foo.red),
|
||||||
Lisp_Object rgb[3];
|
make_number (foo.green),
|
||||||
|
make_number (foo.blue));
|
||||||
rgb[0] = make_number (foo.red);
|
|
||||||
rgb[1] = make_number (foo.green);
|
|
||||||
rgb[2] = make_number (foo.blue);
|
|
||||||
return Flist (3, rgb);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
55
src/xterm.c
55
src/xterm.c
|
@ -187,6 +187,10 @@ static Lisp_Object last_window;
|
||||||
|
|
||||||
int x_use_underline_position_properties;
|
int x_use_underline_position_properties;
|
||||||
|
|
||||||
|
/* Non-zero means to draw the underline at the same place as the descent line. */
|
||||||
|
|
||||||
|
int x_underline_at_descent_line;
|
||||||
|
|
||||||
/* This is a chain of structures for all the X displays currently in
|
/* This is a chain of structures for all the X displays currently in
|
||||||
use. */
|
use. */
|
||||||
|
|
||||||
|
@ -2742,7 +2746,9 @@ x_draw_stretch_glyph_string (s)
|
||||||
int background_width = s->background_width;
|
int background_width = s->background_width;
|
||||||
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
|
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
|
||||||
|
|
||||||
if (x < left_x)
|
/* Don't draw into left margin, fringe or scrollbar area
|
||||||
|
except for header line and mode line. */
|
||||||
|
if (x < left_x && !s->row->mode_line_p)
|
||||||
{
|
{
|
||||||
background_width -= left_x - x;
|
background_width -= left_x - x;
|
||||||
x = left_x;
|
x = left_x;
|
||||||
|
@ -2858,14 +2864,6 @@ x_draw_glyph_string (s)
|
||||||
if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h))
|
if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h))
|
||||||
h = 1;
|
h = 1;
|
||||||
|
|
||||||
/* Get the underline position. This is the recommended
|
|
||||||
vertical offset in pixels from the baseline to the top of
|
|
||||||
the underline. This is a signed value according to the
|
|
||||||
specs, and its default is
|
|
||||||
|
|
||||||
ROUND ((maximum descent) / 2), with
|
|
||||||
ROUND(x) = floor (x + 0.5) */
|
|
||||||
|
|
||||||
#ifdef USE_FONT_BACKEND
|
#ifdef USE_FONT_BACKEND
|
||||||
if (enable_font_backend)
|
if (enable_font_backend)
|
||||||
{
|
{
|
||||||
|
@ -2877,24 +2875,35 @@ x_draw_glyph_string (s)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (x_use_underline_position_properties
|
if (x_underline_at_descent_line)
|
||||||
&& XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &tem))
|
|
||||||
y = s->ybase + (long) tem;
|
|
||||||
else if (s->face->font)
|
|
||||||
y = s->ybase + (s->face->font->max_bounds.descent + 1) / 2;
|
|
||||||
else
|
|
||||||
y = s->y + s->height - h;
|
y = s->y + s->height - h;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Get the underline position. This is the recommended
|
||||||
|
vertical offset in pixels from the baseline to the top of
|
||||||
|
the underline. This is a signed value according to the
|
||||||
|
specs, and its default is
|
||||||
|
|
||||||
|
ROUND ((maximum descent) / 2), with
|
||||||
|
ROUND(x) = floor (x + 0.5) */
|
||||||
|
|
||||||
|
if (x_use_underline_position_properties
|
||||||
|
&& XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &tem))
|
||||||
|
y = s->ybase + (long) tem;
|
||||||
|
else if (s->face->font)
|
||||||
|
y = s->ybase + (s->face->font->max_bounds.descent + 1) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
if (s->face->underline_defaulted_p)
|
if (s->face->underline_defaulted_p)
|
||||||
XFillRectangle (s->display, s->window, s->gc,
|
XFillRectangle (s->display, s->window, s->gc,
|
||||||
s->x, y, s->width, h);
|
s->x, y, s->background_width, h);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XGCValues xgcv;
|
XGCValues xgcv;
|
||||||
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
||||||
XSetForeground (s->display, s->gc, s->face->underline_color);
|
XSetForeground (s->display, s->gc, s->face->underline_color);
|
||||||
XFillRectangle (s->display, s->window, s->gc,
|
XFillRectangle (s->display, s->window, s->gc,
|
||||||
s->x, y, s->width, h);
|
s->x, y, s->background_width, h);
|
||||||
XSetForeground (s->display, s->gc, xgcv.foreground);
|
XSetForeground (s->display, s->gc, xgcv.foreground);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2906,14 +2915,14 @@ x_draw_glyph_string (s)
|
||||||
|
|
||||||
if (s->face->overline_color_defaulted_p)
|
if (s->face->overline_color_defaulted_p)
|
||||||
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
|
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
|
||||||
s->width, h);
|
s->background_width, h);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XGCValues xgcv;
|
XGCValues xgcv;
|
||||||
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
|
||||||
XSetForeground (s->display, s->gc, s->face->overline_color);
|
XSetForeground (s->display, s->gc, s->face->overline_color);
|
||||||
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
|
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
|
||||||
s->width, h);
|
s->background_width, h);
|
||||||
XSetForeground (s->display, s->gc, xgcv.foreground);
|
XSetForeground (s->display, s->gc, xgcv.foreground);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11435,6 +11444,14 @@ UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
|
||||||
to 4.1, set this to nil. */);
|
to 4.1, set this to nil. */);
|
||||||
x_use_underline_position_properties = 1;
|
x_use_underline_position_properties = 1;
|
||||||
|
|
||||||
|
DEFVAR_BOOL ("x-underline-at-descent-line",
|
||||||
|
&x_underline_at_descent_line,
|
||||||
|
doc: /* *Non-nil means to draw the underline at the same place as the descent line.
|
||||||
|
nil means to draw the underline according to the value of the variable
|
||||||
|
`x-use-underline-position-properties', which is usually at the baseline
|
||||||
|
level. The default value is nil. */);
|
||||||
|
x_underline_at_descent_line = 0;
|
||||||
|
|
||||||
DEFVAR_BOOL ("x-mouse-click-focus-ignore-position",
|
DEFVAR_BOOL ("x-mouse-click-focus-ignore-position",
|
||||||
&x_mouse_click_focus_ignore_position,
|
&x_mouse_click_focus_ignore_position,
|
||||||
doc: /* Non-nil means that a mouse click to focus a frame does not move point.
|
doc: /* Non-nil means that a mouse click to focus a frame does not move point.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue