Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-81
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-748 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-749 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-750 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-751 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-753 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-754 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-755 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-757 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-78 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-79 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-80 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-81 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-82 Update from CVS
This commit is contained in:
commit
f1d34bcacd
135 changed files with 4289 additions and 1960 deletions
|
@ -4,8 +4,6 @@ Tasks needed before the next release.
|
|||
|
||||
** Face remapping.
|
||||
|
||||
** Let mouse-1 follow links.
|
||||
|
||||
** Make Rmail find the best version of movemail.
|
||||
To be done by Sergey Poznyakoff <gray@Mirddin.farlep.net>.
|
||||
|
||||
|
@ -36,6 +34,8 @@ invalid pointer from string_free_list.
|
|||
|
||||
* BUGS
|
||||
|
||||
** Incomplete overlay mouse-face highlight bug (Ralf Angeli, Oct 18)
|
||||
|
||||
** Ange-ftp should ignore irrelevant IPv6 errors:
|
||||
|
||||
Message-Id: <4121-Tue23Mar2004165249+0100-piet@cs.uu.nl>
|
||||
|
|
63
etc/NEWS
63
etc/NEWS
|
@ -173,6 +173,12 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
|
|||
|
||||
* Changes in Emacs 21.4
|
||||
|
||||
** calculator.el now has radix grouping mode, which is available when
|
||||
`calculator-output-radix' is non-nil. In this mode a separator
|
||||
character is used every few digits, making it easier to see byte
|
||||
boundries etc. For more info, see the documentation of the variable
|
||||
`calculator-radix-grouping-mode'.
|
||||
|
||||
** You can now follow links by clicking Mouse-1 on the link.
|
||||
|
||||
Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
|
||||
|
@ -202,6 +208,24 @@ drag-mouse-1 action, typically copy the text.
|
|||
You can customize the new Mouse-1 behaviour via the new user option
|
||||
`mouse-1-click-follows-link'.
|
||||
|
||||
+++
|
||||
** require-final-newline now has two new possible values:
|
||||
|
||||
`visit' means add a newline (as an undoable change) if it's needed
|
||||
when visiting the file.
|
||||
|
||||
`visit-save' means add a newline (as an undoable change) if it's
|
||||
needed when visiting the file, and also add a newline if it's needed
|
||||
when saving the file.
|
||||
|
||||
+++
|
||||
** The new option mode-require-final-newline controls how certain
|
||||
major modes enable require-final-newline. Any major mode that's
|
||||
designed for a kind of file that should normally end in a newline
|
||||
sets require-final-newline based on mode-require-final-newline.
|
||||
So you can customize mode-require-final-newline to control what these
|
||||
modes do.
|
||||
|
||||
+++
|
||||
** When the undo information of the current command gets really large
|
||||
(beyond the value of `undo-outer-limit'), Emacs asks you whether to
|
||||
|
@ -1055,6 +1079,9 @@ be navigated with the arrow keys (like Gtk+, Mac and W32).
|
|||
** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing
|
||||
ESC, like they do for Gtk+, Mac and W32.
|
||||
|
||||
---
|
||||
** Dialogs and menus pop down when pressing C-g.
|
||||
|
||||
---
|
||||
** The menu item "Open File..." has been split into two items, "New File..."
|
||||
and "Open File...". "Open File..." now opens only existing files. This is
|
||||
|
@ -1871,12 +1898,15 @@ The functions c-hungry-backspace and c-hungry-delete-forward can be
|
|||
bound to keys to get this feature without toggling a mode.
|
||||
Contributed by Kevin Ryde.
|
||||
|
||||
*** Better control over require-final-newline.
|
||||
The variable that controls how to handle a final newline when the
|
||||
buffer is saved, require-final-newline, is now customizable on a
|
||||
per-mode basis through c-require-final-newline. The default is to set
|
||||
it to t only in languages that mandate a final newline in source files
|
||||
(C, C++ and Objective-C).
|
||||
*** Better control over require-final-newline. The variable that
|
||||
controls how to handle a final newline when the buffer is saved,
|
||||
require-final-newline, is now customizable on a per-mode basis through
|
||||
c-require-final-newline. That is a list of modes, and only those
|
||||
modes set require-final-newline. By default that's C, C++ and
|
||||
Objective-C.
|
||||
|
||||
The specified modes set require-final-newline based on
|
||||
mode-require-final-newline, as usual.
|
||||
|
||||
*** Format change for syntactic context elements.
|
||||
The elements in the syntactic context returned by c-guess-basic-syntax
|
||||
|
@ -2218,6 +2248,14 @@ anyone has committed to the repository since you last executed
|
|||
"checkout", "update" or "commit". That means using cvs diff options
|
||||
-rBASE -rHEAD.
|
||||
|
||||
** New variable `hs-set-up-overlay' allows customization of the overlay
|
||||
used to effect hiding for hideshow minor mode. Integration with isearch
|
||||
handles the overlay property `display' specially, preserving it during
|
||||
temporary overlay showing in the course of an isearch operation.
|
||||
|
||||
** New command `recode-region' decodes the region again by a specified
|
||||
coding system.
|
||||
|
||||
|
||||
* New modes and packages in Emacs 21.4
|
||||
|
||||
|
@ -2465,6 +2503,15 @@ configuration files.
|
|||
|
||||
* Lisp Changes in Emacs 21.4
|
||||
|
||||
+++
|
||||
** If a buffer sets buffer-save-without-query to non-nil,
|
||||
save-some-buffers will always save that buffer without asking
|
||||
(if it's modified).
|
||||
|
||||
+++
|
||||
** The function symbol-file tells you which file defined
|
||||
a certain function or variable.
|
||||
|
||||
** Lisp code can now test if a given buffer position is inside a
|
||||
clickable link with the new function `mouse-on-link-p'. This is the
|
||||
function used by the new `mouse-1-click-follows-link' functionality.
|
||||
|
@ -3174,6 +3221,10 @@ be inserted is translated through it.
|
|||
which means FUNNAME was previously defined as an autoload (before the
|
||||
current file redefined it).
|
||||
|
||||
+++
|
||||
** `load-history' now records (defun . FUNNAME) when a function is
|
||||
defined. For a variable, it records just the variable name.
|
||||
|
||||
+++
|
||||
** New Lisp library testcover.el works with edebug to help you determine
|
||||
whether you've tested all your Lisp code. Function testcover-start
|
||||
|
|
2
etc/TODO
2
etc/TODO
|
@ -15,6 +15,8 @@ to the FSF.
|
|||
ought to be possible to omit text which is invisible (due to a
|
||||
text-property, overlay, or selective display) from the kill-ring.
|
||||
|
||||
** battery.el display-battery should be replaced with a minor mode.
|
||||
|
||||
** Redefine define-generic-mode as a macro, so the compiler
|
||||
sees the definitions it generates.
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2004-12-26 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* make-docfile.c: Include stdlib.h even if WINDOWSNT is not
|
||||
defined.
|
||||
|
||||
2004-12-15 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* etags.c (main): Fix typo in conversion of LONG_OPTIONS from
|
||||
|
|
|
@ -43,11 +43,11 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef chdir
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef MSDOS
|
||||
#include <fcntl.h>
|
||||
#endif /* MSDOS */
|
||||
#ifdef WINDOWSNT
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <direct.h>
|
||||
#endif /* WINDOWSNT */
|
||||
|
|
362
lisp/ChangeLog
362
lisp/ChangeLog
|
@ -1,3 +1,339 @@
|
|||
2004-12-31 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-store.el (calcVar-digit, calcVar-oper): Remove the need
|
||||
for "var-" at the beginning of the minibuffer.
|
||||
|
||||
2004-12-31 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* faces.el (read-face-name):
|
||||
Don't treat an attribute spec as a list of faces.
|
||||
|
||||
* simple.el (undo): Use undo-equiv-table to detect
|
||||
unexpected changes since previous undo.
|
||||
(undo-list-saved): Variable deleted.
|
||||
(buffer-disable-undo): Don't alter undo-list-saved.
|
||||
|
||||
* files.el (require-final-newline): Allow `visit' and `visit-save'.
|
||||
(mode-require-final-newline): New option.
|
||||
(after-find-file): Handle require-final-newline with new values.
|
||||
(basic-save-buffer): Handle new values of require-final-newline.
|
||||
|
||||
* progmodes/sh-script.el (sh-require-final-newline):
|
||||
Alist value now controls whether to use mode-require-final-newline.
|
||||
(sh-set-shell): Implement that new meaning.
|
||||
|
||||
* progmodes/cc-vars.el (c-require-final-newline): Fix custom type, doc.
|
||||
* progmodes/cc-mode.el (c-common-init): Use mode-require-final-newline.
|
||||
* progmodes/antlr-mode.el (antlr-mode): Use mode-require-final-newline.
|
||||
Delete old-Emacs compatibility code.
|
||||
(antlr-c-common-init): Function deleted.
|
||||
|
||||
* net/snmp-mode.el (snmp-common-mode): Use mode-require-final-newline.
|
||||
* progmodes/vhdl-mode.el (vhdl-mode): Use mode-require-final-newline.
|
||||
* progmodes/simula.el (simula-mode): Use mode-require-final-newline.
|
||||
* progmodes/python.el (python-mode): Use mode-require-final-newline.
|
||||
* progmodes/perl-mode.el (perl-mode): Use mode-require-final-newline.
|
||||
* progmodes/modula2.el (modula-2-mode): Use mode-require-final-newline.
|
||||
* progmodes/mixal-mode.el (mixal-mode): Use mode-require-final-newline.
|
||||
* progmodes/idlwave.el (idlwave-mode): Use mode-require-final-newline.
|
||||
* progmodes/icon.el (icon-mode): Use mode-require-final-newline.
|
||||
* progmodes/fortran.el (fortran-mode): Use mode-require-final-newline.
|
||||
* progmodes/f90.el (f90-mode): Use mode-require-final-newline.
|
||||
* progmodes/cperl-mode.el (cperl-mode): Use mode-require-final-newline.
|
||||
* progmodes/cfengine.el (cfengine-mode): Use mode-require-final-newline.
|
||||
* progmodes/ada-mode.el (ada-mode): Use mode-require-final-newline.
|
||||
* textmodes/text-mode.el (text-mode): Use mode-require-final-newline.
|
||||
* textmodes/texinfo.el (texinfo-mode): Use mode-require-final-newline.
|
||||
|
||||
2004-12-31 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-graph.el (calc-graph-show-dumb): Mention C-cC-c as the
|
||||
way to return to Calc.
|
||||
|
||||
* calc/calc-yank.el (calc-edit-mode): Mention C-cC-c as the way to
|
||||
finish, C-xk as the way to cancel the edit. Add cancel routine to
|
||||
kill-buffer-hook.
|
||||
|
||||
* calc/calc.el (calc-same-interface, calc-quit): Remove obsolete
|
||||
MacEdit code.
|
||||
|
||||
* calc/calc-prog.el: Remove obsolete MacEdit code.
|
||||
(calc-macro-edit-algebraic, calc-macro-edit-variable)
|
||||
(calc-macro-edit-variable-2, calc-macro-edit-quick-digit): Remove.
|
||||
|
||||
2004-12-31 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* international/mule.el (buffer-file-coding-system-explicit):
|
||||
Renamed for explicit-buffer-file-coding-system.
|
||||
(after-insert-file-set-coding): Adjusted for the above change.
|
||||
|
||||
* files.el (revert-buffer): Change
|
||||
explicit-buffer-file-coding-system to
|
||||
buffer-file-coding-system-explicit.
|
||||
(basic-save-buffer-1): Likewise.
|
||||
|
||||
2004-12-30 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* textmodes/artist.el (artist-butlast-fn): Var deleted.
|
||||
(artist-butlast, artist-last): Functions deleted.
|
||||
(artist-ellipse-mirror-quadrant): Call last and butlast directly.
|
||||
(artist-compute-key-compl-table): Call remq directly.
|
||||
(artist-remove-nulls): Function deleted.
|
||||
(artist-vaporize-lines, artist-flood-fill): Use push and pop directly.
|
||||
(artist-push, artist-pop): Macro deleted.
|
||||
|
||||
2004-12-30 Andreas Leue <al@sphenon.de>
|
||||
|
||||
* textmodes/artist.el (artist-version): 1.2.6
|
||||
(artist-prev-next-op-alist): New variable.
|
||||
(artist-select-next-op-in-list): New function.
|
||||
(artist-select-prev-op-in-list): New function.
|
||||
(artist-make-prev-next-op-alist): New function.
|
||||
(artist-is-in-op-list-p): New function.
|
||||
(artist-get-first-non-nil-op): New function.
|
||||
(artist-get-last-non-nil-op): New function.
|
||||
(artist-mode-init): Call artist-get-last-non-nil-op to initialize
|
||||
artist-prev-next-op-alist.
|
||||
(artist-mode-map): Add binding for C-mouse-4 and C-mouse-5 to
|
||||
change drawing operation.
|
||||
|
||||
2004-12-30 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* autorevert.el (auto-revert-tail-handler): Put in undo boundaries.
|
||||
|
||||
2004-12-31 Masatake YAMATO <jet@gyve.org>
|
||||
|
||||
* server.el (server-process-filter): Suppress `error', too.
|
||||
|
||||
2004-12-30 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-store.el (calc-copy-variable): Fix mistyped variable
|
||||
name. Change the way a variable is displayed in a message.
|
||||
|
||||
* calc/calc-prog.el (calc-user-define-edit, calc-finish-macro-edit)
|
||||
(calc-user-define-permanent, calc-execute-kbd-macro):
|
||||
Replace old function MacEdit-parse-keys with edmacro-parse-keys.
|
||||
|
||||
2004-12-30 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* files.el (basic-save-buffer-1): Set
|
||||
explicit-buffer-file-coding-system to last-coding-system-used.
|
||||
(revert-buffer): Pay attention to
|
||||
explicit-buffer-file-coding-system (not buffer-file-coding-system)
|
||||
on bind coding-system-for-read.
|
||||
|
||||
* international/mule.el (explicit-buffer-file-coding-system): New
|
||||
buffer local variable.
|
||||
(after-insert-file-set-coding): Set it to coding-system-for-read.
|
||||
|
||||
2004-12-29 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* autorevert.el (auto-revert-tail-mode): Doc fix for defvar.
|
||||
|
||||
2004-12-29 Sanghyuk Suh <han9kin@mac.com>
|
||||
|
||||
* term/mac-win.el (mac-drag-n-drop): Handle drag-n-drop events
|
||||
that include line numbers.
|
||||
|
||||
2004-12-29 Milan Zamazal <pdm@zamazal.org>
|
||||
|
||||
* files.el (hack-local-variables): If no PREFIX, set it to "^".
|
||||
Redundant variable PREFIXLEN removed.
|
||||
|
||||
2004-12-28 Matt Hodges <MPHodges@member.fsf.org>
|
||||
|
||||
* eshell/em-hist.el (eshell-previous-matching-input):
|
||||
Start the deletion from the end of the output.
|
||||
|
||||
2004-12-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* term/mac-win.el: Require x-dnd.
|
||||
(mac-drag-n-drop): Sync with W32 version. Use x-dnd.el
|
||||
functions.
|
||||
|
||||
2004-12-29 David Kastrup <dak@gnu.org>
|
||||
|
||||
* international/mule.el (decode-coding-inserted-region): Don't
|
||||
barf if `buffer-undo-list' is already set to `t'.
|
||||
|
||||
2004-12-29 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-prog.el (calc-user-define-formula): Put default values
|
||||
for function names in prompts.
|
||||
(calc-user-define-permanent, calc-user-define-composition)
|
||||
(calc-user-define-formula): Remove the need for "calcFunc-" in the
|
||||
default input for algebraic functions.
|
||||
|
||||
2004-12-29 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* vc-rcs.el (vc-rcs-annotate-command):
|
||||
Fix omission bug: Call `vc-setup-buffer'.
|
||||
|
||||
2004-12-29 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* international/mule.el (recode-region): New function.
|
||||
|
||||
2004-12-28 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* simple.el (undo-extra-outer-limit): New variable.
|
||||
(undo-outer-limit-truncate): Test and set it.
|
||||
|
||||
* emacs-lisp/lisp.el (mark-sexp, mark-defun): New arg ALLOW-EXTEND
|
||||
enables the feature to extend the existing region.
|
||||
|
||||
* simple.el (mark-word): New arg ALLOW-EXTEND
|
||||
enables the feature to extend the existing region.
|
||||
|
||||
* textmodes/paragraphs.el (mark-paragraph): New arg ALLOW-EXTEND
|
||||
enables the feature to extend the existing region.
|
||||
|
||||
* startup.el (site-run-file): Don't allow setting it with Custom.
|
||||
|
||||
* simple.el (buffer-disable-undo): Fix previous change.
|
||||
|
||||
2004-12-27 Masatake YAMATO <jet@gyve.org>
|
||||
|
||||
* hexl.el (hexlify-buffer): Remove fontification here.
|
||||
Use font lock mechanism instead.
|
||||
(hexl-font-lock-keywords): New font lock kewords.
|
||||
(hexl-mode-old-font-lock-keywords): New variable.
|
||||
(hexl-mode): Store the old font lock keywords.
|
||||
(hexl-mode-exit): Restore the old font lock keywords.
|
||||
|
||||
2004-12-27 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* simple.el (undo): Fix previous change.
|
||||
|
||||
2004-12-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* term/mac-win.el: Sync with x-win.el. Rearrange the contents.
|
||||
Call mac-clear-font-name-table if invoked on Mac OS 8/9. Call
|
||||
x-open-connection on Mac OS X.
|
||||
|
||||
2004-12-27 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* files.el (buffer-save-without-query): New var (buffer-local).
|
||||
(save-some-buffers): Save those buffers first, w/o asking.
|
||||
|
||||
* files.el (insert-directory-ls-version): New variable.
|
||||
(insert-directory): When ls returns an error, test the version
|
||||
number to decide what the return code means.
|
||||
With --dired output format, detect and distinguish lines
|
||||
that are really error messages.
|
||||
(insert-directory-adj-pos): New function.
|
||||
|
||||
* bookmark.el (bookmark-jump): Nice error if BOOKMARK is nil.
|
||||
|
||||
* battery.el (battery-mode-line-format): Remove initial spaces.
|
||||
|
||||
* uniquify.el (uniquify-rationalize-file-buffer-names):
|
||||
Delete interactive spec.
|
||||
|
||||
* type-break.el (type-break-mode): Set buffer-save-without-query.
|
||||
Remove code that tried to set save-some-buffers-always.
|
||||
(type-break-file-keystroke-count): Bind deactivate-mark.
|
||||
|
||||
* mouse.el (mouse-drag-region): Bind mouse-autoselect-window.
|
||||
|
||||
* simple.el (next-error-buffer-p): New arg AVOID-CURRENT.
|
||||
Test that the buffer is live, and maybe reject current buffer too.
|
||||
Clarify.
|
||||
(next-error-find-buffer): Rewrite for clarity.
|
||||
|
||||
* loadup.el: Don't use buffer-disable-undo; do it directly.
|
||||
|
||||
* help-fns.el (describe-function-1): Call symbol-file with `defun'.
|
||||
(describe-variable): Call symbol-file with `defvar'.
|
||||
|
||||
* subr.el (messages-buffer-max-lines): Alias for message-log-max.
|
||||
(symbol-file): Rewritten to handle new load-history format.
|
||||
Now takes an arg TYPE to specify looking for a particular
|
||||
type of definition only.
|
||||
|
||||
* emacs-lisp/debug.el (debugger-make-xrefs):
|
||||
Call symbol-file with `defun'.
|
||||
|
||||
* emacs-lisp/find-func.el (find-function-noselect):
|
||||
Call symbol-file with `defun'.
|
||||
(find-variable-noselect): Call symbol-file with `defvar'.
|
||||
|
||||
* eshell/esh-cmd.el (eshell-find-alias-function):
|
||||
Call symbol-file with `defun'.
|
||||
|
||||
* eshell/esh-test.el (eshell-test-goto-func):
|
||||
Call symbol-file with `defun'.
|
||||
|
||||
* mail/rmail.el (rmail-resend):
|
||||
Let MAIL-ALIAS-FILE arg override mail-personal-alias-file.
|
||||
|
||||
* net/goto-addr.el (goto-address-mail-regexp): Allow = in username.
|
||||
|
||||
* progmodes/compile.el (compilation-find-buffer): Rename arg.
|
||||
|
||||
* textmodes/texinfmt.el (texinfo-format-buffer-1):
|
||||
Call buffer-disable-undo.
|
||||
|
||||
* simple.el (undo-list-saved): New variable (buffer-local).
|
||||
(undo): Set and test it.
|
||||
(buffer-disable-undo): Moved here from buffer.c.
|
||||
Clear out undo-list-saved.
|
||||
|
||||
* international/mule.el (decode-coding-inserted-region):
|
||||
Set buffer-undo-list in a correct and optimal way.
|
||||
|
||||
* progmodes/cperl-mode.el (cperl-find-bad-style): Use with-no-warnings.
|
||||
(cperl-font-lock-unfontify-region-function): No need to save and
|
||||
restore info, since font-lock.el does it for us.
|
||||
|
||||
* ansi-color.el (save-buffer-state): Definition deleted.
|
||||
(ansi-color-unfontify-region): Don't use save-buffer-state.
|
||||
|
||||
2004-12-27 Dave Love <fx@gnu.org>
|
||||
|
||||
* wid-edit.el (function): Use restricted-sexp as parent.
|
||||
|
||||
2004-12-27 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* simple.el (next-matching-history-element): Use same
|
||||
`interactive' form as previous-matching-history-element.
|
||||
|
||||
* ffap.el (ffap-string-at-point-mode-alist): Add "*" to url chars,
|
||||
it can appear unencoded and has been seen from yahoo.
|
||||
|
||||
2004-12-27 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change)
|
||||
|
||||
* mail/smtpmail.el (smtpmail-try-auth-methods): Send AUTH CRAM-MD5
|
||||
in upper case. Reported by Wojciech Polak <polak@gnu.org>.
|
||||
|
||||
2004-12-27 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* international/utf-8.el (utf-translate-cjk-load-tables): Bind
|
||||
coding-system-for-read to nil while loading subst-*.
|
||||
|
||||
2004-12-26 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-store.el (calc-read-var-name): Remove "var-" from
|
||||
default input.
|
||||
|
||||
2004-12-26 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* buff-menu.el (Buffer-menu-revert-function): Clear out undo info
|
||||
before reverting and disable undo recording while reverting.
|
||||
|
||||
2004-12-26 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* progmodes/hideshow.el (hs-set-up-overlay): New user var.
|
||||
(hs-make-overlay): New function.
|
||||
(hs-isearch-show-temporary): Handle `display' overlay prop specially.
|
||||
(hs-flag-region): Delete function.
|
||||
(hs-hide-comment-region): No longer use `hs-flag-region'.
|
||||
Instead, use `hs-discard-overlays' and `hs-make-overlay'.
|
||||
(hs-hide-block-at-point): Likewise.
|
||||
(hs-hide-level-recursive): Use `hs-discard-overlays'.
|
||||
(hs-hide-all, hs-show-all): Likewise.
|
||||
(hs-show-block): Likewise.
|
||||
Also, use overlay prop `hs-b-offset', not `hs-ofs'.
|
||||
|
||||
2004-12-24 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* progmodes/hideshow.el: Require `cl' when compiling.
|
||||
|
@ -45,16 +381,28 @@
|
|||
(calculator-radix-grouping-digits)
|
||||
(calculator-radix-grouping-separator):
|
||||
New defcustoms for the new radix grouping mode functionality.
|
||||
(calculator-mode-hook): Now used in electric mode too.
|
||||
(calculator-mode-hook): Now used in electric mode too,
|
||||
(calculator): Call it.
|
||||
(calculator-mode-map): Some new keys.
|
||||
(calculator-message): New function. Some new calls.
|
||||
(calculator-string-to-number): New function,
|
||||
(calculator-op, calculator-set-register): Use it.
|
||||
(calculator-string-to-number): New function, mostly moved and
|
||||
updated code from calculator-curnum-value.
|
||||
(calculator-curnum-value): Use it.
|
||||
(calculator-rotate-displayer, calculator-rotate-displayer-back)
|
||||
(calculator-displayer-prev, calculator-displayer-next):
|
||||
Change digit group size when in radix mode.
|
||||
(calculator-number-to-string): Renamed from calculator-num-to-string.
|
||||
Now deals with digit grouping in radix mode.
|
||||
(calculator-paste): Use it, and update grabbing the
|
||||
current-kill.
|
||||
(calculator-rotate-displayer)
|
||||
(calculator-rotate-displayer-back): Toggle digit grouping when
|
||||
in radix mode, use calculator-message.
|
||||
(calculator-displayer-prev, calculator-displayer-next): Change
|
||||
digit group size when in radix mode.
|
||||
(calculator-number-to-string): Renamed from
|
||||
calculator-num-to-string. Now deals with digit grouping in
|
||||
radix mode.
|
||||
(calculator-update-display, calculator-put-value): Use the new
|
||||
name.
|
||||
(calculator-fact): Return a floating point number.
|
||||
(calculator-mode): Doc fix.
|
||||
|
||||
2004-12-20 Glenn Morris <gmorris@ast.cam.ac.uk>
|
||||
|
||||
|
|
|
@ -220,23 +220,6 @@ This is a good function to put in `comint-output-filter-functions'."
|
|||
|
||||
;; Alternative font-lock-unfontify-region-function for Emacs only
|
||||
|
||||
|
||||
(eval-when-compile
|
||||
;; We use this to preserve or protect things when modifying text
|
||||
;; properties. Stolen from lazy-lock and font-lock. Ugly!!!
|
||||
;; Probably most of this is not needed?
|
||||
(defmacro save-buffer-state (varlist &rest body)
|
||||
"Bind variables according to VARLIST and eval BODY restoring buffer state."
|
||||
`(let* (,@(append varlist
|
||||
'((modified (buffer-modified-p)) (buffer-undo-list t)
|
||||
(inhibit-read-only t) (inhibit-point-motion-hooks t)
|
||||
before-change-functions after-change-functions
|
||||
deactivate-mark buffer-file-name buffer-file-truename)))
|
||||
,@body
|
||||
(when (and (not modified) (buffer-modified-p))
|
||||
(set-buffer-modified-p nil))))
|
||||
(put 'save-buffer-state 'lisp-indent-function 1))
|
||||
|
||||
(defun ansi-color-unfontify-region (beg end &rest xemacs-stuff)
|
||||
"Replacement function for `font-lock-default-unfontify-region'.
|
||||
|
||||
|
@ -259,21 +242,20 @@ A possible way to install this would be:
|
|||
\(function (lambda ()
|
||||
\(setq font-lock-unfontify-region-function
|
||||
'ansi-color-unfontify-region))))"
|
||||
;; save-buffer-state is a macro in font-lock.el!
|
||||
(save-buffer-state nil
|
||||
(when (boundp 'font-lock-syntactic-keywords)
|
||||
(remove-text-properties beg end '(syntax-table nil)))
|
||||
;; instead of just using (remove-text-properties beg end '(face
|
||||
;; nil)), we find regions with a non-nil face test-property, skip
|
||||
;; positions with the ansi-color property set, and remove the
|
||||
;; remaining face test-properties.
|
||||
(while (setq beg (text-property-not-all beg end 'face nil))
|
||||
(setq beg (or (text-property-not-all beg end 'ansi-color t) end))
|
||||
(when (get-text-property beg 'face)
|
||||
(let ((end-face (or (text-property-any beg end 'face nil)
|
||||
end)))
|
||||
(remove-text-properties beg end-face '(face nil))
|
||||
(setq beg end-face))))))
|
||||
;; Simplified now that font-lock-unfontify-region uses save-buffer-state.
|
||||
(when (boundp 'font-lock-syntactic-keywords)
|
||||
(remove-text-properties beg end '(syntax-table nil)))
|
||||
;; instead of just using (remove-text-properties beg end '(face
|
||||
;; nil)), we find regions with a non-nil face test-property, skip
|
||||
;; positions with the ansi-color property set, and remove the
|
||||
;; remaining face test-properties.
|
||||
(while (setq beg (text-property-not-all beg end 'face nil))
|
||||
(setq beg (or (text-property-not-all beg end 'ansi-color t) end))
|
||||
(when (get-text-property beg 'face)
|
||||
(let ((end-face (or (text-property-any beg end 'face nil)
|
||||
end)))
|
||||
(remove-text-properties beg end-face '(face nil))
|
||||
(setq beg end-face)))))
|
||||
|
||||
;; Working with strings
|
||||
|
||||
|
|
|
@ -123,7 +123,8 @@ Never set this variable directly, use the command `auto-revert-mode' instead.")
|
|||
|
||||
(defvar auto-revert-tail-mode nil
|
||||
"*Non-nil when Auto-Revert Tail Mode is active.
|
||||
Never set this variable directly, use the command `auto-revert-mode' instead.")
|
||||
Never set this variable directly, use the command
|
||||
`auto-revert-tail-mode' instead.")
|
||||
(put 'auto-revert-tail-mode 'permanent-local t)
|
||||
|
||||
(defvar auto-revert-timer nil
|
||||
|
@ -443,11 +444,13 @@ This is an internal function used by Auto-Revert Mode."
|
|||
(file buffer-file-name)
|
||||
buffer-file-name) ; ignore that file has changed
|
||||
(when (> size auto-revert-tail-pos)
|
||||
(undo-boundary)
|
||||
(save-restriction
|
||||
(widen)
|
||||
(save-excursion
|
||||
(goto-char (point-max))
|
||||
(insert-file-contents file nil auto-revert-tail-pos size)))
|
||||
(undo-boundary)
|
||||
(setq auto-revert-tail-pos size)
|
||||
(set-buffer-modified-p modified)))
|
||||
(set-visited-file-modtime))
|
||||
|
|
|
@ -73,12 +73,13 @@ string are substituted as defined by the current value of the variable
|
|||
|
||||
(defvar battery-mode-line-string nil
|
||||
"String to display in the mode line.")
|
||||
;;;###autoload (put 'battery-mode-line-string 'risky-local-variable t)
|
||||
|
||||
(defcustom battery-mode-line-format
|
||||
(cond ((eq battery-status-function 'battery-linux-proc-apm)
|
||||
" [%b%p%%]")
|
||||
"[%b%p%%]")
|
||||
((eq battery-status-function 'battery-linux-proc-acpi)
|
||||
" [%b%p%%,%d°C]"))
|
||||
"[%b%p%%,%d°C]"))
|
||||
"*Control string formatting the string to display in the mode line.
|
||||
Ordinary characters in the control string are printed as-is, while
|
||||
conversion specifications introduced by a `%' character in the control
|
||||
|
@ -128,13 +129,14 @@ seconds."
|
|||
|
||||
(defun battery-update ()
|
||||
"Update battery status information in the mode line."
|
||||
(setq battery-mode-line-string (propertize (if (and battery-mode-line-format
|
||||
battery-status-function)
|
||||
(battery-format
|
||||
battery-mode-line-format
|
||||
(funcall battery-status-function))
|
||||
"")
|
||||
'help-echo "Battery status information"))
|
||||
(setq battery-mode-line-string
|
||||
(propertize (if (and battery-mode-line-format
|
||||
battery-status-function)
|
||||
(battery-format
|
||||
battery-mode-line-format
|
||||
(funcall battery-status-function))
|
||||
"")
|
||||
'help-echo "Battery status information"))
|
||||
(force-mode-line-update))
|
||||
|
||||
|
||||
|
|
|
@ -1049,6 +1049,8 @@ of the old one in the permanent bookmark record."
|
|||
(interactive
|
||||
(list (bookmark-completing-read "Jump to bookmark"
|
||||
bookmark-current-bookmark)))
|
||||
(unless bookmark
|
||||
(error "No bookmark specified"))
|
||||
(bookmark-maybe-historicize-string bookmark)
|
||||
(let ((cell (bookmark-jump-noselect bookmark)))
|
||||
(and cell
|
||||
|
|
|
@ -198,11 +198,15 @@ Letters do not insert themselves; instead, they are commands.
|
|||
(revert-buffer))
|
||||
|
||||
(defun Buffer-menu-revert-function (ignore1 ignore2)
|
||||
(or (eq buffer-undo-list t)
|
||||
(setq buffer-undo-list nil))
|
||||
;; We can not use save-excursion here. The buffer gets erased.
|
||||
(let ((ocol (current-column))
|
||||
(oline (progn (move-to-column 4)
|
||||
(get-text-property (point) 'buffer)))
|
||||
(prop (point-min)))
|
||||
(prop (point-min))
|
||||
;; do not make undo records for the reversion.
|
||||
(buffer-undo-list t))
|
||||
(list-buffers-noselect Buffer-menu-files-only)
|
||||
(while (setq prop (next-single-property-change prop 'buffer))
|
||||
(when (eq (get-text-property prop 'buffer) oline)
|
||||
|
|
|
@ -955,9 +955,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
|
|||
(define-key calc-dumb-map "\C-c\C-c" 'exit-recursive-edit)))
|
||||
(use-local-map calc-dumb-map)
|
||||
(setq truncate-lines t)
|
||||
(message "Type `q'%s to return to Calc"
|
||||
(if (eq (lookup-key (current-global-map) "\e#") 'calc-dispatch)
|
||||
" or `M-# M-#'" ""))
|
||||
(message "Type `q' or `C-c C-c' to return to Calc")
|
||||
(recursive-edit)
|
||||
(bury-buffer "*Gnuplot Trail*")))
|
||||
|
||||
|
|
|
@ -170,7 +170,8 @@
|
|||
(arglist nil)
|
||||
(is-lambda (and (eq (car-safe form) 'calcFunc-lambda)
|
||||
(>= (length form) 2)))
|
||||
odef key keyname cmd cmd-base func calc-user-formula-alist is-symb)
|
||||
odef key keyname cmd cmd-base cmd-base-default
|
||||
func calc-user-formula-alist is-symb)
|
||||
(if is-lambda
|
||||
(setq arglist (mapcar (function (lambda (x) (nth 1 x)))
|
||||
(nreverse (cdr (reverse (cdr form)))))
|
||||
|
@ -189,18 +190,25 @@
|
|||
(char-to-string key)
|
||||
(format "%03d" key)))
|
||||
odef (assq key (calc-user-key-map)))
|
||||
(unless keyname
|
||||
(setq keyname (format "%05d" (abs (% (random) 10000)))))
|
||||
(while
|
||||
(progn
|
||||
(setq cmd (completing-read "Define M-x command name: "
|
||||
obarray 'commandp nil
|
||||
(if (and odef (symbolp (cdr odef)))
|
||||
(symbol-name (cdr odef))
|
||||
"calc-"))
|
||||
cmd-base (and (string-match "\\`calc-\\(.+\\)\\'" cmd)
|
||||
(math-match-substring cmd 1))
|
||||
cmd (and (not (or (string-equal cmd "")
|
||||
(string-equal cmd "calc-")))
|
||||
(intern cmd)))
|
||||
(setq cmd-base-default (concat "User-" keyname))
|
||||
(setq cmd (completing-read
|
||||
(concat "Define M-x command name (default: calc-"
|
||||
cmd-base-default
|
||||
"): ")
|
||||
obarray 'commandp nil
|
||||
(if (and odef (symbolp (cdr odef)))
|
||||
(symbol-name (cdr odef))
|
||||
"calc-")))
|
||||
(if (or (string-equal cmd "")
|
||||
(string-equal cmd "calc-"))
|
||||
(setq cmd (concat "calc-User-" keyname)))
|
||||
(setq cmd-base (and (string-match "\\`calc-\\(.+\\)\\'" cmd)
|
||||
(math-match-substring cmd 1)))
|
||||
(setq cmd (intern cmd))
|
||||
(and cmd
|
||||
(fboundp cmd)
|
||||
odef
|
||||
|
@ -210,24 +218,33 @@
|
|||
(concat "Replace previous definition for "
|
||||
(symbol-name cmd) "? ")
|
||||
"That name conflicts with a built-in Emacs function. Replace this function? "))))))
|
||||
(if (and key (not cmd))
|
||||
(setq cmd (intern (concat "calc-User-" keyname))))
|
||||
(while
|
||||
(progn
|
||||
(setq func (completing-read "Define algebraic function name: "
|
||||
obarray 'fboundp nil
|
||||
(concat "calcFunc-"
|
||||
(if cmd-base
|
||||
(if (string-match
|
||||
"\\`User-.+" cmd-base)
|
||||
(concat
|
||||
"User"
|
||||
(substring cmd-base 5))
|
||||
cmd-base)
|
||||
"")))
|
||||
func (and (not (or (string-equal func "")
|
||||
(string-equal func "calcFunc-")))
|
||||
(intern func)))
|
||||
(setq cmd-base-default
|
||||
(if cmd-base
|
||||
(if (string-match
|
||||
"\\`User-.+" cmd-base)
|
||||
(concat
|
||||
"User"
|
||||
(substring cmd-base 5))
|
||||
cmd-base)
|
||||
(concat "User" keyname)))
|
||||
(setq func
|
||||
(concat "calcFunc-"
|
||||
(completing-read
|
||||
(concat "Define algebraic function name (default: "
|
||||
cmd-base-default "): ")
|
||||
(mapcar (lambda (x) (substring x 9))
|
||||
(all-completions "calcFunc-"
|
||||
obarray))
|
||||
(lambda (x)
|
||||
(fboundp
|
||||
(intern (concat "calcFunc-" x))))
|
||||
nil)))
|
||||
(setq func
|
||||
(if (string-equal func "calcFunc-")
|
||||
(intern (concat "calcFunc-" cmd-base-default))
|
||||
(intern func)))
|
||||
(and func
|
||||
(fboundp func)
|
||||
(not (fboundp cmd))
|
||||
|
@ -238,11 +255,13 @@
|
|||
(concat "Replace previous definition for "
|
||||
(symbol-name func) "? ")
|
||||
"That name conflicts with a built-in Emacs function. Replace this function? "))))))
|
||||
|
||||
(if (not func)
|
||||
(setq func (intern (concat "calcFunc-User"
|
||||
(or keyname
|
||||
(and cmd (symbol-name cmd))
|
||||
(format "%05d" (% (random) 10000)))))))
|
||||
|
||||
(if is-lambda
|
||||
(setq calc-user-formula-alist arglist)
|
||||
(while
|
||||
|
@ -359,8 +378,15 @@
|
|||
(if (eq calc-language 'unform)
|
||||
(error "Can't define formats for unformatted mode"))
|
||||
(let* ((comp (calc-top 1))
|
||||
(func (intern (completing-read "Define format for which function: "
|
||||
obarray 'fboundp nil "calcFunc-")))
|
||||
(func (intern
|
||||
(concat "calcFunc-"
|
||||
(completing-read "Define format for which function: "
|
||||
(mapcar (lambda (x) (substring x 9))
|
||||
(all-completions "calcFunc-"
|
||||
obarray))
|
||||
(lambda (x)
|
||||
(fboundp
|
||||
(intern (concat "calcFunc-" x))))))))
|
||||
(comps (get func 'math-compose-forms))
|
||||
entry entry2
|
||||
(arglist nil)
|
||||
|
@ -696,7 +722,7 @@
|
|||
(setcar mac new))))))))
|
||||
(let ((keys (progn (and (fboundp 'edit-kbd-macro)
|
||||
(edit-kbd-macro nil))
|
||||
(fboundp 'MacEdit-parse-keys))))
|
||||
(fboundp 'edmacro-parse-keys))))
|
||||
(calc-wrapper
|
||||
(calc-edit-mode (list 'calc-finish-macro-edit
|
||||
(list 'quote def)
|
||||
|
@ -749,7 +775,7 @@
|
|||
(if (and keys (looking-at "\n")) (forward-line 1))
|
||||
(let* ((true-str (buffer-substring (point) (point-max)))
|
||||
(str true-str))
|
||||
(if keys (setq str (MacEdit-parse-keys str)))
|
||||
(if keys (setq str (edmacro-parse-keys str)))
|
||||
(if (symbolp (cdr def))
|
||||
(if (stringp (symbol-function (cdr def)))
|
||||
(fset (cdr def) str)
|
||||
|
@ -761,128 +787,6 @@
|
|||
(setcar mac str))))
|
||||
(setcdr def str))))
|
||||
|
||||
;;; The following are hooks into the MacEdit package from macedit.el.
|
||||
(put 'calc-execute-extended-command 'MacEdit-print
|
||||
(function (lambda ()
|
||||
(setq macro-str (concat "\excalc-" macro-str)))))
|
||||
|
||||
(put 'calcDigit-start 'MacEdit-print
|
||||
(function (lambda ()
|
||||
(if calc-algebraic-mode
|
||||
(calc-macro-edit-algebraic)
|
||||
(MacEdit-unread-chars key-last)
|
||||
(let ((str "")
|
||||
(min-bsp 0)
|
||||
ch last)
|
||||
(while (and (setq ch (MacEdit-read-char))
|
||||
(or (and (>= ch ?0) (<= ch ?9))
|
||||
(memq ch '(?\. ?e ?\_ ?n ?\: ?\# ?M
|
||||
?o ?h ?\@ ?\"))
|
||||
(and (memq ch '(?\' ?m ?s))
|
||||
(string-match "[@oh]" str))
|
||||
(and (or (and (>= ch ?a) (<= ch ?z))
|
||||
(and (>= ch ?A) (<= ch ?Z)))
|
||||
(string-match
|
||||
"^[-+]?\\(1[1-9]\\|[2-9][0-9]\\)#"
|
||||
str))
|
||||
(and (memq ch '(?\177 ?\C-h))
|
||||
(> (length str) 0))
|
||||
(and (memq ch '(?+ ?-))
|
||||
(> (length str) 0)
|
||||
(eq (aref str (1- (length str)))
|
||||
?e))))
|
||||
(if (or (and (>= ch ?0) (<= ch ?9))
|
||||
(and (or (not (memq ch '(?\177 ?\C-h)))
|
||||
(<= (length str) min-bsp))
|
||||
(setq min-bsp (1+ (length str)))))
|
||||
(setq str (concat str (char-to-string ch)))
|
||||
(setq str (substring str 0 -1))))
|
||||
(if (memq ch '(32 10 13))
|
||||
(setq str (concat str (char-to-string ch)))
|
||||
(MacEdit-unread-chars ch))
|
||||
(insert "type \"")
|
||||
(MacEdit-insert-string str)
|
||||
(insert "\"\n"))))))
|
||||
|
||||
(defun calc-macro-edit-algebraic ()
|
||||
(MacEdit-unread-chars key-last)
|
||||
(let ((str "")
|
||||
(min-bsp 0))
|
||||
(while (progn
|
||||
(MacEdit-lookup-key calc-alg-ent-map)
|
||||
(or (and (memq key-symbol '(self-insert-command
|
||||
calcAlg-previous))
|
||||
(< (length str) 60))
|
||||
(memq key-symbol
|
||||
'(backward-delete-char
|
||||
delete-backward-char
|
||||
backward-delete-char-untabify))
|
||||
(eq key-last 9)))
|
||||
(setq macro-str (substring macro-str (length key-str)))
|
||||
(if (or (eq key-symbol 'self-insert-command)
|
||||
(and (or (not (memq key-symbol '(backward-delete-char
|
||||
delete-backward-char
|
||||
backward-delete-char-untabify)))
|
||||
(<= (length str) min-bsp))
|
||||
(setq min-bsp (+ (length str) (length key-str)))))
|
||||
(setq str (concat str key-str))
|
||||
(setq str (substring str 0 -1))))
|
||||
(if (memq key-last '(10 13))
|
||||
(setq str (concat str key-str)
|
||||
macro-str (substring macro-str (length key-str))))
|
||||
(if (> (length str) 0)
|
||||
(progn
|
||||
(insert "type \"")
|
||||
(MacEdit-insert-string str)
|
||||
(insert "\"\n")))))
|
||||
(put 'calc-algebraic-entry 'MacEdit-print 'calc-macro-edit-algebraic)
|
||||
(put 'calc-auto-algebraic-entry 'MacEdit-print 'calc-macro-edit-algebraic)
|
||||
|
||||
(defun calc-macro-edit-variable (&optional no-cmd)
|
||||
(let ((str "") ch)
|
||||
(or no-cmd (insert (symbol-name key-symbol) "\n"))
|
||||
(if (memq (MacEdit-peek-char) '(?\+ ?\- ?\* ?\/ ?^ ?\|))
|
||||
(setq str (char-to-string (MacEdit-read-char))))
|
||||
(if (and (setq ch (MacEdit-peek-char))
|
||||
(>= ch ?0) (<= ch ?9))
|
||||
(insert "type \"" str
|
||||
(char-to-string (MacEdit-read-char)) "\"\n")
|
||||
(if (> (length str) 0)
|
||||
(insert "type \"" str "\"\n"))
|
||||
(MacEdit-read-argument))))
|
||||
(put 'calc-store 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-into 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-neg 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-plus 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-minus 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-times 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-div 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-power 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-concat 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-inv 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-decr 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-incr 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-exchange 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-unstore 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-recall 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-let 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-permanent-variable 'MacEdit-print 'calc-macro-edit-variable)
|
||||
|
||||
(defun calc-macro-edit-variable-2 ()
|
||||
(calc-macro-edit-variable)
|
||||
(calc-macro-edit-variable t))
|
||||
(put 'calc-copy-variable 'MacEdit-print 'calc-macro-edit-variable-2)
|
||||
(put 'calc-declare-variable 'MacEdit-print 'calc-macro-edit-variable-2)
|
||||
|
||||
(defun calc-macro-edit-quick-digit ()
|
||||
(insert "type \"" key-str "\" # " (symbol-name key-symbol) "\n"))
|
||||
(put 'calc-store-quick 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-store-into-quick 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-recall-quick 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-select-part 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-clean-num 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
|
||||
|
||||
(defun calc-finish-formula-edit (func)
|
||||
(let ((buf (current-buffer))
|
||||
(str (buffer-substring (point) (point-max)))
|
||||
|
@ -951,11 +855,25 @@
|
|||
(assq (upcase key) (calc-user-key-map))
|
||||
(assq (downcase key) (calc-user-key-map))
|
||||
(and (eq key ?\')
|
||||
(cons nil
|
||||
(intern
|
||||
(concat "calcFunc-"
|
||||
(completing-read
|
||||
(format "Record in %s the algebraic function: "
|
||||
calc-settings-file)
|
||||
(mapcar (lambda (x) (substring x 9))
|
||||
(all-completions "calcFunc-"
|
||||
obarray))
|
||||
(lambda (x)
|
||||
(fboundp
|
||||
(intern (concat "calcFunc-" x))))
|
||||
t)))))
|
||||
(and (eq key ?\M-x)
|
||||
(cons nil
|
||||
(intern (completing-read
|
||||
(format "Record in %s the function: "
|
||||
(format "Record in %s the command: "
|
||||
calc-settings-file)
|
||||
obarray 'fboundp nil "calcFunc-"))))
|
||||
obarray 'fboundp nil "calc-"))))
|
||||
(error "No command defined for that key"))))
|
||||
(set-buffer (find-file-noselect (substitute-in-file-name
|
||||
calc-settings-file)))
|
||||
|
@ -979,7 +897,7 @@
|
|||
(vectorp (nth 1 (nth 3 fcmd)))
|
||||
(progn (and (fboundp 'edit-kbd-macro)
|
||||
(edit-kbd-macro nil))
|
||||
(fboundp 'MacEdit-parse-keys))
|
||||
(fboundp 'edmacro-parse-keys))
|
||||
(setq q-ok t)
|
||||
(aset (nth 1 (nth 3 fcmd)) 1 nil))
|
||||
(insert (setq str (prin1-to-string
|
||||
|
@ -1065,7 +983,7 @@
|
|||
(setq mac (or (aref mac 1)
|
||||
(aset mac 1 (progn (and (fboundp 'edit-kbd-macro)
|
||||
(edit-kbd-macro nil))
|
||||
(MacEdit-parse-keys (aref mac 0)))))))
|
||||
(edmacro-parse-keys (aref mac 0)))))))
|
||||
(if (< (prefix-numeric-value arg) 0)
|
||||
(execute-kbd-macro mac (- (prefix-numeric-value arg)))
|
||||
(if calc-executing-macro
|
||||
|
|
|
@ -174,13 +174,17 @@
|
|||
(defun calc-read-var-name (prompt &optional calc-store-opers)
|
||||
(setq calc-given-value nil
|
||||
calc-aborted-prefix nil)
|
||||
(let ((var (let ((minibuffer-completion-table obarray)
|
||||
(minibuffer-completion-predicate 'boundp)
|
||||
(minibuffer-completion-confirm t))
|
||||
(read-from-minibuffer prompt "var-" calc-var-name-map nil))))
|
||||
(let ((var (concat
|
||||
"var-"
|
||||
(let ((minibuffer-completion-table
|
||||
(mapcar (lambda (x) (substring x 4))
|
||||
(all-completions "var-" obarray)))
|
||||
(minibuffer-completion-predicate
|
||||
(lambda (x) (boundp (intern (concat "var-" x)))))
|
||||
(minibuffer-completion-confirm t))
|
||||
(read-from-minibuffer prompt nil calc-var-name-map nil)))))
|
||||
(setq calc-aborted-prefix "")
|
||||
(and (not (equal var ""))
|
||||
(not (equal var "var-"))
|
||||
(and (not (equal var "var-"))
|
||||
(if (string-match "\\`\\([-a-zA-Z0-9]+\\) *:?=" var)
|
||||
(if (null calc-given-value-flag)
|
||||
(error "Assignment is not allowed in this command")
|
||||
|
@ -196,7 +200,7 @@
|
|||
|
||||
(defun calcVar-digit ()
|
||||
(interactive)
|
||||
(if (calc-minibuffer-contains "var-\\'")
|
||||
(if (calc-minibuffer-contains "\\'")
|
||||
(if (eq calc-store-opers 0)
|
||||
(beep)
|
||||
(insert "q")
|
||||
|
@ -206,7 +210,7 @@
|
|||
(defun calcVar-oper ()
|
||||
(interactive)
|
||||
(if (and (eq calc-store-opers t)
|
||||
(calc-minibuffer-contains "var-\\'"))
|
||||
(calc-minibuffer-contains "\\'"))
|
||||
(progn
|
||||
(erase-buffer)
|
||||
(self-insert-and-exit))
|
||||
|
@ -369,9 +373,10 @@
|
|||
(if var1
|
||||
(let ((value (calc-var-value var1)))
|
||||
(or value
|
||||
(error "No such variable: \"%s\"" (calc-var-name var)))
|
||||
(error "No such variable: \"%s\"" (calc-var-name var1)))
|
||||
(or var2 (setq var2 (calc-read-var-name
|
||||
(format "Copy variable: %s, to: " var1))))
|
||||
(format "Copy variable: %s, to: "
|
||||
(calc-var-name var1)))))
|
||||
(if var2
|
||||
(calc-store-value var2 value ""))))))
|
||||
|
||||
|
|
|
@ -460,16 +460,14 @@ To cancel the edit, simply kill the *Calc Edit* buffer."
|
|||
(make-local-variable 'calc-allow-ret)
|
||||
(setq calc-allow-ret allow-ret)
|
||||
(erase-buffer)
|
||||
(add-hook 'kill-buffer-hook (lambda ()
|
||||
(let ((calc-edit-handler nil))
|
||||
(calc-edit-finish t))
|
||||
(message "(Cancelled)")) t t)
|
||||
(insert (or title title "Calc Edit Mode")
|
||||
". Press "
|
||||
(if (eq (lookup-key (current-global-map) "\e#") 'calc-dispatch)
|
||||
"M-# M-# or C-c C-c"
|
||||
(if allow-ret "C-c C-c" "RET"))
|
||||
" to finish, "
|
||||
(if (eq (lookup-key (current-global-map) "\e#") 'calc-dispatch)
|
||||
"M-# x"
|
||||
"C-x k RET")
|
||||
" to cancel.\n")))
|
||||
". Press `C-c C-c'"
|
||||
(if allow-ret "" " or RET")
|
||||
" to finish, `C-x k RET' to cancel.\n")))
|
||||
(put 'calc-edit-mode 'mode-class 'special)
|
||||
|
||||
(defun calc-show-edit-buffer ()
|
||||
|
|
|
@ -1167,12 +1167,9 @@ commands given here will actually operate on the *Calculator* stack."
|
|||
(exit-recursive-edit)
|
||||
(if (eq major-mode 'calc-edit-mode)
|
||||
(calc-edit-finish arg)
|
||||
(if (eq major-mode 'MacEdit-mode)
|
||||
(MacEdit-finish-edit)
|
||||
(if calc-was-keypad-mode
|
||||
(calc-keypad)
|
||||
(calc arg calc-full-mode t))))))
|
||||
|
||||
(if calc-was-keypad-mode
|
||||
(calc-keypad)
|
||||
(calc arg calc-full-mode t)))))
|
||||
|
||||
(defun calc-quit (&optional non-fatal interactive)
|
||||
(interactive "i\np")
|
||||
|
@ -1183,33 +1180,31 @@ commands given here will actually operate on the *Calculator* stack."
|
|||
(exit-recursive-edit))
|
||||
(if (eq major-mode 'calc-edit-mode)
|
||||
(calc-edit-cancel)
|
||||
(if (eq major-mode 'MacEdit-mode)
|
||||
(MacEdit-cancel-edit)
|
||||
(if (and interactive
|
||||
calc-embedded-info
|
||||
(eq (current-buffer) (aref calc-embedded-info 0)))
|
||||
(calc-embedded nil)
|
||||
(unless (eq major-mode 'calc-mode)
|
||||
(calc-create-buffer))
|
||||
(run-hooks 'calc-end-hook)
|
||||
(setq calc-undo-list nil calc-redo-list nil)
|
||||
(mapcar (function (lambda (v) (set-default v (symbol-value v))))
|
||||
calc-local-var-list)
|
||||
(let ((buf (current-buffer))
|
||||
(win (get-buffer-window (current-buffer)))
|
||||
(kbuf (get-buffer "*Calc Keypad*")))
|
||||
(delete-windows-on (calc-trail-buffer))
|
||||
(if (and win
|
||||
(< (window-height win) (1- (frame-height)))
|
||||
(= (window-width win) (frame-width)) ; avoid calc-keypad
|
||||
(not (get-buffer-window "*Calc Keypad*")))
|
||||
(setq calc-window-height (- (window-height win) 2)))
|
||||
(progn
|
||||
(delete-windows-on buf)
|
||||
(delete-windows-on kbuf))
|
||||
(bury-buffer buf)
|
||||
(bury-buffer calc-trail-buffer)
|
||||
(and kbuf (bury-buffer kbuf)))))))
|
||||
(if (and interactive
|
||||
calc-embedded-info
|
||||
(eq (current-buffer) (aref calc-embedded-info 0)))
|
||||
(calc-embedded nil)
|
||||
(unless (eq major-mode 'calc-mode)
|
||||
(calc-create-buffer))
|
||||
(run-hooks 'calc-end-hook)
|
||||
(setq calc-undo-list nil calc-redo-list nil)
|
||||
(mapcar (function (lambda (v) (set-default v (symbol-value v))))
|
||||
calc-local-var-list)
|
||||
(let ((buf (current-buffer))
|
||||
(win (get-buffer-window (current-buffer)))
|
||||
(kbuf (get-buffer "*Calc Keypad*")))
|
||||
(delete-windows-on (calc-trail-buffer))
|
||||
(if (and win
|
||||
(< (window-height win) (1- (frame-height)))
|
||||
(= (window-width win) (frame-width)) ; avoid calc-keypad
|
||||
(not (get-buffer-window "*Calc Keypad*")))
|
||||
(setq calc-window-height (- (window-height win) 2)))
|
||||
(progn
|
||||
(delete-windows-on buf)
|
||||
(delete-windows-on kbuf))
|
||||
(bury-buffer buf)
|
||||
(bury-buffer calc-trail-buffer)
|
||||
(and kbuf (bury-buffer kbuf))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun quick-calc ()
|
||||
|
|
|
@ -352,7 +352,7 @@ That buffer should be current already."
|
|||
(end (progn (skip-syntax-forward "w_") (point)))
|
||||
(sym (intern-soft (buffer-substring-no-properties
|
||||
beg end)))
|
||||
(file (and sym (symbol-file sym))))
|
||||
(file (and sym (symbol-file sym 'defun))))
|
||||
(when file
|
||||
(goto-char beg)
|
||||
;; help-xref-button needs to operate on something matched
|
||||
|
|
|
@ -242,7 +242,7 @@ in `load-path'."
|
|||
(let ((library
|
||||
(cond ((eq (car-safe def) 'autoload)
|
||||
(nth 1 def))
|
||||
((symbol-file function)))))
|
||||
((symbol-file function 'defun)))))
|
||||
(find-function-search-for-symbol function nil library))))
|
||||
|
||||
(defalias 'function-at-point 'function-called-at-point)
|
||||
|
@ -347,8 +347,7 @@ The library where VARIABLE is defined is searched for in FILE or
|
|||
`find-function-source-path', if non nil, otherwise in `load-path'."
|
||||
(if (not variable)
|
||||
(error "You didn't specify a variable"))
|
||||
;; Fixme: I think `symbol-file' should be fixed instead. -- fx
|
||||
(let ((library (or file (symbol-file (cons 'defvar variable)))))
|
||||
(let ((library (or file (symbol-file variable 'defvar))))
|
||||
(find-function-search-for-symbol variable 'variable library)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -69,15 +69,17 @@ move forward across N balanced expressions."
|
|||
(or arg (setq arg 1))
|
||||
(forward-sexp (- arg)))
|
||||
|
||||
(defun mark-sexp (&optional arg)
|
||||
(defun mark-sexp (&optional arg allow-extend)
|
||||
"Set mark ARG sexps from point.
|
||||
The place mark goes is the same place \\[forward-sexp] would
|
||||
move to with the same argument.
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
Interactively, if this command is repeated
|
||||
or (in Transient Mark mode) if the mark is active,
|
||||
it marks the next ARG sexps after the ones already marked."
|
||||
(interactive "P")
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
(interactive "P\np")
|
||||
(cond ((and allow-extend
|
||||
(or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active)))
|
||||
(setq arg (if arg (prefix-numeric-value arg)
|
||||
(if (< (mark) (point)) -1 1)))
|
||||
(set-mark
|
||||
|
@ -289,14 +291,17 @@ is called as a function to find the defun's end."
|
|||
(goto-char (point-min)))))
|
||||
(setq arg (1+ arg))))))
|
||||
|
||||
(defun mark-defun ()
|
||||
(defun mark-defun (&optional allow-extend)
|
||||
"Put mark at end of this defun, point at beginning.
|
||||
The defun marked is the one that contains point or follows point.
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
it marks more defuns after the ones already marked."
|
||||
(interactive)
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
|
||||
Interactively, if this command is repeated
|
||||
or (in Transient Mark mode) if the mark is active,
|
||||
it marks the next defun after the ones already marked."
|
||||
(interactive "p")
|
||||
(cond ((and allow-extend
|
||||
(or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active)))
|
||||
(set-mark
|
||||
(save-excursion
|
||||
(goto-char (mark))
|
||||
|
|
|
@ -840,7 +840,7 @@ If N is negative, find the next or Nth next match."
|
|||
(unless (minibuffer-window-active-p (selected-window))
|
||||
(message "History item: %d" (- (ring-length eshell-history-ring) pos)))
|
||||
;; Can't use kill-region as it sets this-command
|
||||
(delete-region (save-excursion (eshell-bol) (point)) (point))
|
||||
(delete-region eshell-last-output-end (point))
|
||||
(insert-and-inherit (eshell-get-history pos)))))
|
||||
|
||||
(defun eshell-next-matching-input (regexp arg)
|
||||
|
|
|
@ -1285,7 +1285,7 @@ COMMAND may result in an alias being executed, or a plain command."
|
|||
(defun eshell-find-alias-function (name)
|
||||
"Check whether a function called `eshell/NAME' exists."
|
||||
(let* ((sym (intern-soft (concat "eshell/" name)))
|
||||
(file (symbol-file sym)))
|
||||
(file (symbol-file sym 'defun)))
|
||||
;; If the function exists, but is defined in an eshell module
|
||||
;; that's not currently enabled, don't report it as found
|
||||
(if (and file
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
(let ((fsym (get-text-property (point) 'test-func)))
|
||||
(when fsym
|
||||
(let* ((def (symbol-function fsym))
|
||||
(library (locate-library (symbol-file fsym)))
|
||||
(library (locate-library (symbol-file fsym 'defun)))
|
||||
(name (substring (symbol-name fsym)
|
||||
(length "eshell-test--")))
|
||||
(inhibit-redisplay t))
|
||||
|
|
|
@ -854,12 +854,15 @@ Otherwise, return a single face."
|
|||
(get-char-property (point) 'face)))
|
||||
faces)
|
||||
;; Make a list of the named faces that the `face' property uses.
|
||||
(if (listp faceprop)
|
||||
(if (and (listp faceprop)
|
||||
;; Don't treat an attribute spec as a list of faces.
|
||||
(not (keywordp (car faceprop)))
|
||||
(not (memq (car faceprop) '(foreground-color background-color))))
|
||||
(dolist (f faceprop)
|
||||
(if (symbolp f)
|
||||
(push f faces)))
|
||||
(if (symbolp faceprop)
|
||||
(setq faces (list faceprop))))
|
||||
(push faceprop faces)))
|
||||
;; If there are none, try to get a face name from the buffer.
|
||||
(if (and (null faces)
|
||||
(memq (intern-soft (thing-at-point 'symbol)) (face-list)))
|
||||
|
|
|
@ -962,7 +962,7 @@ If t, `ffap-tex-init' will initialize this when needed.")
|
|||
;; * no commas (good for latex)
|
||||
(file "--:$+<>@-Z_a-z~*?" "<@" "@>;.,!:")
|
||||
;; An url, or maybe a email/news message-id:
|
||||
(url "--:=&?$+@-Z_a-z~#,%;" "^A-Za-z0-9" ":;.,!?")
|
||||
(url "--:=&?$+@-Z_a-z~#,%;*" "^A-Za-z0-9" ":;.,!?")
|
||||
;; Find a string that does *not* contain a colon:
|
||||
(nocolon "--9$+<>@-Z_a-z~" "<@" "@>;.,!?")
|
||||
;; A machine:
|
||||
|
|
224
lisp/files.el
224
lisp/files.el
|
@ -273,14 +273,40 @@ Includes the new backup. Must be > 0"
|
|||
:group 'backup)
|
||||
|
||||
(defcustom require-final-newline nil
|
||||
"*Value of t says silently ensure a file ends in a newline when it is saved.
|
||||
Non-nil but not t says ask user whether to add a newline when there isn't one.
|
||||
nil means don't add newlines."
|
||||
:type '(choice (const :tag "Off" nil)
|
||||
(const :tag "Add" t)
|
||||
"*Whether to add a newline automatically at the end of the file.
|
||||
|
||||
A value of t means do this only when the file is about to be saved.
|
||||
A value of `visit' means do this right after the file is visited.
|
||||
A value of `visit-save' means do it at both of those times.
|
||||
Any other non-nil value means ask user whether to add a newline, when saving.
|
||||
nil means don't add newlines.
|
||||
|
||||
Certain major modes set this locally to the value obtained
|
||||
from `mode-require-final-newline'."
|
||||
:type '(choice (const :tag "When visiting" visit)
|
||||
(const :tag "When saving" t)
|
||||
(const :tag "When visiting or saving" visit-save)
|
||||
(const :tag "Never" nil)
|
||||
(other :tag "Ask" ask))
|
||||
:group 'editing-basics)
|
||||
|
||||
(defcustom mode-require-final-newline t
|
||||
"*Whether to add a newline at the end of the file, in certain major modes.
|
||||
Those modes set `require-final-newline' to this value when you enable them.
|
||||
They do so because they are used for files that are supposed
|
||||
to end in newlines, and the question is how to arrange that.
|
||||
|
||||
A value of t means do this only when the file is about to be saved.
|
||||
A value of `visit' means do this right after the file is visited.
|
||||
A value of `visit-save' means do it at both of those times.
|
||||
Any other non-nil value means ask user whether to add a newline, when saving."
|
||||
:type '(choice (const :tag "When visiting" visit)
|
||||
(const :tag "When saving" t)
|
||||
(const :tag "When visiting or saving" visit-save)
|
||||
(other :tag "Ask" ask))
|
||||
:group 'editing-basics
|
||||
:version "21.4")
|
||||
|
||||
(defcustom auto-save-default t
|
||||
"*Non-nil says by default do auto-saving of every file-visiting buffer."
|
||||
:type 'boolean
|
||||
|
@ -1200,7 +1226,8 @@ name to this list as a string."
|
|||
"Return the buffer visiting file FILENAME (a string).
|
||||
This is like `get-file-buffer', except that it checks for any buffer
|
||||
visiting the same file, possibly under a different name.
|
||||
If PREDICATE is non-nil, only a buffer satisfying it can be returned.
|
||||
If PREDICATE is non-nil, only buffers satisfying it are eligible,
|
||||
and others are ignored.
|
||||
If there is no such live buffer, return nil."
|
||||
(let ((predicate (or predicate #'identity))
|
||||
(truename (abbreviate-file-name (file-truename filename))))
|
||||
|
@ -1626,6 +1653,15 @@ unless NOMODES is non-nil."
|
|||
(when (and view-read-only view-mode)
|
||||
(view-mode-disable))
|
||||
(normal-mode t)
|
||||
;; If requested, add a newline at the end of the file.
|
||||
(and (memq require-final-newline '(visit visit-save))
|
||||
(> (point-max) (point-min))
|
||||
(/= (char-after (1- (point-max))) ?\n)
|
||||
(not (and (eq selective-display t)
|
||||
(= (char-after (1- (point-max))) ?\r)))
|
||||
(save-excursion
|
||||
(goto-char (point-max))
|
||||
(insert "\n")))
|
||||
(when (and buffer-read-only
|
||||
view-read-only
|
||||
(not (eq (get major-mode 'mode-class) 'special)))
|
||||
|
@ -2182,7 +2218,7 @@ is specified, returning t if it is specified."
|
|||
buffer-file-name)
|
||||
(concat "buffer "
|
||||
(buffer-name))))))))))
|
||||
(let (prefix prefixlen suffix beg
|
||||
(let (prefix suffix beg
|
||||
(enable-local-eval enable-local-eval))
|
||||
;; The prefix is what comes before "local variables:" in its line.
|
||||
;; The suffix is what comes after "local variables:" in its line.
|
||||
|
@ -2196,8 +2232,7 @@ is specified, returning t if it is specified."
|
|||
(buffer-substring (point)
|
||||
(progn (beginning-of-line) (point)))))
|
||||
|
||||
(if prefix (setq prefixlen (length prefix)
|
||||
prefix (regexp-quote prefix)))
|
||||
(setq prefix (if prefix (regexp-quote prefix) "^"))
|
||||
(if suffix (setq suffix (concat (regexp-quote suffix) "$")))
|
||||
(forward-line 1)
|
||||
(let ((startpos (point))
|
||||
|
@ -3194,6 +3229,7 @@ Before and after saving the buffer, this function runs
|
|||
(not (and (eq selective-display t)
|
||||
(= (char-after (1- (point-max))) ?\r)))
|
||||
(or (eq require-final-newline t)
|
||||
(eq require-final-newline 'visit-save)
|
||||
(and require-final-newline
|
||||
(y-or-n-p
|
||||
(format "Buffer %s does not end in newline. Add one? "
|
||||
|
@ -3238,7 +3274,8 @@ Before and after saving the buffer, this function runs
|
|||
(if save-buffer-coding-system
|
||||
(let ((coding-system-for-write save-buffer-coding-system))
|
||||
(basic-save-buffer-2))
|
||||
(basic-save-buffer-2)))
|
||||
(basic-save-buffer-2))
|
||||
(setq buffer-file-coding-system-explicit last-coding-system-used))
|
||||
|
||||
;; This returns a value (MODES . BACKUPNAME), like backup-buffer.
|
||||
(defun basic-save-buffer-2 ()
|
||||
|
@ -3363,6 +3400,10 @@ This requires the external program `diff' to be in your `exec-path'."
|
|||
"ACTION-ALIST argument used in call to `map-y-or-n-p'.")
|
||||
(put 'save-some-buffers-action-alist 'risky-local-variable t)
|
||||
|
||||
(defvar buffer-save-without-query nil
|
||||
"Non-nil means `save-some-buffers' should save this buffer without asking.")
|
||||
(make-variable-buffer-local 'buffer-save-without-query)
|
||||
|
||||
(defun save-some-buffers (&optional arg pred)
|
||||
"Save some modified file-visiting buffers. Asks user about each one.
|
||||
You can answer `y' to save, `n' not to save, `C-r' to look at the
|
||||
|
@ -3380,8 +3421,18 @@ See `save-some-buffers-action-alist' if you want to
|
|||
change the additional actions you can take on files."
|
||||
(interactive "P")
|
||||
(save-window-excursion
|
||||
(let* ((queried nil)
|
||||
(files-done
|
||||
(let* (queried some-automatic
|
||||
files-done abbrevs-done)
|
||||
(dolist (buffer (buffer-list))
|
||||
;; First save any buffers that we're supposed to save unconditionally.
|
||||
;; That way the following code won't ask about them.
|
||||
(with-current-buffer buffer
|
||||
(when (and buffer-save-without-query (buffer-modified-p))
|
||||
(setq some-automatic t)
|
||||
(save-buffer))))
|
||||
;; Ask about those buffers that merit it,
|
||||
;; and record the number thus saved.
|
||||
(setq files-done
|
||||
(map-y-or-n-p
|
||||
(function
|
||||
(lambda (buffer)
|
||||
|
@ -3410,19 +3461,22 @@ change the additional actions you can take on files."
|
|||
(buffer-list)
|
||||
'("buffer" "buffers" "save")
|
||||
save-some-buffers-action-alist))
|
||||
(abbrevs-done
|
||||
(and save-abbrevs abbrevs-changed
|
||||
(progn
|
||||
(if (or arg
|
||||
(eq save-abbrevs 'silently)
|
||||
(y-or-n-p (format "Save abbrevs in %s? "
|
||||
abbrev-file-name)))
|
||||
(write-abbrev-file nil))
|
||||
;; Don't keep bothering user if he says no.
|
||||
(setq abbrevs-changed nil)
|
||||
t))))
|
||||
;; Maybe to save abbrevs, and record whether
|
||||
;; we either saved them or asked to.
|
||||
(and save-abbrevs abbrevs-changed
|
||||
(progn
|
||||
(if (or arg
|
||||
(eq save-abbrevs 'silently)
|
||||
(y-or-n-p (format "Save abbrevs in %s? "
|
||||
abbrev-file-name)))
|
||||
(write-abbrev-file nil))
|
||||
;; Don't keep bothering user if he says no.
|
||||
(setq abbrevs-changed nil)
|
||||
(setq abbrevs-done t)))
|
||||
(or queried (> files-done 0) abbrevs-done
|
||||
(message "(No files need saving)")))))
|
||||
(message (if some-automatic
|
||||
"(Some special files were saved without asking)"
|
||||
"(No files need saving)"))))))
|
||||
|
||||
(defun not-modified (&optional arg)
|
||||
"Mark current buffer as unmodified, not needing to be saved.
|
||||
|
@ -3691,11 +3745,11 @@ non-nil, it is called instead of rereading visited file contents."
|
|||
(unlock-buffer)))
|
||||
(widen)
|
||||
(let ((coding-system-for-read
|
||||
;; Auto-saved file shoule be read without
|
||||
;; any code conversion.
|
||||
(if auto-save-p 'utf-8-emacs
|
||||
;; Auto-saved file shoule be read by Emacs'
|
||||
;; internal coding.
|
||||
(if auto-save-p 'auto-save-coding
|
||||
(or coding-system-for-read
|
||||
buffer-file-coding-system))))
|
||||
buffer-file-coding-system-explicit))))
|
||||
;; This force after-insert-file-set-coding
|
||||
;; (called from insert-file-contents) to set
|
||||
;; buffer-file-coding-system to a proper value.
|
||||
|
@ -4309,6 +4363,8 @@ program specified by `directory-free-space-program' if that is non-nil."
|
|||
(buffer-substring (point) end)))))))))
|
||||
|
||||
|
||||
(defvar insert-directory-ls-version 'unknown)
|
||||
|
||||
;; insert-directory
|
||||
;; - must insert _exactly_one_line_ describing FILE if WILDCARD and
|
||||
;; FULL-DIRECTORY-P is nil.
|
||||
|
@ -4418,6 +4474,56 @@ normally equivalent short `-D' option is just passed on to
|
|||
(concat (file-name-as-directory file) ".")
|
||||
file))))))))
|
||||
|
||||
;; If we got "//DIRED//" in the output, it means we got a real
|
||||
;; directory listing, even if `ls' returned nonzero.
|
||||
;; So ignore any errors.
|
||||
(when (if (stringp switches)
|
||||
(string-match "--dired\\>" switches)
|
||||
(member "--dired" switches))
|
||||
(save-excursion
|
||||
(forward-line -2)
|
||||
(when (looking-at "//SUBDIRED//")
|
||||
(forward-line -1))
|
||||
(if (looking-at "//DIRED//")
|
||||
(setq result 0))))
|
||||
|
||||
(when (and (not (eq 0 result))
|
||||
(eq insert-directory-ls-version 'unknown))
|
||||
;; The first time ls returns an error,
|
||||
;; find the version numbers of ls,
|
||||
;; and set insert-directory-ls-version
|
||||
;; to > if it is more than 5.2.1, < if it is less, nil if it
|
||||
;; is equal or if the info cannot be obtained.
|
||||
;; (That can mean it isn't GNU ls.)
|
||||
(let ((version-out
|
||||
(with-temp-buffer
|
||||
(call-process "ls" nil t nil "--version")
|
||||
(buffer-string))))
|
||||
(if (string-match "ls (.*utils) \\([0-9.]*\\)$" version-out)
|
||||
(let* ((version (match-string 1 version-out))
|
||||
(split (split-string version "[.]"))
|
||||
(numbers (mapcar 'string-to-int split))
|
||||
(min '(5 2 1))
|
||||
comparison)
|
||||
(while (and (not comparison) (or numbers min))
|
||||
(cond ((null min)
|
||||
(setq comparison '>))
|
||||
((null numbers)
|
||||
(setq comparison '<))
|
||||
((> (car numbers) (car min))
|
||||
(setq comparison '>))
|
||||
((< (car numbers) (car min))
|
||||
(setq comparison '<))
|
||||
(t
|
||||
(setq numbers (cdr numbers)
|
||||
min (cdr min)))))
|
||||
(setq insert-directory-ls-version (or comparison '=)))
|
||||
(setq insert-directory-ls-version nil))))
|
||||
|
||||
;; For GNU ls versions 5.2.2 and up, ignore minor errors.
|
||||
(when (and (eq 1 result) (eq insert-directory-ls-version '>))
|
||||
(setq result 0))
|
||||
|
||||
;; If `insert-directory-program' failed, signal an error.
|
||||
(unless (eq 0 result)
|
||||
;; Delete the error message it may have output.
|
||||
|
@ -4444,23 +4550,39 @@ normally equivalent short `-D' option is just passed on to
|
|||
(when (looking-at "//SUBDIRED//")
|
||||
(delete-region (point) (progn (forward-line 1) (point)))
|
||||
(forward-line -1))
|
||||
(if (looking-at "//DIRED//")
|
||||
(let ((end (line-end-position)))
|
||||
(forward-word 1)
|
||||
(forward-char 3)
|
||||
(while (< (point) end)
|
||||
(let ((start (+ beg (read (current-buffer))))
|
||||
(end (+ beg (read (current-buffer)))))
|
||||
(if (memq (char-after end) '(?\n ?\ ))
|
||||
;; End is followed by \n or by " -> ".
|
||||
(put-text-property start end 'dired-filename t)
|
||||
;; It seems that we can't trust ls's output as to
|
||||
;; byte positions of filenames.
|
||||
(put-text-property beg (point) 'dired-filename nil)
|
||||
(end-of-line))))
|
||||
(goto-char end)
|
||||
(beginning-of-line)
|
||||
(delete-region (point) (progn (forward-line 2) (point))))
|
||||
(when (looking-at "//DIRED//")
|
||||
(let ((end (line-end-position))
|
||||
(linebeg (point))
|
||||
error-lines)
|
||||
;; Find all the lines that are error messages,
|
||||
;; and record the bounds of each one.
|
||||
(goto-char (point-min))
|
||||
(while (< (point) linebeg)
|
||||
(or (eql (following-char) ?\s)
|
||||
(push (list (point) (line-end-position)) error-lines))
|
||||
(forward-line 1))
|
||||
(setq error-lines (nreverse error-lines))
|
||||
;; Now read the numeric positions of file names.
|
||||
(goto-char linebeg)
|
||||
(forward-word 1)
|
||||
(forward-char 3)
|
||||
(while (< (point) end)
|
||||
(let ((start (insert-directory-adj-pos
|
||||
(+ beg (read (current-buffer)))
|
||||
error-lines))
|
||||
(end (insert-directory-adj-pos
|
||||
(+ beg (read (current-buffer)))
|
||||
error-lines)))
|
||||
(if (memq (char-after end) '(?\n ?\ ))
|
||||
;; End is followed by \n or by " -> ".
|
||||
(put-text-property start end 'dired-filename t)
|
||||
;; It seems that we can't trust ls's output as to
|
||||
;; byte positions of filenames.
|
||||
(put-text-property beg (point) 'dired-filename nil)
|
||||
(end-of-line))))
|
||||
(goto-char end)
|
||||
(beginning-of-line)
|
||||
(delete-region (point) (progn (forward-line 2) (point))))
|
||||
(forward-line 1)
|
||||
(if (looking-at "//DIRED-OPTIONS//")
|
||||
(delete-region (point) (progn (forward-line 1) (point)))
|
||||
|
@ -4512,6 +4634,18 @@ normally equivalent short `-D' option is just passed on to
|
|||
(end-of-line)
|
||||
(insert " available " available)))))))))))
|
||||
|
||||
(defun insert-directory-adj-pos (pos error-lines)
|
||||
"Convert `ls --dired' file name position value POS to a buffer position.
|
||||
File name position values returned in ls --dired output
|
||||
count only stdout; they don't count the error messages sent to stderr.
|
||||
So this function converts to them to real buffer positions.
|
||||
ERROR-LINES is a list of buffer positions of error message lines,
|
||||
of the form (START END)."
|
||||
(while (and error-lines (< (caar error-lines) pos))
|
||||
(setq pos (+ pos (- (nth 1 (car error-lines)) (nth 0 (car error-lines)))))
|
||||
(pop error-lines))
|
||||
pos)
|
||||
|
||||
(defun insert-directory-safely (file switches
|
||||
&optional wildcard full-directory-p)
|
||||
"Insert directory listing for FILE, formatted according to SWITCHES.
|
||||
|
|
|
@ -1,9 +1,45 @@
|
|||
2004-12-27 Simon Josefsson <jas@extundo.com>
|
||||
|
||||
* mm-bodies.el (mm-body-encoding): Don't permit 7-bit to be used
|
||||
when mm-use-ultra-safe-encoding is enabled (e.g., for PGP/MIME)
|
||||
and we have trailing white space. Reported by Werner Koch
|
||||
<wk@gnupg.org>.
|
||||
|
||||
2004-12-17 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* gnus-group.el (gnus-group-mode-map): Map follow-link to mouse-face.
|
||||
|
||||
* gnus-sum.el (gnus-summary-mode-map): Likewise.
|
||||
|
||||
2004-12-22 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-spec.el (gnus-spec-tab): Make a Lisp form which works
|
||||
correctly even if there are wide characters.
|
||||
|
||||
2004-12-21 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* rfc2231.el (rfc2231-parse-string): Decode encoded value after
|
||||
concatenating segments rather than before concatenating them.
|
||||
Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
|
||||
|
||||
2004-12-17 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-util.el (mm-xemacs-find-mime-charset): New macro.
|
||||
|
||||
2004-12-17 Aidan Kehoe <kehoea@parhasard.net>
|
||||
|
||||
* mm-util.el (mm-xemacs-find-mime-charset-1): New function used to
|
||||
unify Latin characters in XEmacs.
|
||||
(mm-find-mime-charset-region): Use it.
|
||||
|
||||
2004-12-17 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-util.el (gnus-delete-directory): New function.
|
||||
|
||||
* gnus-agent.el (gnus-agent-delete-group): Use it.
|
||||
|
||||
* gnus-cache.el (gnus-cache-delete-group): Use it.
|
||||
|
||||
2004-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min.
|
||||
|
|
|
@ -891,7 +891,7 @@ next enabled. Depends upon the caller to determine whether group deletion is sup
|
|||
(path (directory-file-name
|
||||
(let (gnus-command-method command-method)
|
||||
(gnus-agent-group-pathname group)))))
|
||||
(gnus-delete-file path)
|
||||
(gnus-delete-directory path)
|
||||
|
||||
(let* ((real-group (gnus-group-real-name group)))
|
||||
(gnus-agent-save-group-info command-method real-group nil)
|
||||
|
|
|
@ -754,7 +754,7 @@ next enabled. Depends upon the caller to determine whether group renaming is sup
|
|||
disabled, as the old cache files would corrupt gnus when the cache was
|
||||
next enabled. Depends upon the caller to determine whether group deletion is supported."
|
||||
(let ((dir (gnus-cache-file-name group "")))
|
||||
(gnus-delete-file dir))
|
||||
(gnus-delete-directory dir))
|
||||
|
||||
(let ((no-save gnus-cache-active-hashtb))
|
||||
(unless gnus-cache-active-hashtb
|
||||
|
|
|
@ -275,21 +275,15 @@ Return a list of updated types."
|
|||
|
||||
(defun gnus-spec-tab (column)
|
||||
(if (> column 0)
|
||||
`(insert (make-string (max (- ,column (current-column)) 0) ? ))
|
||||
`(insert-char ? (max (- ,column (current-column)) 0))
|
||||
(let ((column (abs column)))
|
||||
(if gnus-use-correct-string-widths
|
||||
`(progn
|
||||
(if (> (current-column) ,column)
|
||||
(while (progn
|
||||
(delete-backward-char 1)
|
||||
(> (current-column) ,column))))
|
||||
(insert (make-string (max (- ,column (current-column)) 0) ? )))
|
||||
`(progn
|
||||
(if (> (current-column) ,column)
|
||||
(delete-region (point)
|
||||
(- (point) (- (current-column) ,column)))
|
||||
(insert (make-string (max (- ,column (current-column)) 0)
|
||||
? ))))))))
|
||||
`(if (> (current-column) ,column)
|
||||
(let ((end (point)))
|
||||
(if (= (move-to-column ,column) ,column)
|
||||
(delete-region (point) end)
|
||||
(delete-region (1- (point)) end)
|
||||
(insert " ")))
|
||||
(insert-char ? (max (- ,column (current-column)) 0))))))
|
||||
|
||||
(defun gnus-correct-length (string)
|
||||
"Return the correct width of STRING."
|
||||
|
|
|
@ -708,6 +708,23 @@ Bind `print-quoted' and `print-readably' to t, and `print-length' and
|
|||
(when (file-exists-p file)
|
||||
(delete-file file)))
|
||||
|
||||
(defun gnus-delete-directory (directory)
|
||||
"Delete files in DIRECTORY. Subdirectories remain.
|
||||
If there's no subdirectory, delete DIRECTORY as well."
|
||||
(when (file-directory-p directory)
|
||||
(let ((files (directory-files
|
||||
directory t "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))
|
||||
file dir)
|
||||
(while files
|
||||
(setq file (pop files))
|
||||
(if (eq t (car (file-attributes file)))
|
||||
;; `file' is a subdirectory.
|
||||
(setq dir t)
|
||||
;; `file' is a file or a symlink.
|
||||
(delete-file file)))
|
||||
(unless dir
|
||||
(delete-directory directory)))))
|
||||
|
||||
(defun gnus-strip-whitespace (string)
|
||||
"Return STRING stripped of all whitespace."
|
||||
(while (string-match "[\r\n\t ]+" string)
|
||||
|
|
|
@ -138,7 +138,8 @@ If no encoding was done, nil is returned."
|
|||
(cond
|
||||
((and (not longp)
|
||||
(not (and mm-use-ultra-safe-encoding
|
||||
(save-excursion (re-search-forward "^From " nil t))))
|
||||
(or (save-excursion (re-search-forward " $" nil t))
|
||||
(save-excursion (re-search-forward "^From " nil t)))))
|
||||
(eq bits '7bit))
|
||||
bits)
|
||||
((and (not mm-use-ultra-safe-encoding)
|
||||
|
|
|
@ -525,7 +525,84 @@ This affects whether coding conversion should be attempted generally."
|
|||
(length (memq (coding-system-base b) priorities)))
|
||||
t))))
|
||||
|
||||
(defun mm-find-mime-charset-region (b e)
|
||||
(eval-when-compile
|
||||
(autoload 'latin-unity-massage-name "latin-unity")
|
||||
(autoload 'latin-unity-maybe-remap "latin-unity")
|
||||
(autoload 'latin-unity-representations-feasible-region "latin-unity")
|
||||
(autoload 'latin-unity-representations-present-region "latin-unity")
|
||||
(defvar latin-unity-coding-systems)
|
||||
(defvar latin-unity-ucs-list))
|
||||
|
||||
(defun mm-xemacs-find-mime-charset-1 (begin end)
|
||||
"Determine which MIME charset to use to send region as message.
|
||||
This uses the XEmacs-specific latin-unity package to better handle the
|
||||
case where identical characters from diverse ISO-8859-? character sets
|
||||
can be encoded using a single one of the corresponding coding systems.
|
||||
|
||||
It treats `mm-coding-system-priorities' as the list of preferred
|
||||
coding systems; a useful example setting for this list in Western
|
||||
Europe would be '(iso-8859-1 iso-8859-15 utf-8), which would default
|
||||
to the very standard Latin 1 coding system, and only move to coding
|
||||
systems that are less supported as is necessary to encode the
|
||||
characters that exist in the buffer.
|
||||
|
||||
Latin Unity doesn't know about those non-ASCII Roman characters that
|
||||
are available in various East Asian character sets. As such, its
|
||||
behavior if you have a JIS 0212 LATIN SMALL LETTER A WITH ACUTE in a
|
||||
buffer and it can otherwise be encoded as Latin 1, won't be ideal.
|
||||
But this is very much a corner case, so don't worry about it."
|
||||
(let ((systems mm-coding-system-priorities) csets psets curset)
|
||||
|
||||
;; Load the Latin Unity library, if available.
|
||||
(when (and (not (featurep 'latin-unity)) (locate-library "latin-unity"))
|
||||
(require 'latin-unity))
|
||||
|
||||
;; Now, can we use it?
|
||||
(if (featurep 'latin-unity)
|
||||
(progn
|
||||
(setq csets (latin-unity-representations-feasible-region begin end)
|
||||
psets (latin-unity-representations-present-region begin end))
|
||||
|
||||
(catch 'done
|
||||
|
||||
;; Pass back the first coding system in the preferred list
|
||||
;; that can encode the whole region.
|
||||
(dolist (curset systems)
|
||||
(setq curset (latin-unity-massage-name 'buffer-default curset))
|
||||
|
||||
;; If the coding system is a universal coding system, then
|
||||
;; it can certainly encode all the characters in the region.
|
||||
(if (memq curset latin-unity-ucs-list)
|
||||
(throw 'done (list curset)))
|
||||
|
||||
;; If a coding system isn't universal, and isn't in
|
||||
;; the list that latin unity knows about, we can't
|
||||
;; decide whether to use it here. Leave that until later
|
||||
;; in `mm-find-mime-charset-region' function, whence we
|
||||
;; have been called.
|
||||
(unless (memq curset latin-unity-coding-systems)
|
||||
(throw 'done nil))
|
||||
|
||||
;; Right, we know about this coding system, and it may
|
||||
;; conceivably be able to encode all the characters in
|
||||
;; the region.
|
||||
(if (latin-unity-maybe-remap begin end curset csets psets t)
|
||||
(throw 'done (list curset))))
|
||||
|
||||
;; Can't encode using anything from the
|
||||
;; `mm-coding-system-priorities' list.
|
||||
;; Leave `mm-find-mime-charset' to do most of the work.
|
||||
nil))
|
||||
|
||||
;; Right, latin unity isn't available; let `mm-find-charset-region'
|
||||
;; take its default action, which equally applies to GNU Emacs.
|
||||
nil)))
|
||||
|
||||
(defmacro mm-xemacs-find-mime-charset (begin end)
|
||||
(when (featurep 'xemacs)
|
||||
`(mm-xemacs-find-mime-charset-1 ,begin ,end)))
|
||||
|
||||
(defun mm-find-mime-charset-region (b e &optional hack-charsets)
|
||||
"Return the MIME charsets needed to encode the region between B and E.
|
||||
nil means ASCII, a single-element list represents an appropriate MIME
|
||||
charset, and a longer list means no appropriate charset."
|
||||
|
@ -566,10 +643,14 @@ charset, and a longer list means no appropriate charset."
|
|||
(setq systems nil
|
||||
charsets (list cs))))))
|
||||
charsets))
|
||||
;; If we're XEmacs, and some coding system is appropriate,
|
||||
;; mm-xemacs-find-mime-charset will return an appropriate list.
|
||||
;; Otherwise, we'll get nil, and the next setq will get invoked.
|
||||
(setq charsets (mm-xemacs-find-mime-charset b e))
|
||||
|
||||
;; Fixme: won't work for unibyte Emacs 22:
|
||||
|
||||
;; Otherwise we're not multibyte, we're XEmacs, or a single
|
||||
;; coding system won't cover it.
|
||||
;; We're not multibyte, or a single coding system won't cover it.
|
||||
(setq charsets
|
||||
(mm-delete-duplicates
|
||||
(mapcar 'mm-mime-charset
|
||||
|
|
|
@ -88,7 +88,6 @@ The list will be on the form
|
|||
(point) (progn (forward-sexp 1) (point))))))
|
||||
(error "Invalid header: %s" string))
|
||||
(setq c (char-after))
|
||||
(setq encoded nil)
|
||||
(when (eq c ?*)
|
||||
(forward-char 1)
|
||||
(setq c (char-after))
|
||||
|
@ -126,16 +125,22 @@ The list will be on the form
|
|||
(point) (progn (forward-sexp) (point)))))
|
||||
(t
|
||||
(error "Invalid header: %s" string)))
|
||||
(when encoded
|
||||
(setq value (rfc2231-decode-encoded-string value)))
|
||||
(if number
|
||||
(setq prev-attribute attribute
|
||||
prev-value (concat prev-value value))
|
||||
(push (cons attribute value) parameters))))
|
||||
(push (cons attribute
|
||||
(if encoded
|
||||
(rfc2231-decode-encoded-string value)
|
||||
value))
|
||||
parameters))))
|
||||
|
||||
;; Take care of any final continuations.
|
||||
(when prev-attribute
|
||||
(push (cons prev-attribute prev-value) parameters))
|
||||
(push (cons prev-attribute
|
||||
(if encoded
|
||||
(rfc2231-decode-encoded-string prev-value)
|
||||
prev-value))
|
||||
parameters))
|
||||
|
||||
(when type
|
||||
`(,type ,@(nreverse parameters)))))))
|
||||
|
|
|
@ -355,7 +355,7 @@ face (according to `face-differs-from-default-p')."
|
|||
(if (re-search-backward "alias for `\\([^`']+\\)'" nil t)
|
||||
(help-xref-button 1 'help-function def)))))
|
||||
(or file-name
|
||||
(setq file-name (symbol-file function)))
|
||||
(setq file-name (symbol-file function 'defun)))
|
||||
(when (equal file-name "loaddefs.el")
|
||||
;; Find the real def site of the preloaded function.
|
||||
;; This is necessary only for defaliases.
|
||||
|
@ -614,7 +614,7 @@ it is displayed along with the global value."
|
|||
;; Make a hyperlink to the library if appropriate. (Don't
|
||||
;; change the format of the buffer's initial line in case
|
||||
;; anything expects the current format.)
|
||||
(let ((file-name (symbol-file (cons 'defvar variable))))
|
||||
(let ((file-name (symbol-file variable 'defvar)))
|
||||
(when (equal file-name "loaddefs.el")
|
||||
;; Find the real def site of the preloaded variable.
|
||||
(let ((location
|
||||
|
|
23
lisp/hexl.el
23
lisp/hexl.el
|
@ -111,11 +111,19 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces."
|
|||
(defvar hexl-mode-old-isearch-search-fun-function)
|
||||
(defvar hexl-mode-old-require-final-newline)
|
||||
(defvar hexl-mode-old-syntax-table)
|
||||
(defvar hexl-mode-old-font-lock-keywords)
|
||||
|
||||
(defvar hexl-ascii-overlay nil
|
||||
"Overlay used to highlight ASCII element corresponding to current point.")
|
||||
(make-variable-buffer-local 'hexl-ascii-overlay)
|
||||
|
||||
(defvar hexl-font-lock-keywords
|
||||
'(("^\\([0-9a-f]+:\\).\\{40\\} \\(.+$\\)"
|
||||
;; "^\\([0-9a-f]+:\\).+ \\(.+$\\)"
|
||||
(1 'hexl-address-area t t)
|
||||
(2 'hexl-ascii-area t t)))
|
||||
"Font lock keywords used in `hexl-mode'.")
|
||||
|
||||
;; routines
|
||||
|
||||
(put 'hexl-mode 'mode-class 'special)
|
||||
|
@ -265,6 +273,11 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
|
|||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline nil)
|
||||
|
||||
(make-local-variable 'hexl-mode-old-font-lock-keywords)
|
||||
(setq hexl-mode-old-font-lock-keywords font-lock-defaults)
|
||||
(make-local-variable 'font-lock-defaults)
|
||||
(setq font-lock-defaults '(hexl-font-lock-keywords t))
|
||||
|
||||
;; Add hooks to rehexlify or dehexlify on various events.
|
||||
(add-hook 'after-revert-hook 'hexl-after-revert-hook nil t)
|
||||
|
||||
|
@ -376,6 +389,7 @@ With arg, don't unhexlify buffer."
|
|||
(setq isearch-search-fun-function hexl-mode-old-isearch-search-fun-function)
|
||||
(use-local-map hexl-mode-old-local-map)
|
||||
(set-syntax-table hexl-mode-old-syntax-table)
|
||||
(setq font-lock-defaults hexl-mode-old-font-lock-keywords)
|
||||
(setq major-mode hexl-mode-old-major-mode)
|
||||
(force-mode-line-update))
|
||||
|
||||
|
@ -684,15 +698,6 @@ This discards the buffer's undo information."
|
|||
(apply 'call-process-region (point-min) (point-max)
|
||||
(expand-file-name hexl-program exec-directory)
|
||||
t t nil (split-string hexl-options))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^[0-9a-f]+:" nil t)
|
||||
(put-text-property (match-beginning 0) (match-end 0)
|
||||
'font-lock-face 'hexl-address-area))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward " \\(.+$\\)" nil t)
|
||||
(put-text-property (match-beginning 1) (match-end 1)
|
||||
'font-lock-face 'hexl-ascii-area)))
|
||||
(if (> (point) (hexl-address-to-marker hexl-max-address))
|
||||
(hexl-goto-address hexl-max-address))))
|
||||
|
||||
|
|
|
@ -1699,12 +1699,31 @@ function by default."
|
|||
|
||||
(setq set-auto-coding-function 'set-auto-coding)
|
||||
|
||||
(defun after-insert-file-set-coding (inserted)
|
||||
;; This variable is set in these two cases:
|
||||
;; (1) A file is read by a coding system specified explicitly.
|
||||
;; after-insert-file-set-coding sets this value to
|
||||
;; coding-system-for-read.
|
||||
;; (2) A buffer is saved.
|
||||
;; After writing, basic-save-buffer-1 sets this value to
|
||||
;; last-coding-system-used.
|
||||
;; This variable is used for decoding in revert-buffer.
|
||||
(defvar buffer-file-coding-system-explicit nil
|
||||
"The file coding system explicitly specified for the current buffer.
|
||||
Internal use only.")
|
||||
(make-variable-buffer-local 'buffer-file-coding-system-explicit)
|
||||
(put 'buffer-file-coding-system-explicit 'permanent-local t)
|
||||
|
||||
(defun after-insert-file-set-coding (inserted &optional visit)
|
||||
"Set `buffer-file-coding-system' of current buffer after text is inserted.
|
||||
INSERTED is the number of characters that were inserted, as figured
|
||||
in the situation before this function. Return the number of characters
|
||||
inserted, as figured in the situation after. The two numbers can be
|
||||
different if the buffer has become unibyte."
|
||||
different if the buffer has become unibyte.
|
||||
The optional second arg VISIT non-nil means that we are visiting a file."
|
||||
(if (and visit
|
||||
coding-system-for-read
|
||||
(not (eq coding-system-for-read 'auto-save-coding)))
|
||||
(setq buffer-file-coding-system-explicit coding-system-for-read))
|
||||
(if last-coding-system-used
|
||||
(let ((coding-system
|
||||
(find-new-buffer-file-coding-system last-coding-system-used)))
|
||||
|
@ -1832,13 +1851,27 @@ or a function symbol which, when called, returns such a cons cell."
|
|||
(defun decode-coding-inserted-region (from to filename
|
||||
&optional visit beg end replace)
|
||||
"Decode the region between FROM and TO as if it is read from file FILENAME.
|
||||
The idea is that the text between FROM and TO was just inserted somehow.
|
||||
Optional arguments VISIT, BEG, END, and REPLACE are the same as those
|
||||
of the function `insert-file-contents'."
|
||||
of the function `insert-file-contents'.
|
||||
Part of the job of this function is setting `buffer-undo-list' appropriately."
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(narrow-to-region from to)
|
||||
(goto-char (point-min))
|
||||
(let ((coding coding-system-for-read))
|
||||
(let ((coding coding-system-for-read)
|
||||
undo-list-saved)
|
||||
(if visit
|
||||
;; Temporarily turn off undo recording, if we're decoding the
|
||||
;; text of a visited file.
|
||||
(setq buffer-undo-list t)
|
||||
;; Otherwise, if we can recognize the undo elt for the insertion,
|
||||
;; remove it and get ready to replace it later.
|
||||
;; In the mean time, turn off undo recording.
|
||||
(let ((last (car-safe buffer-undo-list)))
|
||||
(if (and (consp last) (eql (car last) from) (eql (cdr last) to))
|
||||
(setq undo-list-saved (cdr buffer-undo-list)
|
||||
buffer-undo-list t))))
|
||||
(narrow-to-region from to)
|
||||
(goto-char (point-min))
|
||||
(or coding
|
||||
(setq coding (funcall set-auto-coding-function
|
||||
filename (- (point-max) (point-min)))))
|
||||
|
@ -1853,7 +1886,35 @@ of the function `insert-file-contents'."
|
|||
(setq coding nil))
|
||||
(if coding
|
||||
(decode-coding-region (point-min) (point-max) coding)
|
||||
(setq last-coding-system-used coding))))))
|
||||
(setq last-coding-system-used coding))
|
||||
;; If we're decoding the text of a visited file,
|
||||
;; the undo list should start out empty.
|
||||
(if visit
|
||||
(setq buffer-undo-list nil)
|
||||
;; If we decided to replace the undo entry for the insertion,
|
||||
;; do so now.
|
||||
(if undo-list-saved
|
||||
(setq buffer-undo-list
|
||||
(cons (cons from (point-max)) undo-list-saved))))))))
|
||||
|
||||
(defun recode-region (start end new-coding coding)
|
||||
"Re-decode the region (previously decoded by CODING) by NEW-CODING."
|
||||
(interactive
|
||||
(list (region-beginning) (region-end)
|
||||
(read-coding-system "Text was really in: ")
|
||||
(let ((coding (or buffer-file-coding-system last-coding-system-used)))
|
||||
(read-coding-system
|
||||
(concat "But was interpreted as"
|
||||
(if coding (format " (default %S): " coding) ": "))
|
||||
coding))))
|
||||
(or (and new-coding coding)
|
||||
(error "Coding system not specified"))
|
||||
;; Check it before we encode the region.
|
||||
(check-coding-system new-coding)
|
||||
(save-restriction
|
||||
(narrow-to-region start end)
|
||||
(encode-coding-region (point-min) (point-max) coding)
|
||||
(decode-coding-region (point-min) (point-max) new-coding)))
|
||||
|
||||
(defun make-translation-table (&rest args)
|
||||
"Make a translation table from arguments.
|
||||
|
|
|
@ -46,7 +46,8 @@
|
|||
(message "Using load-path %s" load-path)
|
||||
|
||||
;; We don't want to have any undo records in the dumped Emacs.
|
||||
(buffer-disable-undo "*scratch*")
|
||||
(set-buffer "*scratch*")
|
||||
(setq buffer-undo-list t)
|
||||
|
||||
(load "emacs-lisp/byte-run")
|
||||
(load "emacs-lisp/backquote")
|
||||
|
|
|
@ -3435,6 +3435,8 @@ typically for purposes of moderating a list."
|
|||
(if (not from) (setq from user-mail-address))
|
||||
(let ((tembuf (generate-new-buffer " sendmail temp"))
|
||||
(case-fold-search nil)
|
||||
(mail-personal-alias-file
|
||||
(or mail-alias-file mail-personal-alias-file))
|
||||
(mailbuf rmail-buffer))
|
||||
(unwind-protect
|
||||
(with-current-buffer tembuf
|
||||
|
|
|
@ -523,7 +523,7 @@ This is relative to `smtpmail-queue-dir'.")
|
|||
(when (and cred mech)
|
||||
(cond
|
||||
((eq mech 'cram-md5)
|
||||
(smtpmail-send-command process (format "AUTH %s" mech))
|
||||
(smtpmail-send-command process (upcase (format "AUTH %s" mech)))
|
||||
(if (or (null (car (setq ret (smtpmail-read-response process))))
|
||||
(not (integerp (car ret)))
|
||||
(>= (car ret) 400))
|
||||
|
|
|
@ -754,7 +754,8 @@ remains active. Otherwise, it remains until the next input event.
|
|||
|
||||
If the click is in the echo area, display the `*Messages*' buffer."
|
||||
(interactive "e")
|
||||
(let ((w (posn-window (event-start start-event))))
|
||||
(let ((w (posn-window (event-start start-event)))
|
||||
(mouse-autoselect-window nil))
|
||||
(if (not (or (not (window-minibuffer-p w))
|
||||
(minibuffer-window-active-p w)))
|
||||
(save-excursion
|
||||
|
|
|
@ -100,7 +100,7 @@ A value of t means there is no limit--fontify regardless of the size."
|
|||
|
||||
(defvar goto-address-mail-regexp
|
||||
;; Actually pretty much any char could appear in the username part. -stef
|
||||
"[-a-zA-Z0-9._+]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+"
|
||||
"[-a-zA-Z0-9=._+]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+"
|
||||
"A regular expression probably matching an e-mail address.")
|
||||
|
||||
(defvar goto-address-url-regexp
|
||||
|
|
|
@ -356,7 +356,7 @@ This is used during Tempo template completion."
|
|||
|
||||
;; Miscellaneous customization
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline t))
|
||||
(setq require-final-newline mode-require-final-newline))
|
||||
|
||||
|
||||
;; SNMPv1 MIB Editing Mode.
|
||||
|
|
|
@ -1116,7 +1116,7 @@ If you use ada-xref.el:
|
|||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
|
||||
|
||||
;; Set the paragraph delimiters so that one can select a whole block
|
||||
;; simply with M-h
|
||||
|
|
|
@ -2529,53 +2529,6 @@ ANTLR's syntax and influences the auto indentation, see
|
|||
(set (car settings) (eval (cadr settings)))))
|
||||
(setq settings (cddr settings)))))
|
||||
|
||||
(defun antlr-c-common-init ()
|
||||
"Like `c-basic-common-init' when using cc-mode before v5.30."
|
||||
;; X/Emacs 20 only
|
||||
(make-local-variable 'paragraph-start)
|
||||
(make-local-variable 'paragraph-separate)
|
||||
(make-local-variable 'paragraph-ignore-fill-prefix)
|
||||
(make-local-variable 'require-final-newline)
|
||||
(make-local-variable 'parse-sexp-ignore-comments)
|
||||
(make-local-variable 'comment-start)
|
||||
(make-local-variable 'comment-multi-line)
|
||||
(make-local-variable 'outline-regexp)
|
||||
(make-local-variable 'outline-level)
|
||||
(make-local-variable 'adaptive-fill-regexp)
|
||||
(make-local-variable 'adaptive-fill-mode)
|
||||
(make-local-variable 'imenu-generic-expression) ;set in the mode functions
|
||||
(and (boundp 'comment-line-break-function)
|
||||
(make-local-variable 'comment-line-break-function))
|
||||
;; Emacs 19.30 and beyond only, AFAIK
|
||||
(if (boundp 'fill-paragraph-function)
|
||||
(progn
|
||||
(make-local-variable 'fill-paragraph-function)
|
||||
(setq fill-paragraph-function 'c-fill-paragraph)))
|
||||
;; now set their values
|
||||
(setq paragraph-start (concat page-delimiter "\\|$")
|
||||
paragraph-separate paragraph-start
|
||||
paragraph-ignore-fill-prefix t
|
||||
parse-sexp-ignore-comments t
|
||||
comment-column 32
|
||||
comment-multi-line nil
|
||||
comment-line-break-function 'c-comment-line-break-function
|
||||
adaptive-fill-regexp nil
|
||||
adaptive-fill-mode nil)
|
||||
(c-set-style (or antlr-indent-style "gnu"))
|
||||
(and (boundp 'c-current-comment-prefix) (boundp 'c-comment-prefix-regexp)
|
||||
(setq c-current-comment-prefix
|
||||
(if (listp c-comment-prefix-regexp)
|
||||
(cdr-safe (or (assoc major-mode c-comment-prefix-regexp)
|
||||
(assoc 'other c-comment-prefix-regexp)))
|
||||
c-comment-prefix-regexp)))
|
||||
;; we have to do something special for c-offsets-alist so that the
|
||||
;; buffer local value has its own alist structure.
|
||||
(setq c-offsets-alist (copy-alist c-offsets-alist))
|
||||
;; setup the comment indent variable in a Emacs version portable way
|
||||
;; ignore any byte compiler warnings you might get here
|
||||
(make-local-variable 'comment-indent-function)
|
||||
(setq comment-indent-function 'c-comment-indent))
|
||||
|
||||
(defun antlr-language-option (search)
|
||||
"Find language in `antlr-language-alist' for language option.
|
||||
If SEARCH is non-nil, find element for language option. Otherwise, find
|
||||
|
@ -2643,10 +2596,7 @@ the default language."
|
|||
(funcall init-fn))) ; is a function in v5.29
|
||||
(t ; cc-mode upto 5.28
|
||||
(antlr-c-init-language-vars))) ; do it myself
|
||||
(cond ((fboundp 'c-basic-common-init) ; cc-mode 5.30+
|
||||
(c-basic-common-init antlr-language (or antlr-indent-style "gnu")))
|
||||
(t
|
||||
(antlr-c-common-init)))
|
||||
(c-basic-common-init antlr-language (or antlr-indent-style "gnu"))
|
||||
(make-local-variable 'outline-regexp)
|
||||
(make-local-variable 'outline-level)
|
||||
(make-local-variable 'require-final-newline)
|
||||
|
@ -2654,7 +2604,7 @@ the default language."
|
|||
(make-local-variable 'indent-region-function)
|
||||
(setq outline-regexp "[^#\n\^M]"
|
||||
outline-level 'c-outline-level) ; TODO: define own
|
||||
(setq require-final-newline t)
|
||||
(setq require-final-newline mode-require-final-newline)
|
||||
(setq indent-line-function 'antlr-indent-line
|
||||
indent-region-function nil) ; too lazy
|
||||
(setq comment-start "// "
|
||||
|
|
|
@ -557,7 +557,8 @@ This function does not do any hidden buffer changes."
|
|||
(let ((rfn (assq mode c-require-final-newline)))
|
||||
(when rfn
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline (cdr rfn)))))
|
||||
(and (cdr rfn)
|
||||
(setq require-final-newline mode-require-final-newline)))))
|
||||
|
||||
(defun c-postprocess-file-styles ()
|
||||
"Function that post processes relevant file local variables in CC Mode.
|
||||
|
|
|
@ -839,30 +839,28 @@ space."
|
|||
'((c-mode . t)
|
||||
(c++-mode . t)
|
||||
(objc-mode . t))
|
||||
"*Controls whether a final newline is ensured when the file is saved.
|
||||
The value is an association list that for each language mode specifies
|
||||
the value to give to `require-final-newline' at mode initialization;
|
||||
see that variable for details about the value. If a language isn't
|
||||
present on the association list, CC Mode won't set
|
||||
`require-final-newline' in buffers for that language."
|
||||
"*Controls `require-final-newline' in C-related major modes.
|
||||
The value is an association list specifying, for each specific mode,
|
||||
whether to override `require-final-newline'. If the cdr of the element
|
||||
is non-nil, that means to use `mode-require-final-newline' instead."
|
||||
:type `(set (cons :format "%v"
|
||||
(const :format "C " c-mode)
|
||||
(symbol :format "%v" :value ,require-final-newline))
|
||||
(const t))
|
||||
(cons :format "%v"
|
||||
(const :format "C++ " c++-mode)
|
||||
(symbol :format "%v" :value ,require-final-newline))
|
||||
(const t))
|
||||
(cons :format "%v"
|
||||
(const :format "ObjC " objc-mode)
|
||||
(symbol :format "%v" :value ,require-final-newline))
|
||||
(const t))
|
||||
(cons :format "%v"
|
||||
(const :format "Java " java-mode)
|
||||
(symbol :format "%v" :value ,require-final-newline))
|
||||
(const t))
|
||||
(cons :format "%v"
|
||||
(const :format "IDL " idl-mode)
|
||||
(symbol :format "%v" :value ,require-final-newline))
|
||||
(const t))
|
||||
(cons :format "%v"
|
||||
(const :format "Pike " pike-mode)
|
||||
(symbol :format "%v" :value ,require-final-newline)))
|
||||
(const t)))
|
||||
:group 'c)
|
||||
|
||||
(defcustom c-electric-pound-behavior nil
|
||||
|
|
|
@ -222,7 +222,7 @@ to the action header."
|
|||
;; movement.
|
||||
|
||||
(set (make-local-variable 'parens-require-spaces) nil)
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
|
||||
(set (make-local-variable 'comment-start) "# ")
|
||||
(set (make-local-variable 'comment-start-skip)
|
||||
"\\(\\(?:^\\|[^\\\\\n]\\)\\(?:\\\\\\\\\\)*\\)#+[ \t]*")
|
||||
|
|
|
@ -1463,8 +1463,8 @@ Use this command in a compilation log buffer. Sets the mark at point there."
|
|||
;; If the current buffer is a compilation buffer, return it.
|
||||
;; Otherwise, look for a compilation buffer and signal an error
|
||||
;; if there are none.
|
||||
(defun compilation-find-buffer (&optional other-buffer)
|
||||
(next-error-find-buffer other-buffer 'compilation-buffer-internal-p))
|
||||
(defun compilation-find-buffer (&optional avoid-current)
|
||||
(next-error-find-buffer avoid-current 'compilation-buffer-internal-p))
|
||||
|
||||
;;;###autoload
|
||||
(defun compilation-next-error-function (n &optional reset)
|
||||
|
|
|
@ -1462,7 +1462,7 @@ or as help on variables `cperl-tips', `cperl-problems',
|
|||
(make-local-variable 'indent-line-function)
|
||||
(setq indent-line-function 'cperl-indent-line)
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline t)
|
||||
(setq require-final-newline mode-require-final-newline)
|
||||
(make-local-variable 'comment-start)
|
||||
(setq comment-start "# ")
|
||||
(make-local-variable 'comment-end)
|
||||
|
@ -6026,7 +6026,8 @@ Currently it is tuned to C and Perl syntax."
|
|||
(interactive)
|
||||
(let (found-bad (p (point)))
|
||||
(setq last-nonmenu-event 13) ; To disable popup
|
||||
(beginning-of-buffer)
|
||||
(with-no-warnings ; It is useful to push the mark here.
|
||||
(beginning-of-buffer))
|
||||
(map-y-or-n-p "Insert space here? "
|
||||
(lambda (arg) (insert " "))
|
||||
'cperl-next-bad-style
|
||||
|
@ -7183,13 +7184,9 @@ Delay of auto-help controlled by `cperl-lazy-help-time'."
|
|||
;;; Plug for wrong font-lock:
|
||||
|
||||
(defun cperl-font-lock-unfontify-region-function (beg end)
|
||||
(let* ((modified (buffer-modified-p)) (buffer-undo-list t)
|
||||
(inhibit-read-only t) (inhibit-point-motion-hooks t)
|
||||
before-change-functions after-change-functions
|
||||
deactivate-mark buffer-file-name buffer-file-truename)
|
||||
(remove-text-properties beg end '(face nil))
|
||||
(when (and (not modified) (buffer-modified-p))
|
||||
(set-buffer-modified-p nil))))
|
||||
;; Simplified now that font-lock-unfontify-region uses save-buffer-state.
|
||||
(let (before-change-functions after-change-functions)
|
||||
(remove-text-properties beg end '(face nil))))
|
||||
|
||||
(defvar cperl-d-l nil)
|
||||
(defun cperl-fontify-syntaxically (end)
|
||||
|
|
|
@ -818,7 +818,7 @@ with no args, if that value is non-nil."
|
|||
(use-local-map f90-mode-map)
|
||||
(set (make-local-variable 'indent-line-function) 'f90-indent-line)
|
||||
(set (make-local-variable 'indent-region-function) 'f90-indent-region)
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
|
||||
(set (make-local-variable 'comment-start) "!")
|
||||
(set (make-local-variable 'comment-start-skip) "!+ *")
|
||||
(set (make-local-variable 'comment-indent-function) 'f90-comment-indent)
|
||||
|
|
|
@ -674,7 +674,7 @@ with no args, if that value is non-nil."
|
|||
(let (fortran-blink-matching-if ; avoid blinking delay
|
||||
indent-region-function)
|
||||
(indent-region start end nil))))
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
|
||||
;; The syntax tables don't understand the column-0 comment-markers.
|
||||
(set (make-local-variable 'comment-use-syntax) nil)
|
||||
(set (make-local-variable 'comment-padding) "$$$")
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Thien-Thi Nguyen <ttn@gnu.org>
|
||||
;; Dan Nicolaescu <dann@ics.uci.edu>
|
||||
;; Keywords: C C++ java lisp tools editing comments blocks hiding outlines
|
||||
;; Maintainer-Version: 5.39.2.8
|
||||
;; Maintainer-Version: 5.58.2.3
|
||||
;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -138,6 +138,19 @@
|
|||
;; If you have an entry that works particularly well, consider
|
||||
;; submitting it for inclusion in hideshow.el. See docstring for
|
||||
;; `hs-special-modes-alist' for more info on the entry format.
|
||||
;;
|
||||
;; See also variable `hs-set-up-overlay' for per-block customization of
|
||||
;; appearance or other effects associated with overlays. For example:
|
||||
;;
|
||||
;; (setq hs-set-up-overlay
|
||||
;; (defun my-display-code-line-counts (ov)
|
||||
;; (when (eq 'code (overlay-get ov 'hs))
|
||||
;; (overlay-put ov 'display
|
||||
;; (propertize
|
||||
;; (format " ... <%d>"
|
||||
;; (count-lines (overlay-start ov)
|
||||
;; (overlay-end ov)))
|
||||
;; 'face 'font-lock-type-face)))))
|
||||
|
||||
;; * Bugs
|
||||
;;
|
||||
|
@ -304,6 +317,24 @@ a block), `hs-hide-all', `hs-hide-block' and `hs-hide-level'.")
|
|||
These commands include the toggling commands (when the result is to show
|
||||
a block), `hs-show-all' and `hs-show-block'..")
|
||||
|
||||
(defvar hs-set-up-overlay nil
|
||||
"*Function called with one arg, OV, a newly initialized overlay.
|
||||
Hideshow puts a unique overlay on each range of text to be hidden
|
||||
in the buffer. Here is a simple example of how to use this variable:
|
||||
|
||||
(defun display-code-line-counts (ov)
|
||||
(when (eq 'code (overlay-get ov 'hs))
|
||||
(overlay-put ov 'display
|
||||
(format \"... / %d\"
|
||||
(count-lines (overlay-start ov)
|
||||
(overlay-end ov))))))
|
||||
|
||||
(setq hs-set-up-overlay 'display-code-line-counts)
|
||||
|
||||
This example shows how to get information from the overlay as well
|
||||
as how to set its `display' property. See `hs-make-overlay' and
|
||||
info node `(elisp)Overlays'.")
|
||||
|
||||
;;---------------------------------------------------------------------------
|
||||
;; internal variables
|
||||
|
||||
|
@ -388,6 +419,35 @@ Note that `mode-line-format' is buffer-local.")
|
|||
(when (overlay-get ov 'hs)
|
||||
(delete-overlay ov))))
|
||||
|
||||
(defun hs-make-overlay (b e kind &optional b-offset e-offset)
|
||||
"Return a new overlay in region defined by B and E with type KIND.
|
||||
KIND is either `code' or `comment'. Optional fourth arg B-OFFSET
|
||||
when added to B specifies the actual buffer position where the block
|
||||
begins. Likewise for optional fifth arg E-OFFSET. If unspecified
|
||||
they are taken to be 0 (zero). The following properties are set
|
||||
in the overlay: 'invisible 'hs 'hs-b-offset 'hs-e-offset. Also,
|
||||
depending on variable `hs-isearch-open', the following properties may
|
||||
be present: 'isearch-open-invisible 'isearch-open-invisible-temporary.
|
||||
If variable `hs-set-up-overlay' is non-nil it should specify a function
|
||||
to call with the newly initialized overlay."
|
||||
(unless b-offset (setq b-offset 0))
|
||||
(unless e-offset (setq e-offset 0))
|
||||
(let ((ov (make-overlay b e))
|
||||
(io (if (eq 'block hs-isearch-open)
|
||||
;; backward compatibility -- `block'<=>`code'
|
||||
'code
|
||||
hs-isearch-open)))
|
||||
(overlay-put ov 'invisible 'hs)
|
||||
(overlay-put ov 'hs kind)
|
||||
(overlay-put ov 'hs-b-offset b-offset)
|
||||
(overlay-put ov 'hs-e-offset e-offset)
|
||||
(when (or (eq io t) (eq io kind))
|
||||
(overlay-put ov 'isearch-open-invisible 'hs-isearch-show)
|
||||
(overlay-put ov 'isearch-open-invisible-temporary
|
||||
'hs-isearch-show-temporary))
|
||||
(when hs-set-up-overlay (funcall hs-set-up-overlay ov))
|
||||
ov))
|
||||
|
||||
(defun hs-isearch-show (ov)
|
||||
"Delete overlay OV, and set `hs-headline' to nil.
|
||||
|
||||
|
@ -416,32 +476,17 @@ property of an overlay."
|
|||
(point))
|
||||
start)))))
|
||||
(force-mode-line-update)
|
||||
;; handle `display' property specially
|
||||
(let (value)
|
||||
(if hide-p
|
||||
(when (setq value (overlay-get ov 'hs-isearch-display))
|
||||
(overlay-put ov 'display value)
|
||||
(overlay-put ov 'hs-isearch-display nil))
|
||||
(when (setq value (overlay-get ov 'display))
|
||||
(overlay-put ov 'hs-isearch-display value)
|
||||
(overlay-put ov 'display nil))))
|
||||
(overlay-put ov 'invisible (and hide-p 'hs)))
|
||||
|
||||
(defun hs-flag-region (from to flag)
|
||||
"Hide or show lines from FROM to TO, according to FLAG.
|
||||
If FLAG is nil then text is shown, while if FLAG is non-nil the text is
|
||||
hidden. FLAG must be one of the symbols `code' or `comment', depending
|
||||
on what kind of block is to be hidden."
|
||||
(save-excursion
|
||||
;; first clear it all out
|
||||
(hs-discard-overlays from to)
|
||||
;; now create overlays if needed
|
||||
(when flag
|
||||
(let ((overlay (make-overlay from to)))
|
||||
(overlay-put overlay 'invisible 'hs)
|
||||
(overlay-put overlay 'hs flag)
|
||||
(when (or (eq hs-isearch-open t)
|
||||
(eq hs-isearch-open flag)
|
||||
;; deprecated backward compatibility -- `block'<=>`code'
|
||||
(and (eq 'block hs-isearch-open)
|
||||
(eq 'code flag)))
|
||||
(overlay-put overlay 'isearch-open-invisible 'hs-isearch-show)
|
||||
(overlay-put overlay
|
||||
'isearch-open-invisible-temporary
|
||||
'hs-isearch-show-temporary))
|
||||
overlay))))
|
||||
|
||||
(defun hs-forward-sexp (match-data arg)
|
||||
"Adjust point based on MATCH-DATA and call `hs-forward-sexp-func' w/ ARG.
|
||||
Original match data is restored upon return."
|
||||
|
@ -453,9 +498,10 @@ Original match data is restored upon return."
|
|||
(defun hs-hide-comment-region (beg end &optional repos-end)
|
||||
"Hide a region from BEG to END, marking it as a comment.
|
||||
Optional arg REPOS-END means reposition at end."
|
||||
(hs-flag-region (progn (goto-char beg) (end-of-line) (point))
|
||||
(progn (goto-char end) (end-of-line) (point))
|
||||
'comment)
|
||||
(let ((beg-eol (progn (goto-char beg) (end-of-line) (point)))
|
||||
(end-eol (progn (goto-char end) (end-of-line) (point))))
|
||||
(hs-discard-overlays beg-eol end-eol)
|
||||
(hs-make-overlay beg-eol end-eol 'comment beg end))
|
||||
(goto-char (if repos-end end beg)))
|
||||
|
||||
(defun hs-hide-block-at-point (&optional end comment-reg)
|
||||
|
@ -488,9 +534,8 @@ and then further adjusted to be at the end of the line."
|
|||
(end-of-line)
|
||||
(point))))
|
||||
(when (and (< p (point)) (> (count-lines p q) 1))
|
||||
(overlay-put (hs-flag-region p q 'code)
|
||||
'hs-ofs
|
||||
(- pure-p p)))
|
||||
(hs-discard-overlays p q)
|
||||
(hs-make-overlay p q 'code (- pure-p p)))
|
||||
(goto-char (if end q (min p pure-p)))))))
|
||||
|
||||
(defun hs-safety-is-job-n ()
|
||||
|
@ -612,7 +657,7 @@ Return point, or nil if original point was not in a block."
|
|||
(setq minp (1+ (point)))
|
||||
(funcall hs-forward-sexp-func 1)
|
||||
(setq maxp (1- (point))))
|
||||
(hs-flag-region minp maxp nil) ; eliminate weirdness
|
||||
(hs-discard-overlays minp maxp) ; eliminate weirdness
|
||||
(goto-char minp)
|
||||
(while (progn
|
||||
(forward-comment (buffer-size))
|
||||
|
@ -678,7 +723,7 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
|
|||
(hs-life-goes-on
|
||||
(message "Hiding all blocks ...")
|
||||
(save-excursion
|
||||
(hs-flag-region (point-min) (point-max) nil) ; eliminate weirdness
|
||||
(hs-discard-overlays (point-min) (point-max)) ; eliminate weirdness
|
||||
(goto-char (point-min))
|
||||
(let ((count 0)
|
||||
(re (concat "\\("
|
||||
|
@ -717,7 +762,7 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
|
|||
(interactive)
|
||||
(hs-life-goes-on
|
||||
(message "Showing all blocks ...")
|
||||
(hs-flag-region (point-min) (point-max) nil)
|
||||
(hs-discard-overlays (point-min) (point-max))
|
||||
(message "Showing all blocks ... done")
|
||||
(run-hooks 'hs-show-hook)))
|
||||
|
||||
|
@ -755,7 +800,7 @@ See documentation for functions `hs-hide-block' and `run-hooks'."
|
|||
(goto-char
|
||||
(cond (end (overlay-end ov))
|
||||
((eq 'comment (overlay-get ov 'hs)) here)
|
||||
(t (+ (overlay-start ov) (overlay-get ov 'hs-ofs)))))
|
||||
(t (+ (overlay-start ov) (overlay-get ov 'hs-b-offset)))))
|
||||
(delete-overlay ov)
|
||||
(throw 'eol-begins-hidden-region-p t)))
|
||||
nil))
|
||||
|
@ -771,7 +816,7 @@ See documentation for functions `hs-hide-block' and `run-hooks'."
|
|||
(setq p (point)
|
||||
q (progn (hs-forward-sexp (hs-match-data t) 1) (point)))))
|
||||
(when (and p q)
|
||||
(hs-flag-region p q nil)
|
||||
(hs-discard-overlays p q)
|
||||
(goto-char (if end q (1+ p)))))
|
||||
(hs-safety-is-job-n)
|
||||
(run-hooks 'hs-show-hook))))
|
||||
|
|
|
@ -177,7 +177,7 @@ with no args, if that value is non-nil."
|
|||
(make-local-variable 'indent-line-function)
|
||||
(setq indent-line-function 'icon-indent-line)
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline t)
|
||||
(setq require-final-newline mode-require-final-newline)
|
||||
(make-local-variable 'comment-start)
|
||||
(setq comment-start "# ")
|
||||
(make-local-variable 'comment-end)
|
||||
|
|
|
@ -1892,7 +1892,7 @@ The main features of this mode are
|
|||
|
||||
(set (make-local-variable 'comment-start-skip) ";+[ \t]*")
|
||||
(set (make-local-variable 'comment-start) ";")
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
|
||||
(set (make-local-variable 'abbrev-all-caps) t)
|
||||
(set (make-local-variable 'indent-tabs-mode) nil)
|
||||
(set (make-local-variable 'completion-ignore-case) t)
|
||||
|
|
|
@ -1303,8 +1303,9 @@ The converted character representation is stored in rAX."
|
|||
(set (make-local-variable 'compile-command) (concat "mixasm -g "
|
||||
buffer-file-name))
|
||||
;; mixasm will do strange when there is no final newline,
|
||||
;; let emacs ensure that it is always there
|
||||
(set (make-local-variable 'require-final-newline) t))
|
||||
;; so let Emacs ensure that it is always there
|
||||
(set (make-local-variable 'require-final-newline)
|
||||
mode-require-final-newline))
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.mixal\\'" . mixal-mode))
|
||||
|
|
|
@ -151,7 +151,7 @@ followed by the first character of the construct.
|
|||
; (make-local-variable 'indent-line-function)
|
||||
; (setq indent-line-function 'c-indent-line)
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline t)
|
||||
(setq require-final-newline mode-require-final-newline)
|
||||
(make-local-variable 'comment-start)
|
||||
(setq comment-start "(* ")
|
||||
(make-local-variable 'comment-end)
|
||||
|
|
|
@ -476,7 +476,7 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'."
|
|||
(make-local-variable 'indent-line-function)
|
||||
(setq indent-line-function 'perl-indent-line)
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline t)
|
||||
(setq require-final-newline mode-require-final-newline)
|
||||
(make-local-variable 'comment-start)
|
||||
(setq comment-start "# ")
|
||||
(make-local-variable 'comment-end)
|
||||
|
|
|
@ -1712,7 +1712,7 @@ lines count as headers.
|
|||
(set (make-local-variable 'indent-line-function) #'python-indent-line)
|
||||
(set (make-local-variable 'paragraph-start) "\\s-*$")
|
||||
(set (make-local-variable 'fill-paragraph-function) 'python-fill-paragraph)
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
|
||||
(set (make-local-variable 'add-log-current-defun-function)
|
||||
#'python-current-defun)
|
||||
;; Fixme: Generalize to do all blocks?
|
||||
|
|
|
@ -495,10 +495,9 @@ This is buffer-local in every such buffer.")
|
|||
|
||||
(defcustom sh-require-final-newline
|
||||
'((csh . t)
|
||||
(pdksh . t)
|
||||
(rc . require-final-newline)
|
||||
(sh . require-final-newline))
|
||||
(pdksh . t))
|
||||
"*Value of `require-final-newline' in Shell-Script mode buffers.
|
||||
\(SHELL . t) means use the value of `mode-require-final-newline' for SHELL.
|
||||
See `sh-feature'."
|
||||
:type '(repeat (cons (symbol :tag "Shell")
|
||||
(choice (const :tag "require" t)
|
||||
|
@ -1485,8 +1484,8 @@ Calls the value of `sh-set-shell-hook' if set."
|
|||
(executable-set-magic shell (sh-feature sh-shell-arg)
|
||||
no-query-flag insert-flag)))
|
||||
(let ((tem (sh-feature sh-require-final-newline)))
|
||||
(unless (eq tem 'require-final-newline)
|
||||
(setq require-final-newline tem)))
|
||||
(if (eq tem t)
|
||||
(setq require-final-newline mode-require-final-newline)))
|
||||
(setq
|
||||
comment-start-skip "#+[\t ]*"
|
||||
local-abbrev-table sh-mode-abbrev-table
|
||||
|
|
|
@ -380,7 +380,7 @@ with no arguments, if that value is non-nil."
|
|||
(make-local-variable 'indent-line-function)
|
||||
(setq indent-line-function 'simula-indent-line)
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline t)
|
||||
(setq require-final-newline mode-require-final-newline)
|
||||
(make-local-variable 'comment-start)
|
||||
(setq comment-start "! ")
|
||||
(make-local-variable 'comment-end)
|
||||
|
|
|
@ -4557,7 +4557,8 @@ Key bindings:
|
|||
"\\s-*\\(--+\\s-*$\\|[^ -]\\|$\\)")
|
||||
(set (make-local-variable 'paragraph-separate) paragraph-start)
|
||||
(set (make-local-variable 'paragraph-ignore-fill-prefix) t)
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline)
|
||||
mode-require-final-newline)
|
||||
(set (make-local-variable 'parse-sexp-ignore-comments) t)
|
||||
(set (make-local-variable 'indent-line-function) 'vhdl-indent-line)
|
||||
(set (make-local-variable 'comment-start) "--")
|
||||
|
|
|
@ -346,7 +346,8 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"."
|
|||
;; Suppress the error rose when the pipe to PROC is closed.
|
||||
(condition-case err
|
||||
(process-send-region proc (point-min) (point-max))
|
||||
(file-error nil))
|
||||
(file-error nil)
|
||||
(error nil))
|
||||
))))
|
||||
;; ARG is a file name.
|
||||
;; Collapse multiple slashes to single slashes.
|
||||
|
|
162
lisp/simple.el
162
lisp/simple.el
|
@ -124,70 +124,87 @@ to navigate in it.")
|
|||
(make-variable-buffer-local 'next-error-function)
|
||||
|
||||
(defsubst next-error-buffer-p (buffer
|
||||
&optional
|
||||
&optional avoid-current
|
||||
extra-test-inclusive
|
||||
extra-test-exclusive)
|
||||
"Test if BUFFER is a next-error capable buffer.
|
||||
EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
|
||||
EXTRA-TEST-EXCLUSIVE is called to disallow buffers."
|
||||
(with-current-buffer buffer
|
||||
(or (and extra-test-inclusive (funcall extra-test-inclusive))
|
||||
(and (if extra-test-exclusive (funcall extra-test-exclusive) t)
|
||||
next-error-function))))
|
||||
|
||||
(defun next-error-find-buffer (&optional other-buffer
|
||||
If AVOID-CURRENT is non-nil, treat the current buffer
|
||||
as an absolute last resort only.
|
||||
|
||||
The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer
|
||||
that normally would not qualify. If it returns t, the buffer
|
||||
in question is treated as usable.
|
||||
|
||||
The function EXTRA-TEST-EXCLUSIVE, if non-nil is called in each buffer
|
||||
that would normally be considered usable. if it returns nil,
|
||||
that buffer is rejected."
|
||||
(and (buffer-name buffer) ;First make sure it's live.
|
||||
(not (and avoid-current (eq buffer (current-buffer))))
|
||||
(with-current-buffer buffer
|
||||
(if next-error-function ; This is the normal test.
|
||||
;; Optionally reject some buffers.
|
||||
(if extra-test-exclusive
|
||||
(funcall extra-test-exclusive)
|
||||
t)
|
||||
;; Optionally accept some other buffers.
|
||||
(and extra-test-inclusive
|
||||
(funcall extra-test-inclusive))))))
|
||||
|
||||
(defun next-error-find-buffer (&optional avoid-current
|
||||
extra-test-inclusive
|
||||
extra-test-exclusive)
|
||||
"Return a next-error capable buffer.
|
||||
OTHER-BUFFER will disallow the current buffer.
|
||||
EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
|
||||
EXTRA-TEST-EXCLUSIVE is called to disallow buffers."
|
||||
If AVOID-CURRENT is non-nil, treat the current buffer
|
||||
as an absolute last resort only.
|
||||
|
||||
The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffers
|
||||
that normally would not qualify. If it returns t, the buffer
|
||||
in question is treated as usable.
|
||||
|
||||
The function EXTRA-TEST-EXCLUSIVE, if non-nil is called in each buffer
|
||||
that would normally be considered usable. If it returns nil,
|
||||
that buffer is rejected."
|
||||
(or
|
||||
;; 1. If one window on the selected frame displays such buffer, return it.
|
||||
(let ((window-buffers
|
||||
(delete-dups
|
||||
(delq nil (mapcar (lambda (w)
|
||||
(if (next-error-buffer-p
|
||||
(window-buffer w)
|
||||
(window-buffer w)
|
||||
avoid-current
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(window-buffer w)))
|
||||
(window-list))))))
|
||||
(if other-buffer
|
||||
(setq window-buffers (delq (current-buffer) window-buffers)))
|
||||
(if (eq (length window-buffers) 1)
|
||||
(car window-buffers)))
|
||||
;; 2. If next-error-last-buffer is set to a live buffer, use that.
|
||||
;; 2. If next-error-last-buffer is an acceptable buffer, use that.
|
||||
(if (and next-error-last-buffer
|
||||
(buffer-name next-error-last-buffer)
|
||||
(next-error-buffer-p next-error-last-buffer
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(or (not other-buffer)
|
||||
(not (eq next-error-last-buffer (current-buffer)))))
|
||||
next-error-last-buffer)
|
||||
;; 3. If the current buffer is a next-error capable buffer, return it.
|
||||
(if (and (not other-buffer)
|
||||
(next-error-buffer-p (current-buffer)
|
||||
(next-error-buffer-p next-error-last-buffer avoid-current
|
||||
extra-test-inclusive extra-test-exclusive))
|
||||
next-error-last-buffer)
|
||||
;; 3. If the current buffer is acceptable, choose it.
|
||||
(if (next-error-buffer-p (current-buffer) avoid-current
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(current-buffer))
|
||||
;; 4. Look for a next-error capable buffer in a buffer list.
|
||||
;; 4. Look for any acceptable buffer.
|
||||
(let ((buffers (buffer-list)))
|
||||
(while (and buffers
|
||||
(or (not (next-error-buffer-p
|
||||
(car buffers)
|
||||
extra-test-inclusive extra-test-exclusive))
|
||||
(and other-buffer (eq (car buffers) (current-buffer)))))
|
||||
(not (next-error-buffer-p
|
||||
(car buffers) avoid-current
|
||||
extra-test-inclusive extra-test-exclusive)))
|
||||
(setq buffers (cdr buffers)))
|
||||
(if buffers
|
||||
(car buffers)
|
||||
(or (and other-buffer
|
||||
(next-error-buffer-p (current-buffer)
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
;; The current buffer is a next-error capable buffer.
|
||||
(progn
|
||||
(if other-buffer
|
||||
(message "This is the only next-error capable buffer"))
|
||||
(current-buffer)))
|
||||
(error "No next-error capable buffer found"))))))
|
||||
(car buffers))
|
||||
;; 5. Use the current buffer as a last resort if it qualifies,
|
||||
;; even despite AVOID-CURRENT.
|
||||
(and avoid-current
|
||||
(next-error-buffer-p (current-buffer) nil
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(progn
|
||||
(message "This is the only next-error capable buffer")
|
||||
(current-buffer)))
|
||||
;; 6. Give up.
|
||||
(error "No next-error capable buffer found")))
|
||||
|
||||
(defun next-error (&optional arg reset)
|
||||
"Visit next next-error message and corresponding source code.
|
||||
|
@ -1113,11 +1130,13 @@ makes the search case-sensitive."
|
|||
nil
|
||||
minibuffer-local-map
|
||||
nil
|
||||
'minibuffer-history-search-history)))
|
||||
'minibuffer-history-search-history
|
||||
(car minibuffer-history-search-history))))
|
||||
;; Use the last regexp specified, by default, if input is empty.
|
||||
(list (if (string= regexp "")
|
||||
(setcar minibuffer-history-search-history
|
||||
(nth 1 minibuffer-history-search-history))
|
||||
(if minibuffer-history-search-history
|
||||
(car minibuffer-history-search-history)
|
||||
(error "No previous history search regexp"))
|
||||
regexp)
|
||||
(prefix-numeric-value current-prefix-arg))))
|
||||
(previous-matching-history-element regexp (- n)))
|
||||
|
@ -1237,7 +1256,15 @@ as an argument limits undo to changes within the current region."
|
|||
;; So set `this-command' to something other than `undo'.
|
||||
(setq this-command 'undo-start)
|
||||
|
||||
(unless (eq last-command 'undo)
|
||||
(unless (and (eq last-command 'undo)
|
||||
;; If something (a timer or filter?) changed the buffer
|
||||
;; since the previous command, don't continue the undo seq.
|
||||
(let ((list buffer-undo-list))
|
||||
(while (eq (car list) nil)
|
||||
(setq list (cdr list)))
|
||||
;; If the last undo record made was made by undo
|
||||
;; it shows nothing else happened in between.
|
||||
(gethash list undo-equiv-table)))
|
||||
(setq undo-in-region
|
||||
(if transient-mark-mode mark-active (and arg (not (numberp arg)))))
|
||||
(if undo-in-region
|
||||
|
@ -1289,10 +1316,18 @@ as an argument limits undo to changes within the current region."
|
|||
(setq tail (cdr tail)))
|
||||
(setq tail nil)))
|
||||
(setq prev tail tail (cdr tail))))
|
||||
|
||||
;; Record what the current undo list says,
|
||||
;; so the next command can tell if the buffer was modified in between.
|
||||
(and modified (not (buffer-modified-p))
|
||||
(delete-auto-save-file-if-necessary recent-save))))
|
||||
|
||||
(defun buffer-disable-undo (&optional buffer)
|
||||
"Make BUFFER stop keeping undo information.
|
||||
No argument or nil as argument means do this for the current buffer."
|
||||
(interactive)
|
||||
(with-current-buffer (if buffer (get-buffer buffer) (current-buffer))
|
||||
(setq buffer-undo-list t)))
|
||||
|
||||
(defun undo-only (&optional arg)
|
||||
"Undo some previous changes.
|
||||
Repeat this command to undo more changes.
|
||||
|
@ -1485,16 +1520,33 @@ is not *inside* the region START...END."
|
|||
'(0 . 0)))
|
||||
'(0 . 0)))
|
||||
|
||||
(defvar undo-extra-outer-limit nil
|
||||
"If non-nil, an extra level of size that's ok in an undo item.
|
||||
We don't ask the user about truncating the undo list until the
|
||||
current item gets bigger than this amount.")
|
||||
(make-variable-buffer-local 'undo-extra-outer-limit)
|
||||
|
||||
;; When the first undo batch in an undo list is longer than undo-outer-limit,
|
||||
;; this function gets called to ask the user what to do.
|
||||
;; Garbage collection is inhibited around the call,
|
||||
;; so it had better not do a lot of consing.
|
||||
(setq undo-outer-limit-function 'undo-outer-limit-truncate)
|
||||
(defun undo-outer-limit-truncate (size)
|
||||
(if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
|
||||
(buffer-name) size))
|
||||
(progn (setq buffer-undo-list nil) t)
|
||||
nil))
|
||||
(when (or (null undo-extra-outer-limit)
|
||||
(> size undo-extra-outer-limit))
|
||||
;; Don't ask the question again unless it gets even bigger.
|
||||
;; This applies, in particular, if the user quits from the question.
|
||||
;; Such a quit quits out of GC, but something else will call GC
|
||||
;; again momentarily. It will call this function again,
|
||||
;; but we don't want to ask the question again.
|
||||
(setq undo-extra-outer-limit (+ size 50000))
|
||||
(if (let (use-dialog-box)
|
||||
(yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
|
||||
(buffer-name) size)))
|
||||
(progn (setq buffer-undo-list nil)
|
||||
(setq undo-extra-outer-limit nil)
|
||||
t)
|
||||
nil)))
|
||||
|
||||
(defvar shell-command-history nil
|
||||
"History list for some commands that read shell commands.")
|
||||
|
@ -3533,15 +3585,17 @@ With argument, do this that many times."
|
|||
(interactive "p")
|
||||
(forward-word (- (or arg 1))))
|
||||
|
||||
(defun mark-word (&optional arg)
|
||||
(defun mark-word (&optional arg allow-extend)
|
||||
"Set mark ARG words away from point.
|
||||
The place mark goes is the same place \\[forward-word] would
|
||||
move to with the same argument.
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
Interactively, if this command is repeated
|
||||
or (in Transient Mark mode) if the mark is active,
|
||||
it marks the next ARG words after the ones already marked."
|
||||
(interactive "P")
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
(interactive "P\np")
|
||||
(cond ((and allow-extend
|
||||
(or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active)))
|
||||
(setq arg (if arg (prefix-numeric-value arg)
|
||||
(if (< (mark) (point)) -1 1)))
|
||||
(set-mark
|
||||
|
|
|
@ -229,9 +229,17 @@ Put them in `default.el' instead, so that users can more easily
|
|||
override them. Users can prevent loading `default.el' with the `-q'
|
||||
option or by setting `inhibit-default-init' in their own init files,
|
||||
but inhibiting `site-start.el' requires `--no-site-file', which
|
||||
is less convenient."
|
||||
is less convenient.
|
||||
|
||||
This variable is defined for customization so as to make
|
||||
it visible in the relevant context. However, actually customizing it
|
||||
is not allowed, since it would not work anyway. The only way to set
|
||||
this variable usefully is to set it during while building and dumping Emacs."
|
||||
:type '(choice (const :tag "none" nil) string)
|
||||
:group 'initialization)
|
||||
:group 'initialization
|
||||
:initialize 'custom-initialize-default
|
||||
:set '(lambda (variable value)
|
||||
(error "Customizing `site-run-file' does not work")))
|
||||
|
||||
(defcustom mail-host-address nil
|
||||
"*Name of this machine, for purposes of naming users."
|
||||
|
|
32
lisp/subr.el
32
lisp/subr.el
|
@ -823,7 +823,7 @@ is converted into a string by expressing it in decimal."
|
|||
(defalias 'unfocus-frame 'ignore "")
|
||||
|
||||
|
||||
;;;; Obsolescence declarations for variables.
|
||||
;;;; Obsolescence declarations for variables, and aliases.
|
||||
|
||||
(make-obsolete-variable 'directory-sep-char "do not use it." "21.1")
|
||||
(make-obsolete-variable 'mode-line-inverse-video "use the appropriate faces instead." "21.1")
|
||||
|
@ -840,6 +840,8 @@ is converted into a string by expressing it in decimal."
|
|||
(make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4")
|
||||
(defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)
|
||||
(make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4")
|
||||
|
||||
(defvaralias 'messages-buffer-max-lines 'message-log-max)
|
||||
|
||||
;;;; Alternate names for functions - these are not being phased out.
|
||||
|
||||
|
@ -1012,19 +1014,33 @@ other hooks, such as major mode hooks, can do the job."
|
|||
;;; nil nil t)
|
||||
;;; (setq symbol-file-load-history-loaded t)))
|
||||
|
||||
(defun symbol-file (function)
|
||||
"Return the input source from which FUNCTION was loaded.
|
||||
(defun symbol-file (symbol &optional type)
|
||||
"Return the input source in which SYMBOL was defined.
|
||||
The value is normally a string that was passed to `load':
|
||||
either an absolute file name, or a library name
|
||||
\(with no directory name and no `.el' or `.elc' at the end).
|
||||
It can also be nil, if the definition is not associated with any file."
|
||||
(if (and (symbolp function) (fboundp function)
|
||||
(eq 'autoload (car-safe (symbol-function function))))
|
||||
(nth 1 (symbol-function function))
|
||||
It can also be nil, if the definition is not associated with any file.
|
||||
|
||||
If TYPE is nil, then any kind of definition is acceptable.
|
||||
If TYPE is `defun' or `defvar', that specifies function
|
||||
definition only or variable definition only."
|
||||
(if (and (or (null type) (eq type 'defun))
|
||||
(symbolp symbol) (fboundp symbol)
|
||||
(eq 'autoload (car-safe (symbol-function symbol))))
|
||||
(nth 1 (symbol-function symbol))
|
||||
(let ((files load-history)
|
||||
file)
|
||||
(while files
|
||||
(if (member function (cdr (car files)))
|
||||
(if (if type
|
||||
(if (eq type 'defvar)
|
||||
;; Variables are present just as their names.
|
||||
(member symbol (cdr (car files)))
|
||||
;; Other types are represented as (TYPE . NAME).
|
||||
(member (cons type symbol) (cdr (car files))))
|
||||
;; We accept all types, so look for variable def
|
||||
;; and then for any other kind.
|
||||
(or (member symbol (cdr (car files)))
|
||||
(rassq symbol (cdr (car files)))))
|
||||
(setq file (car (car files)) files nil))
|
||||
(setq files (cdr files)))
|
||||
file)))
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
;;; mac-win.el --- support for "Macintosh windows"
|
||||
;;; mac-win.el --- parse switches controlling interface with Mac window system
|
||||
|
||||
;; Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Andrew Choi <akochoi@mac.com>
|
||||
;; Keywords: terminals
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -23,243 +24,212 @@
|
|||
|
||||
;;; Commentary:
|
||||
|
||||
;; Mac-win.el: this file is loaded from ../lisp/startup.el when it recognizes
|
||||
;; that Mac windows are to be used. Command line switches are parsed and those
|
||||
;; pertaining to Mac are processed and removed from the command line. The
|
||||
;; Mac display is opened and hooks are set for popping up the initial window.
|
||||
|
||||
;; startup.el will then examine startup files, and eventually call the hooks
|
||||
;; which create the first window(s).
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; These are the standard X switches from the Xt Initialize.c file of
|
||||
;; Release 4.
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
;; We want to delay setting frame parameters until the faces are setup
|
||||
;; Command line Resource Manager string
|
||||
|
||||
;; Mac can't handle ~ prefix in file names
|
||||
;(setq auto-save-list-file-prefix ".saves-")
|
||||
;; +rv *reverseVideo
|
||||
;; +synchronous *synchronous
|
||||
;; -background *background
|
||||
;; -bd *borderColor
|
||||
;; -bg *background
|
||||
;; -bordercolor *borderColor
|
||||
;; -borderwidth .borderWidth
|
||||
;; -bw .borderWidth
|
||||
;; -display .display
|
||||
;; -fg *foreground
|
||||
;; -fn *font
|
||||
;; -font *font
|
||||
;; -foreground *foreground
|
||||
;; -geometry .geometry
|
||||
;; -i .iconType
|
||||
;; -itype .iconType
|
||||
;; -iconic .iconic
|
||||
;; -name .name
|
||||
;; -reverse *reverseVideo
|
||||
;; -rv *reverseVideo
|
||||
;; -selectionTimeout .selectionTimeout
|
||||
;; -synchronous *synchronous
|
||||
;; -xrm
|
||||
|
||||
(setq frame-creation-function 'x-create-frame-with-faces)
|
||||
;; An alist of X options and the function which handles them. See
|
||||
;; ../startup.el.
|
||||
|
||||
;; for debugging
|
||||
;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event))
|
||||
|
||||
;;(global-set-key [vertical-scroll-bar mouse-1] 'mac-handle-scroll-bar-event)
|
||||
|
||||
(global-set-key
|
||||
[vertical-scroll-bar down-mouse-1]
|
||||
'mac-handle-scroll-bar-event)
|
||||
|
||||
(global-unset-key [vertical-scroll-bar drag-mouse-1])
|
||||
(global-unset-key [vertical-scroll-bar mouse-1])
|
||||
(if (not (eq window-system 'mac))
|
||||
(error "%s: Loading mac-win.el but not compiled for Mac" (invocation-name)))
|
||||
|
||||
(require 'frame)
|
||||
(require 'mouse)
|
||||
(require 'scroll-bar)
|
||||
(require 'faces)
|
||||
;;(require 'select)
|
||||
(require 'menu-bar)
|
||||
(require 'fontset)
|
||||
(require 'x-dnd)
|
||||
|
||||
(defun mac-handle-scroll-bar-event (event)
|
||||
"Handle scroll bar EVENT to emulate Mac Toolbox style scrolling."
|
||||
(interactive "e")
|
||||
(let* ((position (event-start event))
|
||||
(window (nth 0 position))
|
||||
(bar-part (nth 4 position)))
|
||||
(select-window window)
|
||||
(cond
|
||||
((eq bar-part 'up)
|
||||
(goto-char (window-start window))
|
||||
(mac-scroll-down-line))
|
||||
((eq bar-part 'above-handle)
|
||||
(mac-scroll-down))
|
||||
((eq bar-part 'handle)
|
||||
(scroll-bar-drag event))
|
||||
((eq bar-part 'below-handle)
|
||||
(mac-scroll-up))
|
||||
((eq bar-part 'down)
|
||||
(goto-char (window-start window))
|
||||
(mac-scroll-up-line)))))
|
||||
(defvar x-invocation-args)
|
||||
|
||||
(defun mac-scroll-ignore-events ()
|
||||
;; Ignore confusing non-mouse events
|
||||
(while (not (memq (car-safe (read-event))
|
||||
'(mouse-1 double-mouse-1 triple-mouse-1))) nil))
|
||||
(defvar x-command-line-resources nil)
|
||||
|
||||
(defun mac-scroll-down ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-down)))
|
||||
;; Handler for switches of the form "-switch value" or "-switch".
|
||||
(defun x-handle-switch (switch)
|
||||
(let ((aelt (assoc switch command-line-x-option-alist)))
|
||||
(if aelt
|
||||
(let ((param (nth 3 aelt))
|
||||
(value (nth 4 aelt)))
|
||||
(if value
|
||||
(setq default-frame-alist
|
||||
(cons (cons param value)
|
||||
default-frame-alist))
|
||||
(setq default-frame-alist
|
||||
(cons (cons param
|
||||
(car x-invocation-args))
|
||||
default-frame-alist)
|
||||
x-invocation-args (cdr x-invocation-args)))))))
|
||||
|
||||
(defun mac-scroll-down-line ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-down 1)))
|
||||
;; Handler for switches of the form "-switch n"
|
||||
(defun x-handle-numeric-switch (switch)
|
||||
(let ((aelt (assoc switch command-line-x-option-alist)))
|
||||
(if aelt
|
||||
(let ((param (nth 3 aelt)))
|
||||
(setq default-frame-alist
|
||||
(cons (cons param
|
||||
(string-to-int (car x-invocation-args)))
|
||||
default-frame-alist)
|
||||
x-invocation-args
|
||||
(cdr x-invocation-args))))))
|
||||
|
||||
(defun mac-scroll-up ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-up)))
|
||||
;; Handle options that apply to initial frame only
|
||||
(defun x-handle-initial-switch (switch)
|
||||
(let ((aelt (assoc switch command-line-x-option-alist)))
|
||||
(if aelt
|
||||
(let ((param (nth 3 aelt))
|
||||
(value (nth 4 aelt)))
|
||||
(if value
|
||||
(setq initial-frame-alist
|
||||
(cons (cons param value)
|
||||
initial-frame-alist))
|
||||
(setq initial-frame-alist
|
||||
(cons (cons param
|
||||
(car x-invocation-args))
|
||||
initial-frame-alist)
|
||||
x-invocation-args (cdr x-invocation-args)))))))
|
||||
|
||||
(defun mac-scroll-up-line ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-up 1)))
|
||||
;; Make -iconic apply only to the initial frame!
|
||||
(defun x-handle-iconic (switch)
|
||||
(setq initial-frame-alist
|
||||
(cons '(visibility . icon) initial-frame-alist)))
|
||||
|
||||
(defun xw-defined-colors (&optional frame)
|
||||
"Internal function called by `defined-colors', which see."
|
||||
(or frame (setq frame (selected-frame)))
|
||||
(let ((all-colors x-colors)
|
||||
(this-color nil)
|
||||
(defined-colors nil))
|
||||
(while all-colors
|
||||
(setq this-color (car all-colors)
|
||||
all-colors (cdr all-colors))
|
||||
(and (color-supported-p this-color frame t)
|
||||
(setq defined-colors (cons this-color defined-colors))))
|
||||
defined-colors))
|
||||
;; Handle the -xrm option.
|
||||
(defun x-handle-xrm-switch (switch)
|
||||
(unless (consp x-invocation-args)
|
||||
(error "%s: missing argument to `%s' option" (invocation-name) switch))
|
||||
(setq x-command-line-resources
|
||||
(if (null x-command-line-resources)
|
||||
(car x-invocation-args)
|
||||
(concat x-command-line-resources "\n" (car x-invocation-args))))
|
||||
(setq x-invocation-args (cdr x-invocation-args)))
|
||||
|
||||
;; Don't have this yet.
|
||||
(fset 'x-get-resource 'ignore)
|
||||
;; Handle the geometry option
|
||||
(defun x-handle-geometry (switch)
|
||||
(let* ((geo (x-parse-geometry (car x-invocation-args)))
|
||||
(left (assq 'left geo))
|
||||
(top (assq 'top geo))
|
||||
(height (assq 'height geo))
|
||||
(width (assq 'width geo)))
|
||||
(if (or height width)
|
||||
(setq default-frame-alist
|
||||
(append default-frame-alist
|
||||
'((user-size . t))
|
||||
(if height (list height))
|
||||
(if width (list width)))
|
||||
initial-frame-alist
|
||||
(append initial-frame-alist
|
||||
'((user-size . t))
|
||||
(if height (list height))
|
||||
(if width (list width)))))
|
||||
(if (or left top)
|
||||
(setq initial-frame-alist
|
||||
(append initial-frame-alist
|
||||
'((user-position . t))
|
||||
(if left (list left))
|
||||
(if top (list top)))))
|
||||
(setq x-invocation-args (cdr x-invocation-args))))
|
||||
|
||||
(unless (eq system-type 'darwin)
|
||||
;; This variable specifies the Unix program to call (as a process) to
|
||||
;; deteremine the amount of free space on a file system (defaults to
|
||||
;; df). If it is not set to nil, ls-lisp will not work correctly
|
||||
;; unless an external application df is implemented on the Mac.
|
||||
(setq directory-free-space-program nil)
|
||||
;; Handle the -name option. Set the variable x-resource-name
|
||||
;; to the option's operand; set the name of
|
||||
;; the initial frame, too.
|
||||
(defun x-handle-name-switch (switch)
|
||||
(or (consp x-invocation-args)
|
||||
(error "%s: missing argument to `%s' option" (invocation-name) switch))
|
||||
(setq x-resource-name (car x-invocation-args)
|
||||
x-invocation-args (cdr x-invocation-args))
|
||||
(setq initial-frame-alist (cons (cons 'name x-resource-name)
|
||||
initial-frame-alist)))
|
||||
|
||||
;; Set this so that Emacs calls subprocesses with "sh" as shell to
|
||||
;; expand filenames Note no subprocess for the shell is actually
|
||||
;; started (see run_mac_command in sysdep.c).
|
||||
(setq shell-file-name "sh"))
|
||||
(defvar x-display-name nil
|
||||
"The display name specifying server and frame.")
|
||||
|
||||
;; X Window emulation in macterm.c is not complete enough to start a
|
||||
;; frame without a minibuffer properly. Call this to tell ediff
|
||||
;; library to use a single frame.
|
||||
; (ediff-toggle-multiframe)
|
||||
|
||||
;; Setup to use the Mac clipboard. The functions mac-cut-function and
|
||||
;; mac-paste-function are defined in mac.c.
|
||||
(set-selection-coding-system 'compound-text-mac)
|
||||
|
||||
(setq interprogram-cut-function
|
||||
'(lambda (str push)
|
||||
(mac-cut-function
|
||||
(encode-coding-string str selection-coding-system t) push)))
|
||||
|
||||
(setq interprogram-paste-function
|
||||
'(lambda ()
|
||||
(let ((clipboard (mac-paste-function)))
|
||||
(if clipboard
|
||||
(decode-coding-string clipboard selection-coding-system t)))))
|
||||
|
||||
;; Don't show the frame name; that's redundant.
|
||||
(setq-default mode-line-frame-identification " ")
|
||||
|
||||
(defun mac-drag-n-drop (event)
|
||||
"Edit the files listed in the drag-n-drop event.\n\
|
||||
Switch to a buffer editing the last file dropped."
|
||||
(interactive "e")
|
||||
(save-excursion
|
||||
;; Make sure the drop target has positive co-ords
|
||||
;; before setting the selected frame - otherwise it
|
||||
;; won't work. <skx@tardis.ed.ac.uk>
|
||||
(let* ((window (posn-window (event-start event)))
|
||||
(coords (posn-x-y (event-start event)))
|
||||
(x (car coords))
|
||||
(y (cdr coords)))
|
||||
(if (and (> x 0) (> y 0))
|
||||
(set-frame-selected-window nil window))
|
||||
(mapcar
|
||||
'(lambda (file)
|
||||
(find-file
|
||||
(decode-coding-string
|
||||
file
|
||||
(or file-name-coding-system
|
||||
default-file-name-coding-system))))
|
||||
(car (cdr (cdr event)))))
|
||||
(raise-frame)
|
||||
(recenter)))
|
||||
|
||||
(global-set-key [drag-n-drop] 'mac-drag-n-drop)
|
||||
|
||||
;; By checking whether the variable mac-ready-for-drag-n-drop has been
|
||||
;; defined, the event loop in macterm.c can be informed that it can
|
||||
;; now receive Finder drag and drop events. Files dropped onto the
|
||||
;; Emacs application icon can only be processed when the initial frame
|
||||
;; has been created: this is where the files should be opened.
|
||||
(add-hook 'after-init-hook
|
||||
'(lambda ()
|
||||
(defvar mac-ready-for-drag-n-drop t)))
|
||||
|
||||
; Define constant values to be set to mac-keyboard-text-encoding
|
||||
(defconst kTextEncodingMacRoman 0)
|
||||
(defconst kTextEncodingISOLatin1 513 "0x201")
|
||||
(defconst kTextEncodingISOLatin2 514 "0x202")
|
||||
|
||||
|
||||
;; Create a fontset that uses mac-roman font. With this fontset,
|
||||
;; characters decoded from mac-roman encoding (ascii, latin-iso8859-1,
|
||||
;; and mule-unicode-xxxx-yyyy) are displayed by a mac-roman font.
|
||||
;; Unnecessary in emacs22
|
||||
|
||||
;; Carbon uses different fonts than commonly found on X, so
|
||||
;; we define our own standard fontset here.
|
||||
(defvar mac-standard-fontset-spec
|
||||
"-apple-Monaco-normal-r-*-*-12-*-*-*-*-*-fontset-mac"
|
||||
"String of fontset spec of the standard fontset.
|
||||
This defines a fontset consisting of the Monaco variations for
|
||||
European languages which are distributed with Mac OS X.
|
||||
|
||||
See the documentation of `create-fontset-from-fontset-spec for the format.")
|
||||
|
||||
|
||||
(if (fboundp 'new-fontset)
|
||||
(progn
|
||||
(require 'fontset)
|
||||
;; Setup the default fontset.
|
||||
(setup-default-fontset)
|
||||
;; Create the standard fontset.
|
||||
(create-fontset-from-fontset-spec mac-standard-fontset-spec t)
|
||||
))
|
||||
|
||||
|
||||
(if (eq system-type 'darwin)
|
||||
;; On Darwin filenames are encoded in UTF-8
|
||||
(setq file-name-coding-system 'utf-8)
|
||||
;; To display filenames in Chinese or Japanese, replace mac-roman with
|
||||
;; big5 or sjis
|
||||
(setq file-name-coding-system 'mac-roman))
|
||||
|
||||
;; If Emacs is started from the Finder, change the default directory
|
||||
;; to the user's home directory.
|
||||
(if (string= default-directory "/")
|
||||
(cd "~"))
|
||||
|
||||
;; Tell Emacs to use pipes instead of pty's for processes because the
|
||||
;; latter sometimes lose characters. Pty support is compiled in since
|
||||
;; ange-ftp will not work without it.
|
||||
(setq process-connection-type nil)
|
||||
|
||||
;; Assume that fonts are always scalable on the Mac. This sometimes
|
||||
;; results in characters with jagged edges. However, without it,
|
||||
;; fonts with both truetype and bitmap representations but no italic
|
||||
;; or bold bitmap versions will not display these variants correctly.
|
||||
(setq scalable-fonts-allowed t)
|
||||
|
||||
;; Make suspend-emacs [C-z] collapse the current frame
|
||||
(substitute-key-definition 'suspend-emacs 'iconify-frame
|
||||
global-map)
|
||||
|
||||
;; Support mouse-wheel scrolling
|
||||
(mouse-wheel-mode 1)
|
||||
|
||||
;; (prefer-coding-system 'mac-roman)
|
||||
|
||||
;; Map certain keypad keys into ASCII characters that people usually expect
|
||||
(define-key function-key-map [return] [?\C-m])
|
||||
(define-key function-key-map [M-return] [?\M-\C-m])
|
||||
(define-key function-key-map [tab] [?\t])
|
||||
(define-key function-key-map [M-tab] [?\M-\t])
|
||||
(define-key function-key-map [backspace] [127])
|
||||
(define-key function-key-map [M-backspace] [?\M-\d])
|
||||
(define-key function-key-map [escape] [?\e])
|
||||
(define-key function-key-map [M-escape] [?\M-\e])
|
||||
|
||||
;; Tell read-char how to convert special chars to ASCII
|
||||
(put 'return 'ascii-character 13)
|
||||
(put 'tab 'ascii-character ?\t)
|
||||
(put 'backspace 'ascii-character 127)
|
||||
(put 'escape 'ascii-character ?\e)
|
||||
(defun x-handle-display (switch)
|
||||
(setq x-display-name (car x-invocation-args)
|
||||
x-invocation-args (cdr x-invocation-args)))
|
||||
|
||||
(defun x-handle-args (args)
|
||||
"Process the X-related command line options in ARGS.
|
||||
This is done before the user's startup file is loaded. They are copied to
|
||||
`x-invocation-args', from which the X-related things are extracted, first
|
||||
the switch (e.g., \"-fg\") in the following code, and possible values
|
||||
\(e.g., \"black\") in the option handler code (e.g., x-handle-switch).
|
||||
This function returns ARGS minus the arguments that have been processed."
|
||||
;; We use ARGS to accumulate the args that we don't handle here, to return.
|
||||
(setq x-invocation-args args
|
||||
args nil)
|
||||
(while (and x-invocation-args
|
||||
(not (equal (car x-invocation-args) "--")))
|
||||
(let* ((this-switch (car x-invocation-args))
|
||||
(orig-this-switch this-switch)
|
||||
completion argval aelt handler)
|
||||
(setq x-invocation-args (cdr x-invocation-args))
|
||||
;; Check for long options with attached arguments
|
||||
;; and separate out the attached option argument into argval.
|
||||
(if (string-match "^--[^=]*=" this-switch)
|
||||
(setq argval (substring this-switch (match-end 0))
|
||||
this-switch (substring this-switch 0 (1- (match-end 0)))))
|
||||
;; Complete names of long options.
|
||||
(if (string-match "^--" this-switch)
|
||||
(progn
|
||||
(setq completion (try-completion this-switch command-line-x-option-alist))
|
||||
(if (eq completion t)
|
||||
;; Exact match for long option.
|
||||
nil
|
||||
(if (stringp completion)
|
||||
(let ((elt (assoc completion command-line-x-option-alist)))
|
||||
;; Check for abbreviated long option.
|
||||
(or elt
|
||||
(error "Option `%s' is ambiguous" this-switch))
|
||||
(setq this-switch completion))))))
|
||||
(setq aelt (assoc this-switch command-line-x-option-alist))
|
||||
(if aelt (setq handler (nth 2 aelt)))
|
||||
(if handler
|
||||
(if argval
|
||||
(let ((x-invocation-args
|
||||
(cons argval x-invocation-args)))
|
||||
(funcall handler this-switch))
|
||||
(funcall handler this-switch))
|
||||
(setq args (cons orig-this-switch args)))))
|
||||
(nconc (nreverse args) x-invocation-args))
|
||||
|
||||
;;
|
||||
;; Available colors
|
||||
;;
|
||||
|
@ -1016,8 +986,327 @@ See the documentation of `create-fontset-from-fontset-spec for the format.")
|
|||
"GhostWhite"
|
||||
"ghost white"
|
||||
"snow")
|
||||
"The list of X colors from the `rgb.txt' file.
|
||||
"The list of X colors from the `rgb.txt' file.
|
||||
XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
|
||||
|
||||
(defun xw-defined-colors (&optional frame)
|
||||
"Internal function called by `defined-colors', which see."
|
||||
(or frame (setq frame (selected-frame)))
|
||||
(let ((all-colors x-colors)
|
||||
(this-color nil)
|
||||
(defined-colors nil))
|
||||
(while all-colors
|
||||
(setq this-color (car all-colors)
|
||||
all-colors (cdr all-colors))
|
||||
(and (color-supported-p this-color frame t)
|
||||
(setq defined-colors (cons this-color defined-colors))))
|
||||
defined-colors))
|
||||
|
||||
;;;; Function keys
|
||||
|
||||
(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
|
||||
global-map)
|
||||
|
||||
;; Map certain keypad keys into ASCII characters
|
||||
;; that people usually expect.
|
||||
(define-key function-key-map [return] [?\C-m])
|
||||
(define-key function-key-map [M-return] [?\M-\C-m])
|
||||
(define-key function-key-map [tab] [?\t])
|
||||
(define-key function-key-map [M-tab] [?\M-\t])
|
||||
(define-key function-key-map [backspace] [127])
|
||||
(define-key function-key-map [M-backspace] [?\M-\d])
|
||||
(define-key function-key-map [escape] [?\e])
|
||||
(define-key function-key-map [M-escape] [?\M-\e])
|
||||
|
||||
;; These tell read-char how to convert
|
||||
;; these special chars to ASCII.
|
||||
(put 'return 'ascii-character 13)
|
||||
(put 'tab 'ascii-character ?\t)
|
||||
(put 'backspace 'ascii-character 127)
|
||||
(put 'escape 'ascii-character ?\e)
|
||||
|
||||
|
||||
;;;; Keysyms
|
||||
|
||||
;; Define constant values to be set to mac-keyboard-text-encoding
|
||||
(defconst kTextEncodingMacRoman 0)
|
||||
(defconst kTextEncodingISOLatin1 513 "0x201")
|
||||
(defconst kTextEncodingISOLatin2 514 "0x202")
|
||||
|
||||
|
||||
;;;; Selections and cut buffers
|
||||
|
||||
;; Setup to use the Mac clipboard. The functions mac-cut-function and
|
||||
;; mac-paste-function are defined in mac.c.
|
||||
(set-selection-coding-system 'compound-text-mac)
|
||||
|
||||
(setq interprogram-cut-function
|
||||
'(lambda (str push)
|
||||
(mac-cut-function
|
||||
(encode-coding-string str selection-coding-system t) push)))
|
||||
|
||||
(setq interprogram-paste-function
|
||||
'(lambda ()
|
||||
(let ((clipboard (mac-paste-function)))
|
||||
(if clipboard
|
||||
(decode-coding-string clipboard selection-coding-system t)))))
|
||||
|
||||
|
||||
;;; Do the actual Windows setup here; the above code just defines
|
||||
;;; functions and variables that we use now.
|
||||
|
||||
(setq command-line-args (x-handle-args command-line-args))
|
||||
|
||||
;;; Make sure we have a valid resource name.
|
||||
(or (stringp x-resource-name)
|
||||
(let (i)
|
||||
(setq x-resource-name (invocation-name))
|
||||
|
||||
;; Change any . or * characters in x-resource-name to hyphens,
|
||||
;; so as not to choke when we use it in X resource queries.
|
||||
(while (setq i (string-match "[.*]" x-resource-name))
|
||||
(aset x-resource-name i ?-))))
|
||||
|
||||
(if (x-display-list)
|
||||
;; On Mac OS 8/9, Most coding systems used in code conversion for
|
||||
;; font names are not ready at the time when the terminal frame is
|
||||
;; created. So we reconstruct font name table for the initial
|
||||
;; frame.
|
||||
(mac-clear-font-name-table)
|
||||
(x-open-connection "Mac"
|
||||
x-command-line-resources
|
||||
;; Exit Emacs with fatal error if this fails.
|
||||
t))
|
||||
|
||||
(setq frame-creation-function 'x-create-frame-with-faces);; Setup the default fontset.
|
||||
(setup-default-fontset)
|
||||
|
||||
;; Carbon uses different fonts than commonly found on X, so
|
||||
;; we define our own standard fontset here.
|
||||
(defvar mac-standard-fontset-spec
|
||||
"-apple-Monaco-normal-r-*-*-12-*-*-*-*-*-fontset-mac"
|
||||
"String of fontset spec of the standard fontset.
|
||||
This defines a fontset consisting of the Monaco variations for
|
||||
European languages which are distributed with Mac OS X.
|
||||
|
||||
See the documentation of `create-fontset-from-fontset-spec for the format.")
|
||||
|
||||
;; Create a fontset that uses mac-roman font. With this fontset,
|
||||
;; characters decoded from mac-roman encoding (ascii, latin-iso8859-1,
|
||||
;; and mule-unicode-xxxx-yyyy) are displayed by a mac-roman font.
|
||||
(create-fontset-from-fontset-spec mac-standard-fontset-spec t)
|
||||
|
||||
;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
|
||||
(create-fontset-from-x-resource)
|
||||
|
||||
;; Try to create a fontset from a font specification which comes
|
||||
;; from initial-frame-alist, default-frame-alist, or X resource.
|
||||
;; A font specification in command line argument (i.e. -fn XXXX)
|
||||
;; should be already in default-frame-alist as a `font'
|
||||
;; parameter. However, any font specifications in site-start
|
||||
;; library, user's init file (.emacs), and default.el are not
|
||||
;; yet handled here.
|
||||
|
||||
(let ((font (or (cdr (assq 'font initial-frame-alist))
|
||||
(cdr (assq 'font default-frame-alist))
|
||||
(x-get-resource "font" "Font")))
|
||||
xlfd-fields resolved-name)
|
||||
(if (and font
|
||||
(not (query-fontset font))
|
||||
(setq resolved-name (x-resolve-font-name font))
|
||||
(setq xlfd-fields (x-decompose-font-name font)))
|
||||
(if (string= "fontset" (aref xlfd-fields xlfd-regexp-registry-subnum))
|
||||
(new-fontset font (x-complement-fontset-spec xlfd-fields nil))
|
||||
;; Create a fontset from FONT. The fontset name is
|
||||
;; generated from FONT.
|
||||
(create-fontset-from-ascii-font font resolved-name "startup"))))
|
||||
|
||||
;; Apply a geometry resource to the initial frame. Put it at the end
|
||||
;; of the alist, so that anything specified on the command line takes
|
||||
;; precedence.
|
||||
(let* ((res-geometry (x-get-resource "geometry" "Geometry"))
|
||||
parsed)
|
||||
(if res-geometry
|
||||
(progn
|
||||
(setq parsed (x-parse-geometry res-geometry))
|
||||
;; If the resource specifies a position,
|
||||
;; call the position and size "user-specified".
|
||||
(if (or (assq 'top parsed) (assq 'left parsed))
|
||||
(setq parsed (cons '(user-position . t)
|
||||
(cons '(user-size . t) parsed))))
|
||||
;; All geometry parms apply to the initial frame.
|
||||
(setq initial-frame-alist (append initial-frame-alist parsed))
|
||||
;; The size parms apply to all frames.
|
||||
(if (assq 'height parsed)
|
||||
(setq default-frame-alist
|
||||
(cons (cons 'height (cdr (assq 'height parsed)))
|
||||
default-frame-alist)))
|
||||
(if (assq 'width parsed)
|
||||
(setq default-frame-alist
|
||||
(cons (cons 'width (cdr (assq 'width parsed)))
|
||||
default-frame-alist))))))
|
||||
|
||||
;; Check the reverseVideo resource.
|
||||
(let ((case-fold-search t))
|
||||
(let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
|
||||
(if (and rv
|
||||
(string-match "^\\(true\\|yes\\|on\\)$" rv))
|
||||
(setq default-frame-alist
|
||||
(cons '(reverse . t) default-frame-alist)))))
|
||||
|
||||
(defun x-win-suspend-error ()
|
||||
(error "Suspending an Emacs running under Mac makes no sense"))
|
||||
(add-hook 'suspend-hook 'x-win-suspend-error)
|
||||
|
||||
;; Don't show the frame name; that's redundant.
|
||||
(setq-default mode-line-frame-identification " ")
|
||||
|
||||
;; Turn on support for mouse wheels.
|
||||
(mouse-wheel-mode 1)
|
||||
|
||||
(defun mac-drag-n-drop (event)
|
||||
"Edit the files listed in the drag-n-drop EVENT.
|
||||
Switch to a buffer editing the last file dropped."
|
||||
(interactive "e")
|
||||
;; Make sure the drop target has positive co-ords
|
||||
;; before setting the selected frame - otherwise it
|
||||
;; won't work. <skx@tardis.ed.ac.uk>
|
||||
(let* ((window (posn-window (event-start event)))
|
||||
(coords (posn-x-y (event-start event)))
|
||||
(x (car coords))
|
||||
(y (cdr coords)))
|
||||
(if (and (> x 0) (> y 0))
|
||||
(set-frame-selected-window nil window))
|
||||
(mapcar (lambda (file-name)
|
||||
(if (listp file-name)
|
||||
(let ((line (car file-name))
|
||||
(start (car (cdr file-name)))
|
||||
(end (car (cdr (cdr file-name)))))
|
||||
(if (> line 0)
|
||||
(goto-line line)
|
||||
(if (and (> start 0) (> end 0))
|
||||
(progn (set-mark start)
|
||||
(goto-char end)))))
|
||||
(x-dnd-handle-one-url window 'private
|
||||
(concat "file:" file-name))))
|
||||
(car (cdr (cdr event)))))
|
||||
(raise-frame))
|
||||
|
||||
(global-set-key [drag-n-drop] 'mac-drag-n-drop)
|
||||
|
||||
;; By checking whether the variable mac-ready-for-drag-n-drop has been
|
||||
;; defined, the event loop in macterm.c can be informed that it can
|
||||
;; now receive Finder drag and drop events. Files dropped onto the
|
||||
;; Emacs application icon can only be processed when the initial frame
|
||||
;; has been created: this is where the files should be opened.
|
||||
(add-hook 'after-init-hook
|
||||
'(lambda ()
|
||||
(defvar mac-ready-for-drag-n-drop t)))
|
||||
|
||||
;;;; Scroll bars
|
||||
|
||||
;; for debugging
|
||||
;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event))
|
||||
|
||||
;;(global-set-key [vertical-scroll-bar mouse-1] 'mac-handle-scroll-bar-event)
|
||||
|
||||
(global-set-key
|
||||
[vertical-scroll-bar down-mouse-1]
|
||||
'mac-handle-scroll-bar-event)
|
||||
|
||||
(global-unset-key [vertical-scroll-bar drag-mouse-1])
|
||||
(global-unset-key [vertical-scroll-bar mouse-1])
|
||||
|
||||
(defun mac-handle-scroll-bar-event (event)
|
||||
"Handle scroll bar EVENT to emulate Mac Toolbox style scrolling."
|
||||
(interactive "e")
|
||||
(let* ((position (event-start event))
|
||||
(window (nth 0 position))
|
||||
(bar-part (nth 4 position)))
|
||||
(select-window window)
|
||||
(cond
|
||||
((eq bar-part 'up)
|
||||
(goto-char (window-start window))
|
||||
(mac-scroll-down-line))
|
||||
((eq bar-part 'above-handle)
|
||||
(mac-scroll-down))
|
||||
((eq bar-part 'handle)
|
||||
(scroll-bar-drag event))
|
||||
((eq bar-part 'below-handle)
|
||||
(mac-scroll-up))
|
||||
((eq bar-part 'down)
|
||||
(goto-char (window-start window))
|
||||
(mac-scroll-up-line)))))
|
||||
|
||||
(defun mac-scroll-ignore-events ()
|
||||
;; Ignore confusing non-mouse events
|
||||
(while (not (memq (car-safe (read-event))
|
||||
'(mouse-1 double-mouse-1 triple-mouse-1))) nil))
|
||||
|
||||
(defun mac-scroll-down ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-down)))
|
||||
|
||||
(defun mac-scroll-down-line ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-down 1)))
|
||||
|
||||
(defun mac-scroll-up ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-up)))
|
||||
|
||||
(defun mac-scroll-up-line ()
|
||||
(track-mouse
|
||||
(mac-scroll-ignore-events)
|
||||
(scroll-up 1)))
|
||||
|
||||
|
||||
;;;; Others
|
||||
|
||||
(unless (eq system-type 'darwin)
|
||||
;; This variable specifies the Unix program to call (as a process) to
|
||||
;; deteremine the amount of free space on a file system (defaults to
|
||||
;; df). If it is not set to nil, ls-lisp will not work correctly
|
||||
;; unless an external application df is implemented on the Mac.
|
||||
(setq directory-free-space-program nil)
|
||||
|
||||
;; Set this so that Emacs calls subprocesses with "sh" as shell to
|
||||
;; expand filenames Note no subprocess for the shell is actually
|
||||
;; started (see run_mac_command in sysdep.c).
|
||||
(setq shell-file-name "sh"))
|
||||
|
||||
;; X Window emulation in macterm.c is not complete enough to start a
|
||||
;; frame without a minibuffer properly. Call this to tell ediff
|
||||
;; library to use a single frame.
|
||||
; (ediff-toggle-multiframe)
|
||||
|
||||
(if (eq system-type 'darwin)
|
||||
;; On Darwin filenames are encoded in UTF-8
|
||||
(setq file-name-coding-system 'utf-8)
|
||||
;; To display filenames in Chinese or Japanese, replace mac-roman with
|
||||
;; big5 or sjis
|
||||
(setq file-name-coding-system 'mac-roman))
|
||||
|
||||
;; If Emacs is started from the Finder, change the default directory
|
||||
;; to the user's home directory.
|
||||
(if (string= default-directory "/")
|
||||
(cd "~"))
|
||||
|
||||
;; Tell Emacs to use pipes instead of pty's for processes because the
|
||||
;; latter sometimes lose characters. Pty support is compiled in since
|
||||
;; ange-ftp will not work without it.
|
||||
(setq process-connection-type nil)
|
||||
|
||||
;; Assume that fonts are always scalable on the Mac. This sometimes
|
||||
;; results in characters with jagged edges. However, without it,
|
||||
;; fonts with both truetype and bitmap representations but no italic
|
||||
;; or bold bitmap versions will not display these variants correctly.
|
||||
(setq scalable-fonts-allowed t)
|
||||
|
||||
;; (prefer-coding-system 'mac-roman)
|
||||
|
||||
;;; arch-tag: 71dfcd14-cde8-4d66-b05c-85ec94fb23a6
|
||||
;;; mac-win.el ends here
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
;; Author: Tomas Abrahamsson <tab@lysator.liu.se>
|
||||
;; Maintainer: Tomas Abrahamsson <tab@lysator.liu.se>
|
||||
;; Keywords: mouse
|
||||
;; Version: 1.2.4
|
||||
;; Release-date: 25-Oct-2001
|
||||
;; Version: 1.2.6
|
||||
;; Release-date: 6-Aug-2004
|
||||
;; Location: http://www.lysator.liu.se/~tab/artist/
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -136,6 +136,14 @@
|
|||
|
||||
;;; ChangeLog:
|
||||
|
||||
;; 1.2.6 6-Aug-2004
|
||||
;; New: Coerced with the artist.el that's in Emacs-21.3.
|
||||
;; (minor editorial changes)
|
||||
;;
|
||||
;; 1.2.5 4-Aug-2004
|
||||
;; New: Added tool selection via the mouse-wheel
|
||||
;; Function provided by Andreas Leue <al@sphenon.de>
|
||||
;;
|
||||
;; 1.2.4 25-Oct-2001
|
||||
;; Bugfix: Some operations (the edit menu) got hidden
|
||||
;; Bugfix: The first arrow for poly-lines was always pointing
|
||||
|
@ -187,7 +195,7 @@
|
|||
|
||||
;; Variables
|
||||
|
||||
(defconst artist-version "1.2.4")
|
||||
(defconst artist-version "1.2.6")
|
||||
(defconst artist-maintainer-address "tab@lysator.liu.se")
|
||||
|
||||
|
||||
|
@ -471,6 +479,14 @@ strangely.")
|
|||
The fill char is used instead, if it is set.")
|
||||
(make-variable-buffer-local 'artist-borderless-shapes)
|
||||
|
||||
(defvar artist-prev-next-op-alist nil
|
||||
"Assoc list for looking up next and/or previous draw operation.
|
||||
The structure is as follows: (OP . (PREV-OP . NEXT-OP))
|
||||
where the elements are as follows:
|
||||
* OP is an atom: the KEY-SYMBOL in the `artist-mt' structure
|
||||
* PREV-OP and NEXT-OP are strings: the KEYWORD in the `artist-mt' structure
|
||||
|
||||
This variable is initialized by the artist-make-prev-next-op-alist function.")
|
||||
|
||||
(eval-when-compile
|
||||
;; Make rect available at compile-time
|
||||
|
@ -496,6 +512,8 @@ The fill char is used instead, if it is set.")
|
|||
(define-key map [S-down-mouse-2] 'artist-mouse-choose-operation)
|
||||
(define-key map [down-mouse-3] 'artist-down-mouse-3)
|
||||
(define-key map [S-down-mouse-3] 'artist-down-mouse-3)
|
||||
(define-key map [C-mouse-4] 'artist-select-prev-op-in-list)
|
||||
(define-key map [C-mouse-5] 'artist-select-next-op-in-list)
|
||||
(define-key map "\r" 'artist-key-set-point) ; return
|
||||
(define-key map [up] 'artist-previous-line)
|
||||
(define-key map "\C-p" 'artist-previous-line)
|
||||
|
@ -1063,6 +1081,73 @@ component is other than `artist-do-continously' or 1."
|
|||
"Retrieve the items component from a graphics operation INFO-PART."
|
||||
(elt info-part 1))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; mouse wheel cyclic operation selection
|
||||
|
||||
(defun artist-get-last-non-nil-op (op-list &optional last-non-nil)
|
||||
"Find the last non-nil draw operation in OP-LIST.
|
||||
Optional LAST-NON-NIL will be returned if OP-LIST is nil."
|
||||
(if op-list
|
||||
(artist-get-last-non-nil-op (cdr op-list)
|
||||
(or (car (car op-list)) last-non-nil))
|
||||
last-non-nil))
|
||||
|
||||
(defun artist-get-first-non-nil-op (op-list)
|
||||
"Find the first non-nil draw operation in OP-LIST."
|
||||
(or (car (car op-list)) (artist-get-first-non-nil-op (cdr op-list))))
|
||||
|
||||
(defun artist-is-in-op-list-p (op op-list)
|
||||
"Check whether OP is in OP-LIST."
|
||||
(and op-list
|
||||
(or (and (car (car op-list)) (string= op (car (car op-list))))
|
||||
(artist-is-in-op-list-p op (cdr op-list)))))
|
||||
|
||||
(defun artist-make-prev-next-op-alist (op-list
|
||||
&optional
|
||||
last-non-nil-arg first-non-nil-arg
|
||||
prev-entry prev-op-arg)
|
||||
"Build an assoc-list of OP-LIST.
|
||||
The arguments LAST-NON-NIL-ARG, FIRST-NON-NIL-ARG, PREV-ENTRY and
|
||||
PREV-OP-ARG are used when invoked recursively during the build-up."
|
||||
(let* ((last-non-nil (or last-non-nil-arg
|
||||
(artist-get-last-non-nil-op
|
||||
artist-key-compl-table)))
|
||||
(first-non-nil (or first-non-nil-arg
|
||||
(artist-get-first-non-nil-op
|
||||
artist-key-compl-table)))
|
||||
(prev-op (or prev-op-arg last-non-nil))
|
||||
(op (car (car op-list)))
|
||||
(opsym (artist-mt-get-symbol-from-keyword op))
|
||||
(entry (cons opsym (cons prev-op nil))))
|
||||
(if (or (and op-list (not op))
|
||||
(artist-is-in-op-list-p op (cdr op-list)))
|
||||
(artist-make-prev-next-op-alist (cdr op-list)
|
||||
last-non-nil first-non-nil
|
||||
prev-entry prev-op)
|
||||
(if prev-entry (setcdr (cdr prev-entry) op))
|
||||
(if op-list
|
||||
(cons entry (artist-make-prev-next-op-alist
|
||||
(cdr op-list)
|
||||
last-non-nil first-non-nil
|
||||
entry op))
|
||||
(progn (setcdr (cdr prev-entry) first-non-nil) nil)))))
|
||||
|
||||
(defun artist-select-next-op-in-list ()
|
||||
"Cyclically select next drawing mode operation."
|
||||
(interactive)
|
||||
(let ((next-op (cdr (cdr (assoc artist-curr-go artist-prev-next-op-alist)))))
|
||||
(artist-select-operation next-op)
|
||||
(message next-op)))
|
||||
|
||||
(defun artist-select-prev-op-in-list ()
|
||||
"Cyclically select previous drawing mode operation."
|
||||
(interactive)
|
||||
(let ((prev-op (car (cdr (assoc artist-curr-go artist-prev-next-op-alist)))))
|
||||
(artist-select-operation prev-op)
|
||||
(message prev-op)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;; ---------------------------------
|
||||
;;; The artist-mode
|
||||
;;; ---------------------------------
|
||||
|
@ -1317,6 +1402,7 @@ Keymap summary
|
|||
(make-local-variable 'artist-key-draw-how)
|
||||
(make-local-variable 'artist-popup-menu-table)
|
||||
(make-local-variable 'artist-key-compl-table)
|
||||
(make-local-variable 'artist-prev-next-op-alist)
|
||||
(make-local-variable 'artist-rb-save-data)
|
||||
(make-local-variable 'artist-arrow-point-1)
|
||||
(make-local-variable 'artist-arrow-point-2)
|
||||
|
@ -1326,6 +1412,8 @@ Keymap summary
|
|||
(setq artist-key-shape nil)
|
||||
(setq artist-popup-menu-table (artist-compute-popup-menu-table artist-mt))
|
||||
(setq artist-key-compl-table (artist-compute-key-compl-table artist-mt))
|
||||
(setq artist-prev-next-op-alist
|
||||
(artist-make-prev-next-op-alist artist-key-compl-table))
|
||||
(setq artist-rb-save-data (make-vector 7 0))
|
||||
(setq artist-arrow-point-1 nil)
|
||||
(setq artist-arrow-point-2 nil)
|
||||
|
@ -1444,7 +1532,7 @@ The returned value is suitable for the `x-popup-menu' function."
|
|||
"Compute completion table from MENU-TABLE, suitable for `completing-read'."
|
||||
(apply
|
||||
'nconc
|
||||
(artist-remove-nulls
|
||||
(remq nil
|
||||
(mapcar
|
||||
(lambda (element)
|
||||
(let ((element-tag (artist-mt-get-tag element)))
|
||||
|
@ -1684,29 +1772,6 @@ info-variant-part."
|
|||
"Call function FN with ARGS iff FN is not nil."
|
||||
(list 'if fn (cons 'funcall (cons fn args))))
|
||||
|
||||
(defvar artist-butlast-fn 'artist-butlast
|
||||
"The butlast function.")
|
||||
|
||||
(if (fboundp 'butlast)
|
||||
(setq artist-butlast-fn 'butlast)
|
||||
(setq artist-butlast-fn 'artist-butlast))
|
||||
|
||||
(defun artist-butlast (l)
|
||||
"Return the list L with all elements but the last."
|
||||
(cond ((null l) nil)
|
||||
((null (cdr l)) nil)
|
||||
(t (cons (car l) (artist-butlast (cdr l))))))
|
||||
|
||||
|
||||
(defun artist-last (l &optional n)
|
||||
"Return the last link in the list L.
|
||||
With optional argument N, returns Nth-to-last link (default 1)."
|
||||
(nth (- (length l) (or n 1)) l))
|
||||
|
||||
(defun artist-remove-nulls (l)
|
||||
"Remove nils in list L."
|
||||
(remq nil l))
|
||||
|
||||
(defun artist-uniq (l)
|
||||
"Remove consecutive duplicates in list L. Comparison is done with `equal'."
|
||||
(cond ((null l) nil)
|
||||
|
@ -1714,16 +1779,6 @@ With optional argument N, returns Nth-to-last link (default 1)."
|
|||
((equal (car l) (car (cdr l))) (artist-uniq (cdr l))) ; first 2 equal
|
||||
(t (cons (car l) (artist-uniq (cdr l)))))) ; first 2 are different
|
||||
|
||||
(defmacro artist-push (x stack)
|
||||
"Push element X to a STACK."
|
||||
(list 'setq stack (list 'cons x stack)))
|
||||
|
||||
(defmacro artist-pop (stack)
|
||||
"Pop an element from a STACK."
|
||||
(list 'prog1
|
||||
(list 'car stack)
|
||||
(list 'setq stack (list 'cdr stack))))
|
||||
|
||||
(defun artist-string-split (str r)
|
||||
"Split string STR at occurrences of regexp R, returning a list of strings."
|
||||
(let ((res nil)
|
||||
|
@ -3158,14 +3213,14 @@ through X1, Y1. An endpoint is a cons pair, (ENDPOINT-X . ENDPOINT-Y)."
|
|||
"Vaporize lines reachable from point X1, Y1."
|
||||
(let ((ep-stack nil))
|
||||
(mapcar
|
||||
(lambda (ep) (artist-push ep ep-stack))
|
||||
(lambda (ep) (push ep ep-stack))
|
||||
(artist-vap-find-endpoints x1 y1))
|
||||
(while (not (null ep-stack))
|
||||
(let* ((vaporize-point (artist-pop ep-stack))
|
||||
(let* ((vaporize-point (pop ep-stack))
|
||||
(new-endpoints (artist-vaporize-line (car vaporize-point)
|
||||
(cdr vaporize-point))))
|
||||
(mapcar
|
||||
(lambda (endpoint) (artist-push endpoint ep-stack))
|
||||
(lambda (endpoint) (push endpoint ep-stack))
|
||||
new-endpoints)))))
|
||||
|
||||
|
||||
|
@ -3326,7 +3381,7 @@ The POINT-LIST is expected to cover the first quadrant."
|
|||
;; that look like: \ / instead we get: ( )
|
||||
;; \ / \ /
|
||||
;; --------- ---------
|
||||
(let ((last-coord (artist-last point-list)))
|
||||
(let ((last-coord (last point-list)))
|
||||
(if (= (artist-coord-get-new-char last-coord) ?/)
|
||||
(artist-coord-set-new-char last-coord artist-ellipse-right-char)))
|
||||
|
||||
|
@ -3359,7 +3414,7 @@ The POINT-LIST is expected to cover the first quadrant."
|
|||
(t c)))))
|
||||
;; The cdr and butlast below is so we don't draw the middle top
|
||||
;; and middle bottom char twice.
|
||||
(funcall artist-butlast-fn (cdr (reverse right-half)))))
|
||||
(butlast (cdr (reverse right-half)))))
|
||||
(append right-half left-half)))
|
||||
|
||||
|
||||
|
@ -3675,10 +3730,10 @@ original contents of that area in the buffer."
|
|||
;; area we are about to fill, or, in other words, don't fill if we
|
||||
;; needn't.
|
||||
(if (not (= c artist-fill-char))
|
||||
(artist-push (artist-new-coord x1 y1) stack))
|
||||
(push (artist-new-coord x1 y1) stack))
|
||||
|
||||
(while (not (null stack))
|
||||
(let* ((coord (artist-pop stack))
|
||||
(let* ((coord (pop stack))
|
||||
(x (artist-coord-get-x coord))
|
||||
(y (artist-coord-get-y coord))
|
||||
|
||||
|
@ -3710,7 +3765,7 @@ original contents of that area in the buffer."
|
|||
(if lines-above
|
||||
(let ((c-above (artist-get-char-at-xy-conv x (- y 1))))
|
||||
(if (and (= c-above c) (/= c-above last-c-above))
|
||||
(artist-push (artist-new-coord x (- y 1)) stack))
|
||||
(push (artist-new-coord x (- y 1)) stack))
|
||||
(setq last-c-above c-above)))
|
||||
(setq last-x x)
|
||||
(setq x (- x 1)))
|
||||
|
@ -3724,7 +3779,7 @@ original contents of that area in the buffer."
|
|||
(if lines-below
|
||||
(let ((c-below (artist-get-char-at-xy-conv x (1+ y))))
|
||||
(if (and (= c-below c) (/= c-below last-c-below))
|
||||
(artist-push (artist-new-coord x (1+ y)) stack))
|
||||
(push (artist-new-coord x (1+ y)) stack))
|
||||
(setq last-c-below c-below)))
|
||||
(setq x (- x 1)))
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ See `forward-paragraph' for more information."
|
|||
(or arg (setq arg 1))
|
||||
(forward-paragraph (- arg)))
|
||||
|
||||
(defun mark-paragraph (&optional arg)
|
||||
(defun mark-paragraph (&optional arg allow-extend)
|
||||
"Put point at beginning of this paragraph, mark at end.
|
||||
The paragraph marked is the one that contains point or follows point.
|
||||
|
||||
|
@ -357,15 +357,16 @@ the number of paragraphs marked equals ARG.
|
|||
If ARG is negative, point is put at end of this paragraph, mark is put
|
||||
at beginning of this or a previous paragraph.
|
||||
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
it marks the next ARG paragraphs after (or before, if arg is negative)
|
||||
the ones already marked."
|
||||
(interactive "p")
|
||||
Interactively, if this command is repeated
|
||||
or (in Transient Mark mode) if the mark is active,
|
||||
it marks the next ARG paragraphs after the ones already marked."
|
||||
(interactive "p\np")
|
||||
(unless arg (setq arg 1))
|
||||
(when (zerop arg)
|
||||
(error "Cannot mark zero paragraphs"))
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
(cond ((and allow-extend
|
||||
(or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active)))
|
||||
(set-mark
|
||||
(save-excursion
|
||||
(goto-char (mark))
|
||||
|
|
|
@ -378,6 +378,7 @@ if large. You can use Info-split to do this manually."
|
|||
(find-file outfile)
|
||||
(texinfo-mode)
|
||||
(erase-buffer)
|
||||
(buffer-disable-undo)
|
||||
|
||||
(message "Formatting Info file: %s" outfile)
|
||||
(setq texinfo-format-filename
|
||||
|
|
|
@ -581,7 +581,7 @@ value of `texinfo-mode-hook'."
|
|||
texinfo-chapter-level-regexp
|
||||
"\\)\\>"))
|
||||
(make-local-variable 'require-final-newline)
|
||||
(setq require-final-newline t)
|
||||
(setq require-final-newline mode-require-final-newline)
|
||||
(make-local-variable 'indent-tabs-mode)
|
||||
(setq indent-tabs-mode nil)
|
||||
(make-local-variable 'paragraph-separate)
|
||||
|
|
|
@ -68,7 +68,8 @@ You can thus get the full benefit of adaptive filling
|
|||
Turning on Text mode runs the normal hook `text-mode-hook'."
|
||||
(make-local-variable 'text-mode-variant)
|
||||
(setq text-mode-variant t)
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'require-final-newline)
|
||||
mode-require-final-newline)
|
||||
(set (make-local-variable 'indent-line-function) 'indent-relative))
|
||||
|
||||
(define-derived-mode paragraph-indent-text-mode text-mode "Parindent"
|
||||
|
|
|
@ -399,10 +399,6 @@ problems."
|
|||
(type-break-keystroke-reset)
|
||||
(type-break-mode-line-countdown-or-break nil)
|
||||
|
||||
(if (boundp 'save-some-buffers-always)
|
||||
(add-to-list 'save-some-buffers-always
|
||||
(expand-file-name type-break-file-name)))
|
||||
|
||||
(setq type-break-time-last-break (type-break-get-previous-time))
|
||||
|
||||
;; schedule according to break time from session file
|
||||
|
@ -437,13 +433,10 @@ problems."
|
|||
(do-auto-save)
|
||||
(with-current-buffer (find-file-noselect type-break-file-name
|
||||
'nowarn)
|
||||
(set-buffer-modified-p nil)
|
||||
(setq buffer-save-without-query t)
|
||||
(set-buffer-modified-p nil)
|
||||
(unlock-buffer)
|
||||
(kill-this-buffer))
|
||||
(if (boundp 'save-some-buffers-always)
|
||||
(setq save-some-buffers-always
|
||||
(remove (expand-file-name type-break-file-name)
|
||||
save-some-buffers-always)))
|
||||
(and (interactive-p)
|
||||
(message "Type Break mode is disabled")))))
|
||||
type-break-mode)
|
||||
|
@ -515,16 +508,18 @@ variable of the same name."
|
|||
(defun type-break-file-keystroke-count ()
|
||||
"File keystroke count in `type-break-file-name', unless the file is locked."
|
||||
(if (not (stringp (file-locked-p type-break-file-name)))
|
||||
(with-current-buffer (find-file-noselect type-break-file-name
|
||||
'nowarn)
|
||||
(save-excursion
|
||||
(let ((inhibit-read-only t))
|
||||
(goto-char (point-min))
|
||||
(forward-line)
|
||||
(delete-region (point) (save-excursion (end-of-line) (point)))
|
||||
(insert (format "%s" type-break-keystroke-count))
|
||||
;; file saving is left to auto-save
|
||||
)))))
|
||||
;; Prevent deactivation of the mark in some other buffer.
|
||||
(let (deactivate-mark)
|
||||
(with-current-buffer (find-file-noselect type-break-file-name
|
||||
'nowarn)
|
||||
(save-excursion
|
||||
(let ((inhibit-read-only t))
|
||||
(goto-char (point-min))
|
||||
(forward-line)
|
||||
(delete-region (point) (save-excursion (end-of-line) (point)))
|
||||
(insert (format "%s" type-break-keystroke-count))
|
||||
;; file saving is left to auto-save
|
||||
))))))
|
||||
|
||||
(defun timep (time)
|
||||
"If TIME is in the format returned by `current-time' then
|
||||
|
|
|
@ -188,7 +188,6 @@ If `uniquify-min-dir-content' > 0, always pulls that many
|
|||
file name elements.
|
||||
Arguments BASE, DIRNAME, and NEWBUF specify the new buffer that causes
|
||||
this rationaliztion."
|
||||
(interactive)
|
||||
(if (null dirname)
|
||||
(with-current-buffer newbuf (setq uniquify-managed nil))
|
||||
(setq dirname (expand-file-name (directory-file-name dirname)))
|
||||
|
|
|
@ -500,6 +500,7 @@ Needs RCS 5.6.2 or later for -M."
|
|||
(defun vc-rcs-annotate-command (file buffer &optional revision)
|
||||
"Annotate FILE, inserting the results in BUFFER.
|
||||
Optional arg REVISION is a revision to annotate from."
|
||||
(vc-setup-buffer buffer)
|
||||
;; Aside from the "head revision on the trunk", the instructions for
|
||||
;; each revision on the trunk are an ordered list of kill and insert
|
||||
;; commands necessary to go from the chronologically-following
|
||||
|
|
|
@ -3096,7 +3096,7 @@ It will read a directory name from the minibuffer when invoked."
|
|||
(defvar widget-function-prompt-value-history nil
|
||||
"History of input to `widget-function-prompt-value'.")
|
||||
|
||||
(define-widget 'function 'sexp
|
||||
(define-widget 'function 'restricted-sexp
|
||||
"A Lisp function."
|
||||
:complete-function (lambda ()
|
||||
(interactive)
|
||||
|
|
|
@ -1,3 +1,37 @@
|
|||
2004-12-30 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* display.texi (Line Height): Total line-height is now specified
|
||||
in line-height property of form (HEIGHT TOTAL). Swap (FACE . RATIO)
|
||||
in cons cells. (nil . RATIO) is relative to actual line height.
|
||||
Use line-height `t' instead of `0' to get minimum height.
|
||||
|
||||
2004-12-29 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* os.texi (Timers): Discuss timers vs editing the buffer and undo.
|
||||
|
||||
2004-12-28 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* commands.texi (Quitting): Clarify value of with-local-quit.
|
||||
|
||||
* elisp.texi (Top): Fix previous change.
|
||||
|
||||
* loading.texi (Loading): Fix previous change.
|
||||
|
||||
2004-12-27 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* Makefile.in (MAKEINFO): Specify --force.
|
||||
|
||||
* buffers.texi (Killing Buffers): Add buffer-save-without-query.
|
||||
|
||||
* modes.texi (Emulating Mode Line): Document format's BUFFER arg.
|
||||
|
||||
* display.texi (Line Height): Further clarify.
|
||||
|
||||
* elisp.texi (Top): Update Loading submenu.
|
||||
|
||||
* loading.texi (Where Defined): New node.
|
||||
(Unloading): load-history moved to Where Defined.
|
||||
|
||||
2004-12-21 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* commands.texi (Event Input Misc): Add while-no-input.
|
||||
|
|
|
@ -31,7 +31,7 @@ infodir = $(srcdir)/../info
|
|||
TEXI2DVI = texi2dvi
|
||||
SHELL = /bin/sh
|
||||
INSTALL_INFO = install-info
|
||||
MAKEINFO = makeinfo
|
||||
MAKEINFO = makeinfo --force
|
||||
|
||||
# The name of the manual:
|
||||
VERSION=2.9
|
||||
|
|
|
@ -1041,6 +1041,13 @@ save that buffer, just as they offer to save file-visiting buffers.
|
|||
for any reason. @xref{Buffer-Local Variables}.
|
||||
@end defvar
|
||||
|
||||
@defvar buffer-save-without-query
|
||||
This variable, if non-@code{nil} in a particular buffer, tells
|
||||
@code{save-buffers-kill-emacs} and @code{save-some-buffers} to save
|
||||
this buffer (if it's modified) without asking the user. The variable
|
||||
automatically becomes buffer-local when set for any reason.
|
||||
@end defvar
|
||||
|
||||
@defun buffer-live-p object
|
||||
This function returns @code{t} if @var{object} is a buffer which has
|
||||
not been killed, @code{nil} otherwise.
|
||||
|
|
|
@ -2605,7 +2605,8 @@ non-@code{nil}, then @code{quit-flag} has no special effect.
|
|||
This macro executes @var{forms} in sequence, but allows quitting, at
|
||||
least locally, within @var{body} even if @code{inhibit-quit} was
|
||||
non-@code{nil} outside this construct. It returns the value of the
|
||||
last form in @var{forms}.
|
||||
last form in @var{forms}, unless exited by quitting, in which case
|
||||
it returns @code{nil}.
|
||||
|
||||
If @code{inhibit-quit} is @code{nil} on entry to @code{with-local-quit},
|
||||
it only executes the @var{forms}, and setting @code{quit-flag} causes
|
||||
|
|
|
@ -1532,28 +1532,43 @@ or by adding additional vertical space below one or all lines.
|
|||
@kindex line-height @r{(text property)}
|
||||
A newline can have a @code{line-height} text or overlay property
|
||||
that controls the total height of the display line ending in that
|
||||
newline. If the property value is zero, the displayed height of the
|
||||
line is exactly what its contents need; no line-spacing is added.
|
||||
newline.
|
||||
|
||||
If the property value is a list @code{(@var{height} @var{total})},
|
||||
then @var{height} is used as the actual property value for the
|
||||
@code{line-height}, and @var{total} specifies the total displayed
|
||||
height of the line, so the line spacing added below the line equals
|
||||
the @var{total} height minus the actual line height. In this case,
|
||||
the other ways to specify the line spacing are ignored.
|
||||
|
||||
If the property value is @code{t}, the displayed height of the
|
||||
line is exactly what its contents demand; no line-spacing is added.
|
||||
This case is useful for tiling small images or image slices without
|
||||
adding blank areas between the images.
|
||||
|
||||
If the property value is not zero, it specifies a desired height,
|
||||
@var{line-height}. There are several ways it can do this:
|
||||
If the property value is not @code{t}, it is a height spec. A height
|
||||
spec stands for a numeric height value; this heigh spec specifies the
|
||||
actual line height, @var{line-height}. There are several ways to
|
||||
write a height spec; here's how each of them translates into a numeric
|
||||
height:
|
||||
|
||||
@table @code
|
||||
@item @var{integer}
|
||||
If the property is a positive integer, @var{line-height} is that integer.
|
||||
If the height spec is a positive integer, the height value is that integer.
|
||||
@item @var{float}
|
||||
If the property is a float, @var{float}, @var{line-height} is @var{float}
|
||||
times the frame's default line height.
|
||||
@item (@var{ratio} . @var{face})
|
||||
If the property is a cons of the format shown, @var{line-height} is
|
||||
@var{ratio} times the height of face @var{face}. @var{ratio} can be
|
||||
any type of number. If @var{face} is @code{t}, it refers to the
|
||||
current face.
|
||||
If the height spec is a float, @var{float}, the numeric height value
|
||||
is @var{float} times the frame's default line height.
|
||||
@item (@var{face} . @var{ratio})
|
||||
If the height spec is a cons of the format shown, the numeric height
|
||||
is @var{ratio} times the height of face @var{face}. @var{ratio} can
|
||||
be any type of number, or @code{nil} which means a ratio of 1.
|
||||
If @var{face} is @code{t}, it refers to the current face.
|
||||
@item (@code{nil} . @var{ratio})
|
||||
If the height spec is a cons of the format shown, the numeric height
|
||||
is @var{ratio} times the height of the contents of the line.
|
||||
@end table
|
||||
|
||||
Thus, any valid nonzero property value specifies a height in pixels,
|
||||
Thus, any valid non-@code{t} property value specifies a height in pixels,
|
||||
@var{line-height}, one way or another. If the line contents' height
|
||||
is less than @var{line-height}, Emacs adds extra vertical space above
|
||||
the line to achieve the total height @var{line-height}. Otherwise,
|
||||
|
@ -1561,6 +1576,8 @@ the line to achieve the total height @var{line-height}. Otherwise,
|
|||
|
||||
If you don't specify the @code{line-height} propery, the line's
|
||||
height consists of the contents' height plus the line spacing.
|
||||
There are several ways to specify the line spacing for different
|
||||
parts of Emacs text.
|
||||
|
||||
@vindex default-line-spacing
|
||||
You can specify the line spacing for all lines in a frame with the
|
||||
|
@ -1584,24 +1601,11 @@ property that controls the height of the display line ending with that
|
|||
newline. The property value overrides the default frame line spacing
|
||||
and the buffer local @code{line-spacing} variable.
|
||||
|
||||
One way or another, these mechanisms specify a line spacing for each
|
||||
line. Let's call the value @var{line-spacing}.
|
||||
|
||||
If the @var{line-spacing} value is a positive integer, it specifies
|
||||
the number of pixels of additional vertical space. This space appears
|
||||
below the display line contents.
|
||||
|
||||
If the @var{line-spacing} value is a floating point number or cons,
|
||||
the additional vertical space is @var{line-spacing} times the frame
|
||||
default line height.
|
||||
|
||||
@ignore @c I think we may want to delete this, so don't document it -- rms.
|
||||
If the @var{line-spacing} value is a cons @code{(total . @var{spacing})}
|
||||
where @var{spacing} is any of the forms described above, the value of
|
||||
@var{spacing} specifies the total displayed height of the line,
|
||||
regardless of the height of the characters in it. This is equivalent
|
||||
to using the @code{line-height} property.
|
||||
@end ignore
|
||||
One way or another, these mechanisms specify a Lisp value for the
|
||||
spacing of each line. The value is a height spec, and it translates
|
||||
into a Lisp value as described above. However, in this case the
|
||||
numeric height value specifies the line spacing, rather than the line
|
||||
height.
|
||||
|
||||
@node Faces
|
||||
@section Faces
|
||||
|
|
|
@ -420,9 +420,15 @@ Macros
|
|||
Loading
|
||||
|
||||
* How Programs Do Loading:: The @code{load} function and others.
|
||||
* Library Search:: Finding a library to load.
|
||||
* Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files.
|
||||
* Autoload:: Setting up a function to autoload.
|
||||
* Named Features:: Loading a library if it isn't already loaded.
|
||||
* Repeated Loading:: Precautions about loading a file twice.
|
||||
* Named Features:: Loading a library if it isn't already loaded.
|
||||
* Where Defined:: Finding which file defined a certain symbol.
|
||||
* Unloading:: How to ``unload'' a library that was loaded.
|
||||
* Hooks for Loading:: Providing code to be run when
|
||||
particular libraries are loaded.
|
||||
|
||||
Byte Compilation
|
||||
|
||||
|
|
|
@ -36,15 +36,16 @@ Similarly, a ``Lisp library directory'' is a directory of files
|
|||
containing Lisp code.
|
||||
|
||||
@menu
|
||||
* How Programs Do Loading:: The @code{load} function and others.
|
||||
* Library Search:: Finding a library to load.
|
||||
* Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files.
|
||||
* Autoload:: Setting up a function to autoload.
|
||||
* Repeated Loading:: Precautions about loading a file twice.
|
||||
* Named Features:: Loading a library if it isn't already loaded.
|
||||
* Unloading:: How to ``unload'' a library that was loaded.
|
||||
* Hooks for Loading:: Providing code to be run when
|
||||
particular libraries are loaded.
|
||||
* How Programs Do Loading:: The @code{load} function and others.
|
||||
* Library Search:: Finding a library to load.
|
||||
* Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files.
|
||||
* Autoload:: Setting up a function to autoload.
|
||||
* Repeated Loading:: Precautions about loading a file twice.
|
||||
* Named Features:: Loading a library if it isn't already loaded.
|
||||
* Where Defined:: Finding which file defined a certain symbol.
|
||||
* Unloading:: How to ``unload'' a library that was loaded.
|
||||
* Hooks for Loading:: Providing code to be run when
|
||||
particular libraries are loaded.
|
||||
@end menu
|
||||
|
||||
@node How Programs Do Loading
|
||||
|
@ -714,6 +715,60 @@ with a call to @code{provide}. The order of the elements in the
|
|||
@code{features} list is not significant.
|
||||
@end defvar
|
||||
|
||||
@node Where Defined
|
||||
@section Which File Defined a Certain Symbol
|
||||
|
||||
@defun symbol-file symbol &optional type
|
||||
This function returns the name of the file that defined @var{symbol}.
|
||||
If @var{type} is @code{nil}, then any kind of definition is
|
||||
acceptable. If @var{type} is @code{defun} or @code{defvar}, that
|
||||
specifies function definition only or variable definition only.
|
||||
|
||||
The value is the file name as it was specified to @code{load}:
|
||||
either an absolute file name, or a library name
|
||||
(with no directory name and no @samp{.el} or @samp{.elc} at the end).
|
||||
It can also be @code{nil}, if the definition is not associated with any file.
|
||||
@end defun
|
||||
|
||||
The basis for @code{symbol-file} is the data in the variable
|
||||
@code{load-history}.
|
||||
|
||||
@defvar load-history
|
||||
This variable's value is an alist connecting library names with the
|
||||
names of functions and variables they define, the features they provide,
|
||||
and the features they require.
|
||||
|
||||
Each element is a list and describes one library. The @sc{car} of the
|
||||
list is the name of the library, as a string. The rest of the list
|
||||
elements have these forms:
|
||||
|
||||
@table @code
|
||||
@item @var{var}
|
||||
The symbol @var{var} was defined as a variable.
|
||||
@item (defun . @var{fun})
|
||||
The @var{fun} was defined by this library.
|
||||
@item (t . @var{fun})
|
||||
The function @var{fun} was previously an autoload before this library
|
||||
redefined it as a function. The following element is always the
|
||||
symbol @var{fun}, which signifies that the library defined @var{fun}
|
||||
as a function.
|
||||
@item (autoload . @var{fun})
|
||||
The function @var{fun} was defined as an autoload.
|
||||
@item (require . @var{feature})
|
||||
The feature @var{feature} was required.
|
||||
@item (provide . @var{feature})
|
||||
The feature @var{feature} was provided.
|
||||
@end table
|
||||
|
||||
The value of @code{load-history} may have one element whose @sc{car} is
|
||||
@code{nil}. This element describes definitions made with
|
||||
@code{eval-buffer} on a buffer that is not visiting a file.
|
||||
@end defvar
|
||||
|
||||
The command @code{eval-region} updates @code{load-history}, but does so
|
||||
by adding the symbols defined to the element for the file being visited,
|
||||
rather than replacing that element. @xref{Eval}.
|
||||
|
||||
@node Unloading
|
||||
@section Unloading
|
||||
@cindex unloading
|
||||
|
@ -760,42 +815,6 @@ ignored and you can unload any library.
|
|||
The @code{unload-feature} function is written in Lisp; its actions are
|
||||
based on the variable @code{load-history}.
|
||||
|
||||
@defvar load-history
|
||||
This variable's value is an alist connecting library names with the
|
||||
names of functions and variables they define, the features they provide,
|
||||
and the features they require.
|
||||
|
||||
Each element is a list and describes one library. The @sc{car} of the
|
||||
list is the name of the library, as a string. The rest of the list
|
||||
elements have these forms:
|
||||
|
||||
@table @code
|
||||
@item @var{fun}
|
||||
The function @var{fun} was defined by this library.
|
||||
@item (t . @var{fun})
|
||||
The function @var{fun} was previously an autoload before this library
|
||||
redefined it as a function. The following element is always the
|
||||
symbol @var{fun}, which signifies that the library defined @var{fun}
|
||||
as a function.
|
||||
@item (autoload . @var{fun})
|
||||
The function @var{fun} was defined as an autoload.
|
||||
@item (defvar . @var{var})
|
||||
The symbol @var{var} was defined as a variable.
|
||||
@item (require . @var{feature})
|
||||
The feature @var{feature} was required.
|
||||
@item (provide . @var{feature})
|
||||
The feature @var{feature} was provided.
|
||||
@end table
|
||||
|
||||
The value of @code{load-history} may have one element whose @sc{car} is
|
||||
@code{nil}. This element describes definitions made with
|
||||
@code{eval-buffer} on a buffer that is not visiting a file.
|
||||
@end defvar
|
||||
|
||||
The command @code{eval-region} updates @code{load-history}, but does so
|
||||
by adding the symbols defined to the element for the file being visited,
|
||||
rather than replacing that element. @xref{Eval}.
|
||||
|
||||
@defvar unload-feature-special-hooks
|
||||
This variable holds a list of hooks to be scanned before unloading a
|
||||
library, to remove functions defined in the library.
|
||||
|
|
|
@ -1736,7 +1736,7 @@ It is normally @code{nil}, so that ordinary buffers have no header line.
|
|||
the text that would appear in a mode line or header line
|
||||
based on certain mode-line specification.
|
||||
|
||||
@defun format-mode-line &optional format window no-props
|
||||
@defun format-mode-line &optional format window no-props buffer
|
||||
This function formats a line of text according to @var{format} as if
|
||||
it were generating the mode line for @var{window}, but instead of
|
||||
displaying the text in the mode line or the header line, it returns
|
||||
|
@ -1752,6 +1752,8 @@ The argument @var{window} defaults to the selected window.
|
|||
The value string normally has text properties that correspond to the
|
||||
faces, keymaps, etc., that the mode line would have. If
|
||||
@var{no-props} is non-@code{nil}, the value has no text properties.
|
||||
If @var{buffer} is non-@code{nil}, all the information used is taken
|
||||
from @var{buffer}; by default,it comes from @var{window}'s buffer.
|
||||
@end defun
|
||||
|
||||
@node Imenu
|
||||
|
|
|
@ -1368,6 +1368,11 @@ because most timer functions don't do a lot of work. Indeed, for a
|
|||
timer to call a function that takes substantial time to run is likely
|
||||
to be annoying.
|
||||
|
||||
Timer functions should normally not alter the current buffer
|
||||
contents, but it may be ok to alter some other buffer that exists for
|
||||
special purposes. A general guideline is that if a buffer has undo
|
||||
enabled, timers should not write in it.
|
||||
|
||||
@deffn Command run-at-time time repeat function &rest args
|
||||
This sets up a timer that calls the function @var{function} with
|
||||
arguments @var{args} at time @var{time}. If @var{repeat} is a number
|
||||
|
@ -1481,6 +1486,11 @@ minutes, and even if there have been garbage collections and autosaves.
|
|||
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.
|
||||
|
||||
It is legitimate for an idle timer to edit the current buffer. If
|
||||
it does, it should explicitly call @code{undo-boundary} once at the
|
||||
beginning and once just before exiting, since Emacs won't do that
|
||||
automatically for an idle timer.
|
||||
|
||||
@defun cancel-timer timer
|
||||
Cancel the requested action for @var{timer}, which should be a value
|
||||
previously returned by @code{run-at-time} or @code{run-with-idle-timer}.
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2004-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* xlwmenu.c (xlwMenuActionsList): Install MenuGadgetEscape as an
|
||||
action procedure for compatibility with Lesstif/Motif.
|
||||
|
||||
* Makefile.in (mostlyclean): Don't remove *~ on clean.
|
||||
|
||||
2004-12-26 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* lwlib-Xaw.c: Put <KeyPress>Escape in dialogOverride so dialogs only
|
||||
pops down on Escape, not any keypress.
|
||||
|
||||
2004-11-01 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* xlwmenu.c (find_first_selectable, find_next_selectable)
|
||||
|
|
|
@ -57,7 +57,7 @@ lwlib-Xm.o: lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
|
|||
xlwmenu.o: xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h
|
||||
|
||||
mostlyclean:
|
||||
$(RM) *.o core errs ,* *~ *.a .emacs_* make.log MakeOut \#*
|
||||
$(RM) *.o core errs ,* *.a .emacs_* make.log MakeOut \#*
|
||||
|
||||
clean: mostlyclean
|
||||
distclean: clean
|
||||
|
|
|
@ -279,7 +279,7 @@ static char overrideTrans[] =
|
|||
"<Message>WM_PROTOCOLS: lwlib_delete_dialog()";
|
||||
/* Dialogs pop down on any key press */
|
||||
static char dialogOverride[] =
|
||||
"<KeyPress>: lwlib_delete_dialog()";
|
||||
"<KeyPress>Escape: lwlib_delete_dialog()";
|
||||
static void wm_delete_window();
|
||||
static XtActionsRec xaw_actions [] = {
|
||||
{"lwlib_delete_dialog", wm_delete_window}
|
||||
|
|
|
@ -211,6 +211,7 @@ xlwMenuActionsList [] =
|
|||
{"right", Right},
|
||||
{"select", Select},
|
||||
{"key", Key},
|
||||
{"MenuGadgetEscape", Key}, /* Compatibility with Lesstif/Motif. */
|
||||
{"nothing", Nothing},
|
||||
};
|
||||
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
2004-12-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* makefile.MPW: Add dependencies for fringe.c.x, image.c.x, and
|
||||
lastfile.c.x.
|
||||
(PPCCOptions): Add -alloca.
|
||||
(EmacsObjects): Remove alloca.c.x. Add fringe.c.x, image.c.x, and
|
||||
lastfile.c.x.
|
||||
(Emacs MPW): Add QuickTimeLib.
|
||||
(EmacsSource): Remove alloca.c. Add fringe.c, image.c, and
|
||||
lastfile.c.
|
||||
(LispSource): Fix pathnames for byte-run.elc, float-sup.elc, and
|
||||
map-ynp.elc.
|
||||
* inc/config.h (USE_LSB_TAG) [__MRC__]: Define.
|
||||
(UNEXEC_SRC): Close comment.
|
||||
* inc/epaths.h (PATH_BITMAPS, PATH_GAME): New defines.
|
||||
* inc/m-mac.h (HAVE_ALLOCA) [__MRC__]: Define.
|
||||
(C_ALLOCA) [__MRC__]: Don't define.
|
||||
* inc/s-mac.h (X_OK): New define.
|
||||
(DECL_ALIGN) [USE_LSB_TAG && __MRC__]: New macro.
|
||||
(GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS.
|
||||
|
||||
2004-05-29 Steven Tamm <steventamm@mac.com>
|
||||
|
||||
* INSTALL: Fixing typos
|
||||
|
|
|
@ -261,7 +261,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* #undef UNEXEC_SRC unexelf.c
|
||||
/* #undef UNEXEC_SRC */
|
||||
|
||||
/* #undef HAVE_LIBXBSD */
|
||||
/* #undef HAVE_XRMSETDATABASE */
|
||||
|
@ -366,6 +366,13 @@ Boston, MA 02111-1307, USA. */
|
|||
/* Define to make ftello visible on some hosts (e.g. glibc 2.1.3). */
|
||||
/* #undef _XOPEN_SOURCE */
|
||||
|
||||
#ifdef __MRC__
|
||||
/* Use low-bits for tags. If ENABLE_CHECKING is turned on together
|
||||
with USE_LSB_TAG, optimization flags should be explicitly turned
|
||||
off. */
|
||||
#define USE_LSB_TAG
|
||||
#endif
|
||||
|
||||
#ifdef __MRC__
|
||||
#define EMACS_CONFIGURATION "macos-mpw"
|
||||
#else /* Assume CodeWarrior */
|
||||
|
|
|
@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
/* Where Emacs should look for X bitmap files.
|
||||
The lisp variable x-bitmap-file-path is set based on this value. */
|
||||
/* #define PATH_BITMAPS "/usr/include/X11/bitmaps" */
|
||||
#define PATH_BITMAPS ""
|
||||
|
||||
/* Where Emacs should look for its docstring file. The lisp variable
|
||||
doc-directory is set to this value. */
|
||||
|
@ -57,6 +57,9 @@ Boston, MA 02111-1307, USA. */
|
|||
macro, and is then used to set the Info-default-directory-list. */
|
||||
#define PATH_INFO "~emacs/info"
|
||||
|
||||
/* Where Emacs should store game score files. */
|
||||
#define PATH_GAME "~emacs/games"
|
||||
|
||||
/* Where Emacs should look for the application default file. */
|
||||
/* #define PATH_X_DEFAULTS "/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S" */
|
||||
|
||||
|
|
|
@ -87,8 +87,11 @@ Boston, MA 02111-1307, USA. */
|
|||
Define neither one if an assembler-language alloca
|
||||
in the file alloca.s should be used. */
|
||||
|
||||
#ifdef __MRC__
|
||||
#define HAVE_ALLOCA
|
||||
#else
|
||||
#define C_ALLOCA
|
||||
/* #define HAVE_ALLOCA */
|
||||
#endif
|
||||
|
||||
/* Define NO_REMAP if memory segmentation makes it not work well
|
||||
to change the boundary between the text section and data section
|
||||
|
|
|
@ -255,6 +255,10 @@ void read_input_waiting ();
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef X_OK
|
||||
#define X_OK 01
|
||||
#endif
|
||||
|
||||
#undef unlink
|
||||
#define unlink sys_unlink
|
||||
#undef read
|
||||
|
@ -319,5 +323,15 @@ extern double atof (const char *);
|
|||
|
||||
#define SYMS_SYSTEM syms_of_mac()
|
||||
|
||||
#ifdef USE_LSB_TAG
|
||||
#ifdef __MRC__
|
||||
#define DECL_ALIGN(type, var) type var
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the
|
||||
stack. */
|
||||
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
|
||||
|
||||
/* arch-tag: 6a941c4b-a419-4d25-80ac-9335053e58b2
|
||||
(do not change this comment) */
|
||||
|
|
|
@ -44,7 +44,7 @@ OptOption = # -opt speed # alternatively set to -opt off or -opt size
|
|||
|
||||
# The -noMapCR options and the two -d's must not be removed.
|
||||
|
||||
PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int ¶
|
||||
PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int -alloca ¶
|
||||
-typecheck relaxed -w off ¶
|
||||
-includes unix -i {Includes},{Src} ¶
|
||||
-d emacs=1 -d HAVE_CONFIG_H -d MAC_OS -d MAC_OS8
|
||||
|
@ -63,7 +63,6 @@ BLOCKINPUT_H_GROUP = "{Src}blockinput.h" "{Src}atimer.h" "{Src}systime.h"
|
|||
EmacsObjects = ¶
|
||||
"{Src}abbrev.c.x" ¶
|
||||
"{Src}alloc.c.x" ¶
|
||||
"{Src}alloca.c.x" ¶
|
||||
"{Src}atimer.c.x" ¶
|
||||
"{Src}buffer.c.x" ¶
|
||||
"{Src}bytecode.c.x" ¶
|
||||
|
@ -92,7 +91,9 @@ EmacsObjects =
|
|||
"{Src}fns.c.x" ¶
|
||||
"{Src}fontset.c.x" ¶
|
||||
"{Src}frame.c.x" ¶
|
||||
"{Src}fringe.c.x" ¶
|
||||
"{Src}getloadavg.c.x" ¶
|
||||
"{Src}image.c.x" ¶
|
||||
"{Src}indent.c.x" ¶
|
||||
"{Src}insdel.c.x" ¶
|
||||
"{Src}intervals.c.x" ¶
|
||||
|
@ -120,7 +121,8 @@ EmacsObjects =
|
|||
"{Src}undo.c.x" ¶
|
||||
"{Src}window.c.x" ¶
|
||||
"{Src}xdisp.c.x" ¶
|
||||
"{Src}xfaces.c.x"
|
||||
"{Src}xfaces.c.x" ¶
|
||||
"{Src}lastfile.c.x"
|
||||
|
||||
# The list of object files generated from new source files of the Macintosh port.
|
||||
|
||||
|
@ -142,6 +144,7 @@ Emacs
|
|||
"{SharedLibraries}AppleScriptLib" ¶
|
||||
"{SharedLibraries}TextEncodingConverter" ¶
|
||||
"{SharedLibraries}AppearanceLib" ¶
|
||||
"{SharedLibraries}QuickTimeLib" ¶
|
||||
"{PPCLibraries}StdCRuntime.o" ¶
|
||||
"{PPCLibraries}PPCCRuntime.o" ¶
|
||||
"{PPCLibraries}PPCToolLibs.o" ¶
|
||||
|
@ -495,10 +498,33 @@ Emacs
|
|||
"{Src}commands.h" ¶
|
||||
"{Src}keyboard.h"
|
||||
|
||||
{Src}fringe.c.x Ä ¶
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Src}lisp.h" ¶
|
||||
"{Src}frame.h" ¶
|
||||
{WINDOW_H_GROUP} ¶
|
||||
"{Src}buffer.h" ¶
|
||||
{BLOCKINPUT_H_GROUP}
|
||||
|
||||
{Src}getloadavg.c.x Ä ¶
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Includes}sys:types.h"
|
||||
|
||||
{Src}image.c.x Ä ¶
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Src}lisp.h" ¶
|
||||
"{Src}frame.h" ¶
|
||||
{WINDOW_H_GROUP} ¶
|
||||
{DISPEXTERN_H_GROUP} ¶
|
||||
{BLOCKINPUT_H_GROUP} ¶
|
||||
"{Includes}epaths.h" ¶
|
||||
"{Src}macterm.h" ¶
|
||||
"{Src}macgui.h" ¶
|
||||
"{Src}frame.h" ¶
|
||||
"{Includes}sys:stat.h" ¶
|
||||
"{Includes}alloca.h" ¶
|
||||
"{Includes}sys:param.h"
|
||||
|
||||
{Src}indent.c.x Ä ¶
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Src}lisp.h" ¶
|
||||
|
@ -574,6 +600,9 @@ Emacs
|
|||
"{Src}puresize.h" ¶
|
||||
{INTERVALS_H_GROUP}
|
||||
|
||||
{Src}lastfile.c.x Ä ¶
|
||||
{CONFIG_H_GROUP}
|
||||
|
||||
{Src}lread.c.x Ä ¶
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Includes}sys:types.h" ¶
|
||||
|
@ -935,7 +964,6 @@ DistClean
|
|||
EmacsSource = ¶
|
||||
"{Src}abbrev.c" ¶
|
||||
"{Src}alloc.c" ¶
|
||||
"{Src}alloca.c" ¶
|
||||
"{Src}atimer.c" ¶
|
||||
"{Src}buffer.c" ¶
|
||||
"{Src}bytecode.c" ¶
|
||||
|
@ -964,12 +992,15 @@ EmacsSource =
|
|||
"{Src}fns.c" ¶
|
||||
"{Src}fontset.c" ¶
|
||||
"{Src}frame.c" ¶
|
||||
"{Src}fringe.c" ¶
|
||||
"{Src}getloadavg.c" ¶
|
||||
"{Src}image.c" ¶
|
||||
"{Src}indent.c" ¶
|
||||
"{Src}insdel.c" ¶
|
||||
"{Src}intervals.c" ¶
|
||||
"{Src}keyboard.c" ¶
|
||||
"{Src}keymap.c" ¶
|
||||
"{Src}lastfile.c" ¶
|
||||
"{Src}lread.c" ¶
|
||||
"{Src}macros.c" ¶
|
||||
"{Src}marker.c" ¶
|
||||
|
@ -1017,7 +1048,7 @@ LispSource =
|
|||
{Lisp}international:codepage.elc ¶
|
||||
{Lisp}abbrev.elc ¶
|
||||
{Lisp}buff-menu.elc ¶
|
||||
{Lisp}byte-run.elc ¶
|
||||
{Lisp}emacs-lisp:byte-run.elc ¶
|
||||
{Lisp}cus-start.el ¶
|
||||
{Lisp}custom.elc ¶
|
||||
{Lisp}emacs-lisp:lisp-mode.elc ¶
|
||||
|
@ -1025,7 +1056,7 @@ LispSource =
|
|||
{Lisp}facemenu.elc ¶
|
||||
{Lisp}faces.elc ¶
|
||||
{Lisp}files.elc ¶
|
||||
{Lisp}float-sup.elc ¶
|
||||
{Lisp}emacs-lisp:float-sup.elc ¶
|
||||
{Lisp}format.elc ¶
|
||||
{Lisp}frame.elc ¶
|
||||
{Lisp}help.elc ¶
|
||||
|
@ -1034,7 +1065,7 @@ LispSource =
|
|||
{Lisp}loadup.el ¶
|
||||
{Lisp}loaddefs.el ¶
|
||||
{Lisp}bindings.elc ¶
|
||||
{Lisp}map-ynp.elc ¶
|
||||
{Lisp}emacs-lisp:map-ynp.elc ¶
|
||||
{Lisp}international:mule.elc ¶
|
||||
{Lisp}international:mule-conf.el ¶
|
||||
{Lisp}international:mule-cmds.elc ¶
|
||||
|
|
|
@ -1,6 +1,39 @@
|
|||
2004-12-31 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* dired.texi (Shell Commands in Dired): Delete the ? example.
|
||||
|
||||
* display.texi (Scrolling): Correct scroll-preserve-screen-position.
|
||||
|
||||
* files.texi (Saving): Describe new require-final-newline features
|
||||
and mode-require-final-newline.
|
||||
|
||||
2004-12-31 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc.texi: Mention C-cC-c as the way to finish editing throughout.
|
||||
|
||||
2004-12-29 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* custom.texi (File Variables): Clarify previous change.
|
||||
|
||||
2004-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* frames.texi (Dialog Boxes): Mention Gtk+ 2.6 also, as that version is
|
||||
out now.
|
||||
|
||||
2004-12-27 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* Makefile.in (MAKEINFO): Specify --force.
|
||||
|
||||
* basic.texi (Moving Point): C-e now runs move-end-of-line.
|
||||
(Undo): Doc undo-outer-limit.
|
||||
|
||||
2004-12-11 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* Makefile.in (MAKEINFO): Add --force.
|
||||
|
||||
2004-12-20 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc.texi (Types Tutorial): Emphasized that you can't divide by
|
||||
* calc.texi (Types Tutorial): Emphasize that you can't divide by
|
||||
zero.
|
||||
|
||||
2004-12-17 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
@ -23,6 +56,7 @@
|
|||
the standard "The GNU Emacs Manual" in fifth argument of @xref's.
|
||||
(Dealing with HTTP documents): @inforef->@xref.
|
||||
|
||||
>>>>>>> 1.412
|
||||
2004-12-15 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* mark.texi (Transient Mark, Mark Ring): M-< and other
|
||||
|
@ -39,6 +73,7 @@
|
|||
|
||||
* calc.texi: Fix some TeX definitions.
|
||||
|
||||
>>>>>>> 1.407
|
||||
2004-12-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* misc.texi (FFAP): Add C-x C-r, C-x C-v, C-x C-d,
|
||||
|
@ -52,6 +87,7 @@
|
|||
* mark.texi (Marking Objects): Marking commands also extend the
|
||||
region when mark is active in Transient Mark mode.
|
||||
|
||||
>>>>>>> 1.403
|
||||
2004-12-09 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* reftex.texi (Imprint): Remove erroneous @value's.
|
||||
|
|
|
@ -31,7 +31,8 @@ VPATH=@srcdir@
|
|||
|
||||
|
||||
# The makeinfo program is part of the Texinfo distribution.
|
||||
MAKEINFO = makeinfo
|
||||
# Use --force so that it generates output even if there are errors.
|
||||
MAKEINFO = makeinfo --force
|
||||
INFO_TARGETS = ../info/emacs ../info/emacs-xtra ../info/ccmode ../info/cl \
|
||||
../info/dired-x ../info/ediff ../info/forms ../info/gnus \
|
||||
../info/message ../info/sieve ../info/pgg ../info/emacs-mime \
|
||||
|
|
|
@ -171,7 +171,7 @@ them). Others do more sophisticated things.
|
|||
@kindex UP
|
||||
@kindex DOWN
|
||||
@findex beginning-of-line
|
||||
@findex end-of-line
|
||||
@findex move-end-of-line
|
||||
@findex forward-char
|
||||
@findex backward-char
|
||||
@findex next-line
|
||||
|
@ -185,7 +185,7 @@ them). Others do more sophisticated things.
|
|||
@item C-a
|
||||
Move to the beginning of the line (@code{beginning-of-line}).
|
||||
@item C-e
|
||||
Move to the end of the line (@code{end-of-line}).
|
||||
Move to the end of the line (@code{move-end-of-line}).
|
||||
@item C-f
|
||||
Move forward one character (@code{forward-char}). The right-arrow key
|
||||
does the same thing.
|
||||
|
@ -380,24 +380,32 @@ mark ring (@pxref{Mark Ring}).
|
|||
|
||||
@vindex undo-limit
|
||||
@vindex undo-strong-limit
|
||||
@vindex undo-outer-limit
|
||||
@cindex undo limit
|
||||
When the undo information for a buffer becomes too large, Emacs
|
||||
discards the oldest undo information from time to time (during garbage
|
||||
collection). You can specify how much undo information to keep by
|
||||
setting two variables: @code{undo-limit} and @code{undo-strong-limit}.
|
||||
Their values are expressed in units of bytes of space.
|
||||
setting three variables: @code{undo-limit}, @code{undo-strong-limit},
|
||||
and @code{undo-outer-limit}. Their values are expressed in units of
|
||||
bytes of space.
|
||||
|
||||
The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
|
||||
data for enough commands to reach this size, and perhaps exceed it, but
|
||||
does not keep data for any earlier commands beyond that. Its default
|
||||
value is 20000. The variable @code{undo-strong-limit} sets a stricter
|
||||
limit: the command which pushes the size past this amount is itself
|
||||
forgotten. Its default value is 30000.
|
||||
data for enough commands to reach this size, and perhaps exceed it,
|
||||
but does not keep data for any earlier commands beyond that. Its
|
||||
default value is 20000. The variable @code{undo-strong-limit} sets a
|
||||
stricter limit: a previous command (not the most recent one) which
|
||||
pushes the size past this amount is itself forgotten. The default
|
||||
value of @code{undo-strong-limit} is 30000.
|
||||
|
||||
Regardless of the values of those variables, the most recent change is
|
||||
never discarded, so there is no danger that garbage collection occurring
|
||||
right after an unintentional large change might prevent you from undoing
|
||||
it.
|
||||
Regardless of the values of those variables, the most recent change
|
||||
is never discarded unless it gets bigger than @code{undo-outer-limit}
|
||||
(normally 300,000). At that point, Emacs asks whether to discard the
|
||||
undo information even for the current command. (You also have the
|
||||
option of quitting.) So there is normally no danger that garbage
|
||||
collection occurring right after an unintentional large change might
|
||||
prevent you from undoing it. But if you didn't expect the command
|
||||
to create such large undo data, you can get rid of it and prevent
|
||||
Emacs from running out of memory.
|
||||
|
||||
The reason the @code{undo} command has two keys, @kbd{C-x u} and
|
||||
@kbd{C-_}, set up to run it is that it is worthy of a single-character
|
||||
|
|
147
man/calc.texi
147
man/calc.texi
|
@ -2666,7 +2666,7 @@ fit on a typical screen, either, so you will have to use horizontal
|
|||
scrolling to see them all. Press @kbd{<} and @kbd{>} to scroll the
|
||||
stack window left and right by half its width. Another way to view
|
||||
something large is to press @kbd{`} (back-quote) to edit the top of
|
||||
stack in a separate window. (Press @kbd{M-# M-#} when you are done.)
|
||||
stack in a separate window. (Press @kbd{C-c C-c} when you are done.)
|
||||
|
||||
You can enter non-decimal numbers using the @kbd{#} symbol, too.
|
||||
Let's see what the hexadecimal number @samp{5FE} looks like in
|
||||
|
@ -5588,8 +5588,8 @@ having to retype it.
|
|||
@end smallexample
|
||||
|
||||
To edit a variable, type @kbd{s e} and the variable name, use regular
|
||||
Emacs editing commands as necessary, then type @kbd{M-# M-#} or
|
||||
@kbd{C-c C-c} to store the edited value back into the variable.
|
||||
Emacs editing commands as necessary, then type @kbd{C-c C-c} to store
|
||||
the edited value back into the variable.
|
||||
You can also use @w{@kbd{s e}} to create a new variable if you wish.
|
||||
|
||||
Notice that the first time you use each rule, Calc puts up a ``compiling''
|
||||
|
@ -6381,7 +6381,7 @@ calc-kbd-pop # Restore values (Z ')
|
|||
@end smallexample
|
||||
|
||||
@noindent
|
||||
Press @kbd{M-# M-#} to finish editing and return to the Calculator.
|
||||
Press @kbd{C-c C-c} to finish editing and return to the Calculator.
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
|
@ -11712,26 +11712,26 @@ calculator, and a variable in a programming language. (In fact, a Calc
|
|||
variable is really just an Emacs Lisp variable that contains a Calc number
|
||||
or formula.) A variable's name is normally composed of letters and digits.
|
||||
Calc also allows apostrophes and @code{#} signs in variable names.
|
||||
The Calc variable @code{foo} corresponds to the Emacs Lisp variable
|
||||
@code{var-foo}. Commands like @kbd{s s} (@code{calc-store}) that operate
|
||||
on variables can be made to use any arbitrary Lisp variable simply by
|
||||
backspacing over the @samp{var-} prefix in the minibuffer.
|
||||
(The Calc variable @code{foo} corresponds to the Emacs Lisp variable
|
||||
@code{var-foo}, but unless you access the variable from within Emacs
|
||||
Lisp, you don't need to worry about it. Variable names in algebraic
|
||||
formulas implicitly have @samp{var-} prefixed to their names. The
|
||||
@samp{#} character in variable names used in algebraic formulas
|
||||
corresponds to a dash @samp{-} in the Lisp variable name. If the name
|
||||
contains any dashes, the prefix @samp{var-} is @emph{not} automatically
|
||||
added. Thus the two formulas @samp{foo + 1} and @samp{var#foo + 1} both
|
||||
refer to the same variable.)
|
||||
|
||||
In a command that takes a variable name, you can either type the full
|
||||
name of a variable, or type a single digit to use one of the special
|
||||
convenience variables @code{var-q0} through @code{var-q9}. For example,
|
||||
@kbd{3 s s 2} stores the number 3 in variable @code{var-q2}, and
|
||||
convenience variables @code{q0} through @code{q9}. For example,
|
||||
@kbd{3 s s 2} stores the number 3 in variable @code{q2}, and
|
||||
@w{@kbd{3 s s foo @key{RET}}} stores that number in variable
|
||||
@code{var-foo}.
|
||||
@code{foo}.
|
||||
|
||||
To push a variable itself (as opposed to the variable's value) on the
|
||||
stack, enter its name as an algebraic expression using the apostrophe
|
||||
(@key{'}) key. Variable names in algebraic formulas implicitly have
|
||||
@samp{var-} prefixed to their names. The @samp{#} character in variable
|
||||
names used in algebraic formulas corresponds to a dash @samp{-} in the
|
||||
Lisp variable name. If the name contains any dashes, the prefix @samp{var-}
|
||||
is @emph{not} automatically added. Thus the two formulas @samp{foo + 1}
|
||||
and @samp{var#foo + 1} both refer to the same variable.
|
||||
(@key{'}) key.
|
||||
|
||||
@kindex =
|
||||
@pindex calc-evaluate
|
||||
|
@ -11884,10 +11884,10 @@ an infix operator preferentially (modulo, in this case), so you would
|
|||
need to write @samp{(5%)-2} to get the former interpretation.
|
||||
|
||||
@cindex Function call notation
|
||||
A function call is, e.g., @samp{sin(1+x)}. Function names follow the same
|
||||
rules as variable names except that the default prefix @samp{calcFunc-} is
|
||||
used (instead of @samp{var-}) for the internal Lisp form.
|
||||
Most mathematical Calculator commands like
|
||||
A function call is, e.g., @samp{sin(1+x)}. (The Calc algebraic function
|
||||
@code{foo} corresponds to the Emacs Lisp function @code{calcFunc-foo},
|
||||
but unless you access the function from within Emacs Lisp, you don't
|
||||
need to worry about it.) Most mathematical Calculator commands like
|
||||
@code{calc-sin} have function equivalents like @code{sin}.
|
||||
If no Lisp function is defined for a function called by a formula, the
|
||||
call is left as it is during algebraic manipulation: @samp{f(x+y)} is
|
||||
|
@ -12059,13 +12059,11 @@ regular Emacs commands. With a numeric prefix argument, it edits the
|
|||
specified number of stack entries at once. (An argument of zero edits
|
||||
the entire stack; a negative argument edits one specific stack entry.)
|
||||
|
||||
When you are done editing, press @kbd{M-# M-#} to finish and return
|
||||
When you are done editing, press @kbd{C-c C-c} to finish and return
|
||||
to Calc. The @key{RET} and @key{LFD} keys also work to finish most
|
||||
sorts of editing, though in some cases Calc leaves @key{RET} with its
|
||||
usual meaning (``insert a newline'') if it's a situation where you
|
||||
might want to insert new lines into the editing buffer. The traditional
|
||||
Emacs ``finish'' key sequence, @kbd{C-c C-c}, also works to finish
|
||||
editing and may be easier to type, depending on your keyboard.
|
||||
might want to insert new lines into the editing buffer.
|
||||
|
||||
When you finish editing, the Calculator parses the lines of text in
|
||||
the @samp{*Calc Edit*} buffer as numbers or formulas, replaces the
|
||||
|
@ -12073,18 +12071,18 @@ original stack elements in the original buffer with these new values,
|
|||
then kills the @samp{*Calc Edit*} buffer. The original Calculator buffer
|
||||
continues to exist during editing, but for best results you should be
|
||||
careful not to change it until you have finished the edit. You can
|
||||
also cancel the edit by pressing @kbd{M-# x}.
|
||||
also cancel the edit by killing the buffer with @kbd{C-x k}.
|
||||
|
||||
The formula is normally reevaluated as it is put onto the stack.
|
||||
For example, editing @samp{a + 2} to @samp{3 + 2} and pressing
|
||||
@kbd{M-# M-#} will push 5 on the stack. If you use @key{LFD} to
|
||||
@kbd{C-c C-c} will push 5 on the stack. If you use @key{LFD} to
|
||||
finish, Calc will put the result on the stack without evaluating it.
|
||||
|
||||
If you give a prefix argument to @kbd{M-# M-#} (or @kbd{C-c C-c}),
|
||||
If you give a prefix argument to @kbd{C-c C-c},
|
||||
Calc will not kill the @samp{*Calc Edit*} buffer. You can switch
|
||||
back to that buffer and continue editing if you wish. However, you
|
||||
should understand that if you initiated the edit with @kbd{`}, the
|
||||
@kbd{M-# M-#} operation will be programmed to replace the top of the
|
||||
@kbd{C-c C-c} operation will be programmed to replace the top of the
|
||||
stack with the new edited value, and it will do this even if you have
|
||||
rearranged the stack in the meanwhile. This is not so much of a problem
|
||||
with other editing commands, though, such as @kbd{s e}
|
||||
|
@ -14139,7 +14137,7 @@ mode is the same as @samp{a_i} in Normal mode. Assignments
|
|||
turn into the @code{assign} function, which Calc normally displays
|
||||
using the @samp{:=} symbol.
|
||||
|
||||
The variables @code{var-pi} and @code{var-e} would be displayed @samp{pi}
|
||||
The variables @code{pi} and @code{e} would be displayed @samp{pi}
|
||||
and @samp{e} in Normal mode, but in C mode they are displayed as
|
||||
@samp{M_PI} and @samp{M_E}, corresponding to the names of constants
|
||||
typically provided in the @file{<math.h>} header. Functions whose
|
||||
|
@ -15264,8 +15262,8 @@ unrelated to the syntax tables described in the Emacs manual.)
|
|||
The @kbd{Z S} (@code{calc-edit-user-syntax}) command edits the
|
||||
syntax table for the current language mode. If you want your
|
||||
syntax to work in any language, define it in the Normal language
|
||||
mode. Type @kbd{M-# M-#} to finish editing the syntax table, or
|
||||
@kbd{M-# x} to cancel the edit. The @kbd{m m} command saves all
|
||||
mode. Type @kbd{C-c C-c} to finish editing the syntax table, or
|
||||
@kbd{C-x k} to cancel the edit. The @kbd{m m} command saves all
|
||||
the syntax tables along with the other mode settings;
|
||||
@pxref{General Mode Commands}.
|
||||
|
||||
|
@ -17220,7 +17218,9 @@ the corresponding generalized time zone (like @code{PGT}).
|
|||
|
||||
If your system does not have a suitable @samp{date} command, you
|
||||
may wish to put a @samp{(setq var-TimeZone ...)} in your Emacs
|
||||
initialization file to set the time zone. The easiest way to do
|
||||
initialization file to set the time zone. (Since you are interacting
|
||||
with the variable @code{TimeZone} directly from Emacs Lisp, the
|
||||
@code{var-} prefix needs to be present.) The easiest way to do
|
||||
this is to edit the @code{TimeZone} variable using Calc's @kbd{s T}
|
||||
command, then use the @kbd{s p} (@code{calc-permanent-variable})
|
||||
command to save the value of @code{TimeZone} permanently.
|
||||
|
@ -21807,7 +21807,7 @@ The @kbd{j D} command is implemented using rewrite rules.
|
|||
@xref{Selections with Rewrite Rules}. The rules are stored in
|
||||
the Calc variable @code{DistribRules}. A convenient way to view
|
||||
these rules is to use @kbd{s e} (@code{calc-edit-variable}) which
|
||||
displays and edits the stored value of a variable. Press @kbd{M-# M-#}
|
||||
displays and edits the stored value of a variable. Press @kbd{C-c C-c}
|
||||
to return from editing mode; be careful not to make any actual changes
|
||||
or else you will affect the behavior of future @kbd{j D} commands!
|
||||
|
||||
|
@ -23583,7 +23583,7 @@ on variables, but you can use the @kbd{a b} (@code{calc-substitute})
|
|||
command to substitute actual values for function calls like @samp{as(3)}.
|
||||
|
||||
The @kbd{s G} (@code{calc-edit-GenCount}) command is a convenient
|
||||
way to create or edit this variable. Press @kbd{M-# M-#} to finish.
|
||||
way to create or edit this variable. Press @kbd{C-c C-c} to finish.
|
||||
|
||||
If you have not stored a value in @code{GenCount}, or if the value
|
||||
in that variable is not a positive integer, the regular
|
||||
|
@ -27847,14 +27847,8 @@ to variables use the @kbd{s} prefix key.
|
|||
The @kbd{s s} (@code{calc-store}) command stores the value at the top of
|
||||
the stack into a specified variable. It prompts you to enter the
|
||||
name of the variable. If you press a single digit, the value is stored
|
||||
immediately in one of the ``quick'' variables @code{var-q0} through
|
||||
@code{var-q9}. Or you can enter any variable name. The prefix @samp{var-}
|
||||
is supplied for you; when a name appears in a formula (as in @samp{a+q2})
|
||||
the prefix @samp{var-} is also supplied there, so normally you can simply
|
||||
forget about @samp{var-} everywhere. Its only purpose is to enable you to
|
||||
use Calc variables without fear of accidentally clobbering some variable in
|
||||
another Emacs package. If you really want to store in an arbitrary Lisp
|
||||
variable, just backspace over the @samp{var-}.
|
||||
immediately in one of the ``quick'' variables @code{q0} through
|
||||
@code{q9}. Or you can enter any variable name.
|
||||
|
||||
@kindex s t
|
||||
@pindex calc-store-into
|
||||
|
@ -28038,10 +28032,10 @@ you change the value of one of these variables, or of one of the other
|
|||
special variables @code{inf}, @code{uinf}, and @code{nan} (which are
|
||||
normally void).
|
||||
|
||||
Note that @code{var-pi} doesn't actually have 3.14159265359 stored
|
||||
Note that @code{pi} doesn't actually have 3.14159265359 stored
|
||||
in it, but rather a special magic value that evaluates to @cpi{}
|
||||
at the current precision. Likewise @code{var-e}, @code{var-i}, and
|
||||
@code{var-phi} evaluate according to the current precision or polar mode.
|
||||
at the current precision. Likewise @code{e}, @code{i}, and
|
||||
@code{phi} evaluate according to the current precision or polar mode.
|
||||
If you recall a value from @code{pi} and store it back, this magic
|
||||
property will be lost.
|
||||
|
||||
|
@ -28052,9 +28046,9 @@ value of one variable to another. It differs from a simple @kbd{s r}
|
|||
followed by an @kbd{s t} in two important ways. First, the value never
|
||||
goes on the stack and thus is never rounded, evaluated, or simplified
|
||||
in any way; it is not even rounded down to the current precision.
|
||||
Second, the ``magic'' contents of a variable like @code{var-e} can
|
||||
Second, the ``magic'' contents of a variable like @code{e} can
|
||||
be copied into another variable with this command, perhaps because
|
||||
you need to unstore @code{var-e} right now but you wish to put it
|
||||
you need to unstore @code{e} right now but you wish to put it
|
||||
back when you're done. The @kbd{s c} command is the only way to
|
||||
manipulate these magic values intact.
|
||||
|
||||
|
@ -28093,7 +28087,7 @@ value of a variable without ever putting that value on the stack
|
|||
or simplifying or evaluating the value. It prompts for the name of
|
||||
the variable to edit. If the variable has no stored value, the
|
||||
editing buffer will start out empty. If the editing buffer is
|
||||
empty when you press @kbd{M-# M-#} to finish, the variable will
|
||||
empty when you press @kbd{C-c C-c} to finish, the variable will
|
||||
be made void. @xref{Editing Stack Entries}, for a general
|
||||
description of editing.
|
||||
|
||||
|
@ -28216,7 +28210,7 @@ by hand. (@xref{General Mode Commands}, for a way to tell Calc to
|
|||
use a different file instead of @file{.emacs}.)
|
||||
|
||||
If you do not specify the name of a variable to save (i.e.,
|
||||
@kbd{s p @key{RET}}), all @samp{var-} variables with defined values
|
||||
@kbd{s p @key{RET}}), all Calc variables with defined values
|
||||
are saved except for the special constants @code{pi}, @code{e},
|
||||
@code{i}, @code{phi}, and @code{gamma}; the variables @code{TimeZone}
|
||||
and @code{PlotRejects};
|
||||
|
@ -28228,8 +28222,9 @@ explicitly naming them in an @kbd{s p} command.)
|
|||
@kindex s i
|
||||
@pindex calc-insert-variables
|
||||
The @kbd{s i} (@code{calc-insert-variables}) command writes
|
||||
the values of all @samp{var-} variables into a specified buffer.
|
||||
The variables are written in the form of Lisp @code{setq} commands
|
||||
the values of all Calc variables into a specified buffer.
|
||||
The variables are written with the prefix @code{var-} in the form of
|
||||
Lisp @code{setq} commands
|
||||
which store the values in string form. You can place these commands
|
||||
in your @file{.emacs} buffer if you wish, though in this case it
|
||||
would be easier to use @kbd{s p @key{RET}}. (Note that @kbd{s i}
|
||||
|
@ -28939,7 +28934,7 @@ dumb terminals will be
|
|||
@texline @math{80\times24}
|
||||
@infoline 80x24
|
||||
characters. The graph is displayed in
|
||||
an Emacs ``recursive edit''; type @kbd{q} or @kbd{M-# M-#} to exit
|
||||
an Emacs ``recursive edit''; type @kbd{q} or @kbd{C-c C-c} to exit
|
||||
the recursive edit and return to Calc. Note that the @code{dumb}
|
||||
device is present only in GNUPLOT 3.0 and later versions.
|
||||
|
||||
|
@ -30119,7 +30114,7 @@ by holding down Shift and Meta and alternately typing two keys.)
|
|||
The @kbd{M-# `} (@code{calc-embedded-edit}) command edits the
|
||||
embedded formula at the current point as if by @kbd{`} (@code{calc-edit}).
|
||||
Embedded mode does not have to be enabled for this to work. Press
|
||||
@kbd{M-# M-#} to finish the edit, or @kbd{M-# x} to cancel.
|
||||
@kbd{C-c C-c} to finish the edit, or @kbd{C-x k} to cancel.
|
||||
|
||||
@node Assignments in Embedded Mode, Mode Settings in Embedded Mode, More About Embedded Mode, Embedded Mode
|
||||
@section Assignments in Embedded Mode
|
||||
|
@ -30743,15 +30738,14 @@ command bound to the key. After @kbd{Z F} and @kbd{Z C}, a given user
|
|||
key could invoke a command, which in turn calls an algebraic function,
|
||||
which might have one or more special display formats. A single @kbd{Z P}
|
||||
command will save all of these definitions.
|
||||
|
||||
To save a command or function without its key binding (or if there is
|
||||
no key binding for the command or function), type @kbd{'} (the apostrophe)
|
||||
when prompted for a key. Then, type the function name, or backspace
|
||||
to change the @samp{calcFunc-} prefix to @samp{calc-} and enter a
|
||||
command name. (If the command you give implies a function, the function
|
||||
will be saved, and if the function has any display formats, those will
|
||||
be saved, but not the other way around: Saving a function will not save
|
||||
any commands or key bindings associated with the function.)
|
||||
To save an algebraic function, type @kbd{'} (the apostrophe)
|
||||
when prompted for a key, and type the function name. To save a command
|
||||
without its key binding, type @kbd{M-x} and enter a function name. (The
|
||||
@samp{calc-} prefix will automatically be inserted for you.)
|
||||
(If the command you give implies a function, the function will be saved,
|
||||
and if the function has any display formats, those will be saved, but
|
||||
not the other way around: Saving a function will not save any commands
|
||||
or key bindings associated with the function.)
|
||||
|
||||
@kindex Z E
|
||||
@pindex calc-user-define-edit
|
||||
|
@ -30837,14 +30831,14 @@ been defined by a keyboard macro tries to use the @code{edit-kbd-macro}
|
|||
command to edit the macro. This command may be found in the
|
||||
@file{macedit} package, a copy of which comes with Calc. It decomposes
|
||||
the macro definition into full Emacs command names, like @code{calc-pop}
|
||||
and @code{calc-add}. Type @kbd{M-# M-#} to finish editing and update
|
||||
the definition stored on the key, or, to cancel the edit, type
|
||||
@kbd{M-# x}.
|
||||
and @code{calc-add}. Type @kbd{C-c C-c} to finish editing and update
|
||||
the definition stored on the key, or, to cancel the edit, kill the
|
||||
buffer with @kbd{C-x k}.
|
||||
|
||||
If you give a negative numeric prefix argument to @kbd{Z E}, the keyboard
|
||||
macro is edited in spelled-out keystroke form. For example, the editing
|
||||
buffer might contain the nine characters @w{@samp{1 @key{RET} 2 +}}. When you press
|
||||
@kbd{M-# M-#}, the @code{read-kbd-macro} feature of the @file{macedit}
|
||||
@kbd{C-c C-c}, the @code{read-kbd-macro} feature of the @file{macedit}
|
||||
package is used to reinterpret these key names. The
|
||||
notations @code{RET}, @code{LFD}, @code{TAB}, @code{SPC}, @code{DEL}, and
|
||||
@code{NUL} must be written in all uppercase, as must the prefixes @code{C-}
|
||||
|
@ -31191,9 +31185,11 @@ If you want to give the formula a long-style name only, you can press
|
|||
@kbd{Z F @key{RET} spam @key{RET}} defines the new command as
|
||||
@kbd{M-x calc-spam}, with no keyboard equivalent.
|
||||
|
||||
The third prompt is for a function name. The default is to use the same
|
||||
name as the command name but with @samp{calcFunc-} in place of
|
||||
@samp{calc-}. This is the name you will use if you want to enter your
|
||||
The third prompt is for an algebraic function name. The default is to
|
||||
use the same name as the command name but without the @samp{calc-}
|
||||
prefix. (If this is of the form @samp{User-m}, the hyphen is removed so
|
||||
it won't be taken for a minus sign in algebraic formulas.)
|
||||
This is the name you will use if you want to enter your
|
||||
new function in an algebraic formula. Suppose we enter @kbd{yow @key{RET}}.
|
||||
Then the new function can be invoked by pushing two numbers on the
|
||||
stack and typing @kbd{z m} or @kbd{x spam}, or by entering the algebraic
|
||||
|
@ -31252,8 +31248,9 @@ by a @kbd{Z F} command.
|
|||
|
||||
The @kbd{Z E} (@code{calc-user-define-edit}) command on a key that has
|
||||
been defined by a formula uses a variant of the @code{calc-edit} command
|
||||
to edit the defining formula. Press @kbd{M-# M-#} to finish editing and
|
||||
store the new formula back in the definition, or @kbd{M-# x} to
|
||||
to edit the defining formula. Press @kbd{C-c C-c} to finish editing and
|
||||
store the new formula back in the definition, or kill the buffer with
|
||||
@kbd{C-x k} to
|
||||
cancel the edit. (The argument list and other properties of the
|
||||
definition are unchanged; to adjust the argument list, you can use
|
||||
@kbd{Z G} to grab the function onto the stack, edit with @kbd{`}, and
|
||||
|
@ -35727,9 +35724,9 @@ Variable name may be a single digit or a full name.
|
|||
|
||||
@c 30
|
||||
@item
|
||||
Editing occurs in a separate buffer. Press @kbd{M-# M-#} (or @kbd{C-c C-c},
|
||||
@key{LFD}, or in some cases @key{RET}) to finish the edit, or press
|
||||
@kbd{M-# x} to cancel the edit. The @key{LFD} key prevents evaluation
|
||||
Editing occurs in a separate buffer. Press @kbd{C-c C-c} (or
|
||||
@key{LFD}, or in some cases @key{RET}) to finish the edit, or kill the
|
||||
buffer with @kbd{C-x k} to cancel the edit. The @key{LFD} key prevents evaluation
|
||||
of the result of the edit.
|
||||
|
||||
@c 31
|
||||
|
|
|
@ -1042,22 +1042,26 @@ Here's an example of doing this:
|
|||
@end example
|
||||
|
||||
Some ``variable names'' have special meanings in a local variables
|
||||
list: a value for the variable @code{mode} really sets the major mode,
|
||||
and a value for the variable @code{eval} is simply evaluated as an
|
||||
expression and the value is ignored. @code{coding}, @code{unibyte},
|
||||
@code{mode} and @code{eval} are not real variables; setting variables
|
||||
named @code{coding}, @code{unibyte}, @code{mode} and @code{eval} in any
|
||||
other context has no special meaning. @emph{If @code{mode} is used to
|
||||
set a major mode, it should be the first ``variable'' in the list.}
|
||||
Otherwise, the entries that precede it in the list of the local
|
||||
variables are likely to be ignored, since most modes kill all local
|
||||
variables as part of their initialization.
|
||||
list. Specifying the ``variable'' @code{mode} really sets the major
|
||||
mode, while any value specified for the ``variable'' @code{eval} is
|
||||
simply evaluated as an expression (its value is ignored). A value for
|
||||
@code{coding} specifies the coding system for character code
|
||||
conversion of this file, and a value of @code{t} for @code{unibyte}
|
||||
says to visit the file in a unibyte buffer. These four ``variables''
|
||||
are not really variables; setting them in any other context has no
|
||||
special meaning.
|
||||
|
||||
You can use the @code{mode} ``variable'' to set minor modes as well as
|
||||
major modes; in fact, you can use it more than once, first to set the
|
||||
major mode and then to set minor modes which are specific to particular
|
||||
buffers. But most minor modes should not be specified in the file in
|
||||
any fashion, because they represent user preferences.
|
||||
@emph{If @code{mode} is used to set a major mode, it should be the
|
||||
first ``variable'' in the list.} Otherwise, the entries that precede
|
||||
it will usually be ignored, since most modes kill all local variables
|
||||
as part of their initialization.
|
||||
|
||||
You can use the @code{mode} ``variable'' to set minor modes as well
|
||||
as the major modes; in fact, you can use it more than once, first to
|
||||
set the major mode and then to set minor modes which are specific to
|
||||
particular buffers. But most minor modes should not be specified in
|
||||
the file at all, regardless of how, because they represent user
|
||||
preferences.
|
||||
|
||||
For example, you may be tempted to try to turn on Auto Fill mode with
|
||||
a local variable list. That is a mistake. The choice of Auto Fill mode
|
||||
|
|
|
@ -700,26 +700,18 @@ file.
|
|||
If the command string contains @samp{?} surrounded by whitespace, the
|
||||
current file name is substituted for @samp{?}. You can use @samp{?}
|
||||
this way more than once in the command, and each occurrence is
|
||||
replaced. For instance, here is how to uuencode each file, making the
|
||||
output file name by appending @samp{.uu} to the input file name:
|
||||
|
||||
@example
|
||||
uuencode ? ? > ?.uu
|
||||
@end example
|
||||
replaced.
|
||||
@end itemize
|
||||
|
||||
To iterate over the file names in a more complicated fashion, use an
|
||||
explicit shell loop. For example, this shell command is another way
|
||||
to uuencode each file:
|
||||
explicit shell loop. For example, here is how to uuencode each file,
|
||||
making the output file name by appending @samp{.uu} to the input file
|
||||
name:
|
||||
|
||||
@example
|
||||
for file in * ; do uuencode "$file" "$file" >"$file".uu; done
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
This simple example doesn't require a shell loop (you can do it
|
||||
with @samp{?}, but it illustrates the technique.
|
||||
|
||||
The working directory for the shell command is the top-level directory
|
||||
of the Dired buffer.
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue