mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 05:17:35 +00:00
Merged in changes from CVS head
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-5 Add =cvs-sync-make-log script * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-6 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-7 Use absolute tla-tools filenames in =cvs-sync-make-log * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-8 Use proper arch-tag: syntax for lispintro/texinfo.tex * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-9 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-24
This commit is contained in:
commit
7c3a261587
81 changed files with 2167 additions and 1225 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2003-12-30 Eli Zaretskii <eliz@elta.co.il>
|
||||
|
||||
* INSTALL.CVS: Renamed from INSTALL-CVS to avoid file-name
|
||||
clashes with install-sh on 8+3 filesystems.
|
||||
|
||||
2003-12-08 Miles Bader <miles@gnu.org>
|
||||
|
||||
* .cvsignore: Add .arch-inventory.
|
||||
|
|
|
|||
0
INSTALL-CVS → INSTALL.CVS
Executable file → Normal file
0
INSTALL-CVS → INSTALL.CVS
Executable file → Normal file
|
|
@ -1,3 +1,7 @@
|
|||
2003-12-29 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
|
||||
|
||||
* TUTORIAL.bg: Use windows-1251 encoding. Fix punctuation errors.
|
||||
|
||||
2003-11-21 Lars Hansen <larsh@math.ku.dk>
|
||||
|
||||
* TODO: Add plans for change of file attributes UID and GID from
|
||||
|
|
|
|||
8
etc/NEWS
8
etc/NEWS
|
|
@ -1734,6 +1734,11 @@ configuration files.
|
|||
|
||||
* Lisp Changes in Emacs 21.4
|
||||
|
||||
** The function `insert-for-yank' now supports strings where the
|
||||
`yank-handler' property does not span the first character of the
|
||||
string. The old behavior is available if you call
|
||||
`insert-for-yank-1' instead.
|
||||
|
||||
** New function `get-char-property-and-overlay' accepts the same
|
||||
arguments as `get-char-property' and returns a cons whose car is the
|
||||
return value of `get-char-property' called with those arguments and
|
||||
|
|
@ -7260,7 +7265,8 @@ Additional image properties supported are:
|
|||
`:index INDEX'
|
||||
|
||||
INDEX must be an integer >= 0. Load image number INDEX from a
|
||||
multi-image GIF file. An error is signaled if INDEX is too large.
|
||||
multi-image GIF file. If INDEX is too large, the image displays
|
||||
as a hollow box.
|
||||
|
||||
This could be used to implement limited support for animated GIFs.
|
||||
For example, the following function displays a multi-image GIF file
|
||||
|
|
|
|||
1802
etc/TUTORIAL.bg
1802
etc/TUTORIAL.bg
File diff suppressed because it is too large
Load diff
213
lisp/ChangeLog
213
lisp/ChangeLog
|
|
@ -1,3 +1,192 @@
|
|||
2003-12-30 Eli Zaretskii <eliz@elta.co.il>
|
||||
|
||||
* mail/rmail.el (rmail-convert-to-babyl-format): Fix off-by-one
|
||||
error in arguments to base64-decode-region. Remove ^M characters
|
||||
after decoding base64.
|
||||
|
||||
2003-12-30 Simon Josefsson <jas@extundo.com>
|
||||
|
||||
* textmodes/texinfo.el: Change maintainer to FSF. Suggested by
|
||||
karl@freefriends.org (Karl Berry), since the Texinfo Elisp files
|
||||
have only been distributed with Emacs for some years.
|
||||
(texinfo-mode-hook): Customize.
|
||||
|
||||
2003-12-30 Eli Zaretskii <eliz@elta.co.il>
|
||||
|
||||
* mail/rmail.el (rmail-convert-to-babyl-format): Make the code
|
||||
cleaner (suggested by Richard Stallman).
|
||||
|
||||
* progmodes/gud.el (gud-tool-bar-map): Modify names of icon files
|
||||
for gud-next, gud-nexti, gud-step and gud-stepi to prevent
|
||||
file-name clashes on 8+3 DOS filesystems.
|
||||
|
||||
* toolbar/gud-next.pbm, toolbar/gud-next.xpm
|
||||
* toolbar/gud-nexti.pbm, toolbar/gud-nexti.xpm
|
||||
* toolbar/gud-step.pbm, toolbar/gud-step.xpm
|
||||
* toolbar/gud-stepi.pbm, toolbar/gud-stepi.xpm: Renamed to
|
||||
gud-n.*, gud-ni.*, gud-s.*, and gud-si.*, respectively, to avoid
|
||||
file-name clashes on 8+3 filesystems.
|
||||
|
||||
* emacs-lisp/tcover-unsafep.el, emacs-lisp/tcover-ses.el: Renamed
|
||||
from testcover-unsafep.el and testcover-ses.el to avoid file-name
|
||||
clashes on 8+3 DOS filesystems.
|
||||
|
||||
2003-12-29 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* textmodes/flyspell.el (mail-mode-flyspell-verify):
|
||||
Search for header separator alone on a line, literally,
|
||||
and search for it backward, not forward.
|
||||
(flyspell-abbrev-table): Always use global-abbrev-table
|
||||
if there is no local one.
|
||||
|
||||
* progmodes/sh-script.el (sh-get-indent-info):
|
||||
Don't move point back if at bob.
|
||||
|
||||
* progmodes/antlr-mode.el (save-buffer-state-x): Use with-no-warnings.
|
||||
|
||||
* play/handwrite.el (handwrite): Make the handwrite credit message
|
||||
a comment rather than an output command.
|
||||
|
||||
* obsolete/sc.el: Display message that this file is obsolete.
|
||||
|
||||
* net/ange-ftp.el (ange-ftp-start-process): Copy the environment.
|
||||
|
||||
* mail/rfc822.el (rfc822-address-start): Declare variable.
|
||||
Renamed from address-start. All uses changed.
|
||||
|
||||
* term.el (term-exec): Set up sentinel.
|
||||
(term-sentinel): New function.
|
||||
(term-handle-exit): New function.
|
||||
|
||||
* subr.el (assoc-ignore-case, assoc-ignore-representation):
|
||||
Use assoc-string, and mark them obsolete.
|
||||
(delay-mode-hooks): Mark as permanent local.
|
||||
|
||||
* simple.el (sendmail-user-agent-compose): Use assoc-string.
|
||||
|
||||
* register.el (copy-rectangle-to-register): Doc fix.
|
||||
|
||||
* info.el (Info-insert-dir): Use assoc-string.
|
||||
|
||||
* info-look.el (info-lookup): Use assoc-string.
|
||||
|
||||
* frame.el (pop-up-frame-function): Use quote, not `function'.
|
||||
(frame-notice-user-settings): Calculate ADJUSTED-TOP
|
||||
copying with lists as coordinate values.
|
||||
|
||||
* font-lock.el (font-lock-after-change-function): Bind inhibit-quit.
|
||||
|
||||
* find-dired.el (kill-find): New command.
|
||||
(find-dired): Make buffer read-only.
|
||||
Set up a keymap with C-c C-k running kill-find.
|
||||
(find-dired-filter, find-dired-sentinel): Bind inhibit-read-only.
|
||||
|
||||
* files.el (backup-buffer-copy): If MODES is nil, don't set modes.
|
||||
|
||||
* filecache.el (file-cache-ignore-case): New variable.
|
||||
(file-cache-assoc-function): Var deleted. Use assoc-string instead.
|
||||
|
||||
* comint.el (comint-arguments): Set COUNT after ARGS is complete.
|
||||
(comint-dynamic-complete-as-filename): Rename local vars.
|
||||
(comint-dynamic-list-filename-completions): Likewise.
|
||||
|
||||
* comint.el (comint-dynamic-list-completions-config): New var.
|
||||
(comint-dynamic-list-completions): Handle both SPC and TAB right.
|
||||
|
||||
* comint.el (comint-file-name-chars): Add [].
|
||||
(comint-word): Use skip-chars-backward, not search.
|
||||
|
||||
* shell.el (shell-file-name-chars): Add [].
|
||||
|
||||
* shell.el (shell-dynamic-complete-as-command): Rename local vars.
|
||||
|
||||
* bookmark.el (bookmark-get-bookmark): Use assoc-string.
|
||||
|
||||
* generic.el (define-generic-mode): Doc fix.
|
||||
|
||||
2003-12-29 Eli Zaretskii <eliz@elta.co.il>
|
||||
|
||||
* files.el (kill-some-buffers): Doc fix.
|
||||
|
||||
2003-12-29 David Herring <sdh6@ra.msstate.edu> (tiny change)
|
||||
|
||||
* comint.el (comint-watch-for-password-prompt): Pass `string' as
|
||||
arg to send-invisible
|
||||
(send-invisible): Doc fix. The argument is now a prompt, not the
|
||||
string to send.
|
||||
(comint-read-noecho): Doc fix.
|
||||
|
||||
2003-12-29 Michael R. Wolf <MichaelRWolf@att.net> (tiny change)
|
||||
|
||||
* net/ange-ftp.el (ange-ftp-name-format): Allow USER to contain
|
||||
"@", as required by some ISP hosting service. Fix defcustom
|
||||
argument syntax errors that prevented use of customization.
|
||||
|
||||
2003-12-29 Eli Zaretskii <eliz@elta.co.il>
|
||||
|
||||
* xml.el (xml-get-attribute-or-nil): Doc fix.
|
||||
|
||||
2003-12-29 Peter 'Luna' Runestig <peter@runestig.com>
|
||||
|
||||
* net/zone-mode.el (zone-mode): Use write-file-functions, not
|
||||
write-file-hooks.
|
||||
|
||||
2003-12-29 Eric Hanchrow <offby1@blarg.net> (tiny change)
|
||||
|
||||
* autorevert.el (auto-revert-interval): Doc fix.
|
||||
|
||||
2003-12-29 Mark A. Hershberger <mah@everybody.org>
|
||||
|
||||
* xml.el (xml-get-attribute-or-nil): New function, like
|
||||
xml-get-attribute, but returns nil if the attribute was not found.
|
||||
(xml-get-attribute): Converted to defsubst, uses
|
||||
xml-get-attribute-or-nil.
|
||||
|
||||
2003-12-29 Eli Zaretskii <eliz@elta.co.il>
|
||||
|
||||
* emacs-lisp/easymenu.el (easy-menu-define): Doc fix.
|
||||
|
||||
2003-12-29 Alex Schroeder <alex@emacswiki.org> (tiny change)
|
||||
|
||||
* custom.el (custom-declare-theme): Use `value' when putting
|
||||
properties on `theme'.
|
||||
|
||||
2003-12-29 Takaaki Ota <Takaaki.Ota@am.sony.com>
|
||||
|
||||
* subr.el (insert-for-yank): Call insert-for-yank-1 repetitively
|
||||
for each yank-handler segment.
|
||||
(insert-for-yank-1): New function, with the body of the previous
|
||||
insert-for-yank.
|
||||
|
||||
* textmodes/table.el (table-yank-handler): New defcustom.
|
||||
(table--put-cell-indicator-property): Put yank-handler property
|
||||
that indicates the yank handler for the table cell.
|
||||
|
||||
2003-12-29 Jesper Harder <harder@ifa.au.dk> (tiny change)
|
||||
|
||||
* generic-x.el (etc-modules-conf-generic-mode): A more complete
|
||||
set of keywords.
|
||||
|
||||
2003-12-29 Eli Zaretskii <eliz@elta.co.il>
|
||||
|
||||
* international/mule-cmds.el (reset-language-environment)
|
||||
(set-language-environment): Don't invoke fontset-related functions
|
||||
if fontset-list is not fboundp.
|
||||
|
||||
2003-12-29 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* international/mule-cmds.el (reset-language-environment): Call
|
||||
set-overriding-fontspec-internal with nil.
|
||||
(set-language-environment): Call set-overriding-fontspec-internal
|
||||
if the language environment specify `overriding-fontspec'.
|
||||
(language-info-alist): Doc added.
|
||||
|
||||
* language/cyrillic.el (ccl-encode-koi8-font): Make it work for
|
||||
characters of mule-unicode-0100-24ff.
|
||||
(ccl-encode-windows-1251-font): New CCL program.
|
||||
("Bulgarian"): Specify overriding-fontspec.
|
||||
("Belarusian"): Likewise.
|
||||
|
||||
2003-12-28 Sam Steingold <sds@gnu.org>
|
||||
|
||||
* net/ange-ftp.el (ange-ftp-file-attributes): Add new optional
|
||||
|
|
@ -46,6 +235,14 @@
|
|||
|
||||
* ffap.el (ffap-read-file-or-url): Revert previous change.
|
||||
|
||||
2003-12-25 Robert J. Chassell <bob@rattlesnake.com>
|
||||
|
||||
* textmodes/texnfo-upd.el (texinfo-multi-file-update): Create a
|
||||
new list of included files called `files-with-node-lines', that
|
||||
only have node lines. This way @include commands can include any
|
||||
file, such as version and update files without node lines, not
|
||||
just files that are chapters.
|
||||
|
||||
2003-12-25 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* jka-compr.el (jka-compr-insert-file-contents): Avoid error when
|
||||
|
|
@ -542,10 +739,18 @@
|
|||
|
||||
2003-11-01 Mark A. Hershberger <mah@everybody.org>
|
||||
|
||||
* xml.el: Allow comments following the top-level element.
|
||||
Separate out namespace parsing into special functions.
|
||||
Change namespace parsing to return ('ns-uri . "local-name")
|
||||
instead of '{ns-uri}local-name.
|
||||
* xml.el (xml-parse-region): Allow comments to appear after the
|
||||
topmost element has closed.
|
||||
(xml-ns-parse-ns-attrs, xml-ns-expand-el)
|
||||
(xml-ns-expand-attr): New functions to do namespace handling.
|
||||
(xml-intern-attrlist): Back-compatible handling of attribute
|
||||
names.
|
||||
(xml-parse-tag): Move namespace handling to seperate functions.
|
||||
Now produces elements in the form ((:ns . "element") (attr-list)
|
||||
children) instead of ('ns:element (attr-list) children).
|
||||
(xml-parse-attlist): Fix attribute parsing.
|
||||
(xml-parse-dtd): Change parsing so that it produces strings
|
||||
instead of interned symbols.
|
||||
|
||||
2003-11-01 era@iki.fi <era@iki.fi> (tiny change)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
;; Copyright (C) 1995, 1997, 1998, 2003 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Morten Welinder <terra@diku.dk>
|
||||
;; Author: Morten Welinder <terra@gnu.org>
|
||||
;; Keywords: archives msdog editing major-mode
|
||||
;; Favourite-brand-of-beer: None, I hate beer.
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,10 @@ Never set this variable directly, use the command `auto-revert-mode' instead.")
|
|||
(put 'auto-revert-mode 'permanent-local t)
|
||||
|
||||
(defcustom auto-revert-interval 5
|
||||
"Time, in seconds, between Auto-Revert Mode file checks."
|
||||
"Time, in seconds, between Auto-Revert Mode file checks.
|
||||
Setting this variable has no effect on buffers that are already in
|
||||
auto-revert-mode; it only affects buffers that are put into
|
||||
auto-revert-mode afterwards."
|
||||
:group 'auto-revert
|
||||
:type 'integer)
|
||||
|
||||
|
|
|
|||
|
|
@ -335,10 +335,7 @@ through a file easier.")
|
|||
"Return the full entry for BOOKMARK in bookmark-alist.
|
||||
If BOOKMARK is not a string, return nil."
|
||||
(when (stringp bookmark)
|
||||
(apply (if bookmark-completion-ignore-case
|
||||
#'assoc-ignore-case
|
||||
#'assoc)
|
||||
(list bookmark bookmark-alist))))
|
||||
(assoc-string bookmark bookmark-alist bookmark-completion-ignore-case)))
|
||||
|
||||
|
||||
(defun bookmark-get-bookmark-record (bookmark)
|
||||
|
|
|
|||
139
lisp/comint.el
139
lisp/comint.el
|
|
@ -1344,16 +1344,16 @@ Argument 0 is the command name."
|
|||
;; Put the previous arg, if there was one, onto ARGS.
|
||||
(setq str (substring string beg pos)
|
||||
args (if quotes (cons str args)
|
||||
(nconc (comint-delim-arg str) args))
|
||||
count (1+ count)))
|
||||
(nconc (comint-delim-arg str) args))))
|
||||
(setq count (length args))
|
||||
(setq quotes (match-beginning 1))
|
||||
(setq beg (match-beginning 0))
|
||||
(setq pos (match-end 0))))
|
||||
(if beg
|
||||
(setq str (substring string beg pos)
|
||||
args (if quotes (cons str args)
|
||||
(nconc (comint-delim-arg str) args))
|
||||
count (1+ count)))
|
||||
(nconc (comint-delim-arg str) args))))
|
||||
(setq count (length args))
|
||||
(let ((n (or nth (1- count)))
|
||||
(m (if mth (1- (- count mth)) 0)))
|
||||
(mapconcat
|
||||
|
|
@ -1901,7 +1901,8 @@ RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. C-g aborts (if
|
|||
filter and C-g is pressed, this function returns nil rather than a string).
|
||||
|
||||
Note that the keystrokes comprising the text can still be recovered
|
||||
\(temporarily) with \\[view-lossage]. Some people find this worrysome.
|
||||
\(temporarily) with \\[view-lossage]. Some people find this worrysome (see,
|
||||
however, `clear-this-command-keys').
|
||||
Once the caller uses the password, it can erase the password
|
||||
by doing (clear-string STRING)."
|
||||
(let ((ans "")
|
||||
|
|
@ -1948,24 +1949,22 @@ by doing (clear-string STRING)."
|
|||
(message "")
|
||||
ans)))
|
||||
|
||||
(defun send-invisible (str)
|
||||
(defun send-invisible (&optional prompt)
|
||||
"Read a string without echoing.
|
||||
Then send it to the process running in the current buffer.
|
||||
The string is sent using `comint-input-sender'.
|
||||
Security bug: your string can still be temporarily recovered with
|
||||
\\[view-lossage]."
|
||||
\\[view-lossage]; `clear-this-command-keys' can fix that."
|
||||
(interactive "P") ; Defeat snooping via C-x ESC ESC
|
||||
(let ((proc (get-buffer-process (current-buffer))))
|
||||
(cond ((not proc)
|
||||
(error "Current buffer has no process"))
|
||||
((stringp str)
|
||||
(comint-snapshot-last-prompt)
|
||||
(funcall comint-input-sender proc str))
|
||||
(t
|
||||
(let ((str (comint-read-noecho "Non-echoed text: " t)))
|
||||
(if (stringp str)
|
||||
(send-invisible str)
|
||||
(message "Warning: text will be echoed")))))))
|
||||
(if proc
|
||||
(let ((str (comint-read-noecho (or prompt "Non-echoed text: ") t)))
|
||||
(if (stringp str)
|
||||
(progn
|
||||
(comint-snapshot-last-prompt)
|
||||
(funcall comint-input-sender proc str))
|
||||
(message "Warning: text will be echoed")))
|
||||
(error "Current buffer has no process"))))
|
||||
|
||||
(defun comint-watch-for-password-prompt (string)
|
||||
"Prompt in the minibuffer for password and send without echoing.
|
||||
|
|
@ -1977,8 +1976,7 @@ This function could be in the list `comint-output-filter-functions'."
|
|||
(when (string-match comint-password-prompt-regexp string)
|
||||
(when (string-match "^[ \n\r\t\v\f\b\a]+" string)
|
||||
(setq string (replace-match "" t t string)))
|
||||
(let ((pw (comint-read-noecho string t)))
|
||||
(send-invisible pw))))
|
||||
(send-invisible string)))
|
||||
|
||||
;; Low-level process communication
|
||||
|
||||
|
|
@ -2084,7 +2082,7 @@ between the process-mark and point."
|
|||
(comint-skip-input)
|
||||
(interrupt-process nil comint-ptyp)
|
||||
;; (process-send-string nil "\n")
|
||||
)
|
||||
)
|
||||
|
||||
(defun comint-kill-subjob ()
|
||||
"Send kill signal to the current subjob.
|
||||
|
|
@ -2553,7 +2551,7 @@ directory tracking functions.")
|
|||
(defvar comint-file-name-chars
|
||||
(if (memq system-type '(ms-dos windows-nt cygwin))
|
||||
"~/A-Za-z0-9_^$!#%&{}@`'.,:()-"
|
||||
"~/A-Za-z0-9+@:_.$#%,={}-")
|
||||
"[]~/A-Za-z0-9+@:_.$#%,={}-")
|
||||
"String of characters valid in a file name.
|
||||
Note that all non-ASCII characters are considered valid in a file name
|
||||
regardless of what this variable says.
|
||||
|
|
@ -2579,15 +2577,19 @@ Word constituents are considered to be those in WORD-CHARS, which is like the
|
|||
inside of a \"[...]\" (see `skip-chars-forward'),
|
||||
plus all non-ASCII characters."
|
||||
(save-excursion
|
||||
(let ((non-word-chars (concat "[^\\\\" word-chars "]")) (here (point)))
|
||||
(while (and (re-search-backward non-word-chars nil 'move)
|
||||
;;(memq (char-after (point)) shell-file-name-quote-list)
|
||||
(or (>= (following-char) 128)
|
||||
(eq (preceding-char) ?\\)))
|
||||
(backward-char 1))
|
||||
;; Don't go forward over a word-char (this can happen if we're at bob).
|
||||
(when (or (not (bobp)) (looking-at non-word-chars))
|
||||
(forward-char 1))
|
||||
(let ((here (point))
|
||||
giveup)
|
||||
(while (not giveup)
|
||||
(let ((startpoint (point)))
|
||||
(skip-chars-backward (concat "\\\\" word-chars))
|
||||
(if (and (> (- (point) 2) (point-min))
|
||||
(= (char-after (- (point) 2)) ?\\))
|
||||
(forward-char -2))
|
||||
(if (and (> (- (point) 1) (point-min))
|
||||
(>= (char-after (- (point) 1)) 128))
|
||||
(forward-char -1))
|
||||
(if (= (point) startpoint)
|
||||
(setq giveup t))))
|
||||
;; Set match-data to match the entire string.
|
||||
(when (< (point) here)
|
||||
(set-match-data (list (point) here))
|
||||
|
|
@ -2699,10 +2701,10 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
|
|||
(t
|
||||
(cdr comint-completion-addsuffix))))
|
||||
(filename (or (comint-match-partial-filename) ""))
|
||||
(pathdir (file-name-directory filename))
|
||||
(pathnondir (file-name-nondirectory filename))
|
||||
(directory (if pathdir (comint-directory pathdir) default-directory))
|
||||
(completion (file-name-completion pathnondir directory)))
|
||||
(filedir (file-name-directory filename))
|
||||
(filenondir (file-name-nondirectory filename))
|
||||
(directory (if filedir (comint-directory filedir) default-directory))
|
||||
(completion (file-name-completion filenondir directory)))
|
||||
(cond ((null completion)
|
||||
(message "No completions of %s" filename)
|
||||
(setq success nil))
|
||||
|
|
@ -2716,21 +2718,21 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
|
|||
(let ((file (concat (file-name-as-directory directory) completion)))
|
||||
(insert (comint-quote-filename
|
||||
(substring (directory-file-name completion)
|
||||
(length pathnondir))))
|
||||
(length filenondir))))
|
||||
(cond ((symbolp (file-name-completion completion directory))
|
||||
;; We inserted a unique completion.
|
||||
(insert (if (file-directory-p file) dirsuffix filesuffix))
|
||||
(unless minibuffer-p
|
||||
(message "Completed")))
|
||||
((and comint-completion-recexact comint-completion-addsuffix
|
||||
(string-equal pathnondir completion)
|
||||
(string-equal filenondir completion)
|
||||
(file-exists-p file))
|
||||
;; It's not unique, but user wants shortest match.
|
||||
(insert (if (file-directory-p file) dirsuffix filesuffix))
|
||||
(unless minibuffer-p
|
||||
(message "Completed shortest")))
|
||||
((or comint-completion-autolist
|
||||
(string-equal pathnondir completion))
|
||||
(string-equal filenondir completion))
|
||||
;; It's not unique, list possible completions.
|
||||
(comint-dynamic-list-filename-completions))
|
||||
(t
|
||||
|
|
@ -2814,10 +2816,10 @@ See also `comint-dynamic-complete-filename'."
|
|||
;; but subsequent changes may have made this unnecessary. sm.
|
||||
;;(file-name-handler-alist nil)
|
||||
(filename (or (comint-match-partial-filename) ""))
|
||||
(pathdir (file-name-directory filename))
|
||||
(pathnondir (file-name-nondirectory filename))
|
||||
(directory (if pathdir (comint-directory pathdir) default-directory))
|
||||
(completions (file-name-all-completions pathnondir directory)))
|
||||
(filedir (file-name-directory filename))
|
||||
(filenondir (file-name-nondirectory filename))
|
||||
(directory (if filedir (comint-directory filedir) default-directory))
|
||||
(completions (file-name-all-completions filenondir directory)))
|
||||
(if (not completions)
|
||||
(message "No completions of %s" filename)
|
||||
(comint-dynamic-list-completions
|
||||
|
|
@ -2829,6 +2831,8 @@ See also `comint-dynamic-complete-filename'."
|
|||
;; command is repeatedly used without the set of completions changing.
|
||||
(defvar comint-displayed-dynamic-completions nil)
|
||||
|
||||
(defvar comint-dynamic-list-completions-config nil)
|
||||
|
||||
(defun comint-dynamic-list-completions (completions)
|
||||
"List in help buffer sorted COMPLETIONS.
|
||||
Typing SPC flushes the help buffer."
|
||||
|
|
@ -2858,30 +2862,35 @@ Typing SPC flushes the help buffer."
|
|||
(select-window window)
|
||||
(scroll-up))))
|
||||
|
||||
(let ((conf (current-window-configuration)))
|
||||
(with-output-to-temp-buffer "*Completions*"
|
||||
(display-completion-list completions))
|
||||
(message "Type space to flush; repeat completion command to scroll")
|
||||
(let (key first)
|
||||
(if (save-excursion
|
||||
(set-buffer (get-buffer "*Completions*"))
|
||||
(set (make-local-variable
|
||||
'comint-displayed-dynamic-completions)
|
||||
completions)
|
||||
(setq key (read-key-sequence nil)
|
||||
first (aref key 0))
|
||||
(and (consp first) (consp (event-start first))
|
||||
(eq (window-buffer (posn-window (event-start first)))
|
||||
(get-buffer "*Completions*"))
|
||||
(eq (key-binding key) 'mouse-choose-completion)))
|
||||
;; If the user does mouse-choose-completion with the mouse,
|
||||
;; execute the command, then delete the completion window.
|
||||
(progn
|
||||
(mouse-choose-completion first)
|
||||
(set-window-configuration conf))
|
||||
(if (eq first ?\ )
|
||||
(set-window-configuration conf)
|
||||
(setq unread-command-events (listify-key-sequence key)))))))))
|
||||
;; Display a completion list for the first time.
|
||||
(setq comint-dynamic-list-completions-config
|
||||
(current-window-configuration))
|
||||
(with-output-to-temp-buffer "*Completions*"
|
||||
(display-completion-list completions))
|
||||
(message "Type space to flush; repeat completion command to scroll"))
|
||||
|
||||
;; Read the next key, to process SPC.
|
||||
(let (key first)
|
||||
(if (save-excursion
|
||||
(set-buffer (get-buffer "*Completions*"))
|
||||
(set (make-local-variable
|
||||
'comint-displayed-dynamic-completions)
|
||||
completions)
|
||||
(setq key (read-key-sequence nil)
|
||||
first (aref key 0))
|
||||
(and (consp first) (consp (event-start first))
|
||||
(eq (window-buffer (posn-window (event-start first)))
|
||||
(get-buffer "*Completions*"))
|
||||
(eq (key-binding key) 'mouse-choose-completion)))
|
||||
;; If the user does mouse-choose-completion with the mouse,
|
||||
;; execute the command, then delete the completion window.
|
||||
(progn
|
||||
(mouse-choose-completion first)
|
||||
(set-window-configuration comint-dynamic-list-completions-config))
|
||||
(unless (eq first ?\ )
|
||||
(setq unread-command-events (listify-key-sequence key)))
|
||||
(unless (eq first ?\t)
|
||||
(set-window-configuration comint-dynamic-list-completions-config))))))
|
||||
|
||||
|
||||
(defun comint-get-next-from-history ()
|
||||
|
|
|
|||
|
|
@ -558,17 +558,17 @@ from THEME by `custom-make-theme-feature'."
|
|||
(error "Keyword %s is missing an argument" keyword))
|
||||
(setq args (cdr args))
|
||||
(cond ((eq keyword :short-description)
|
||||
(put theme 'theme-short-description short-description))
|
||||
(put theme 'theme-short-description value))
|
||||
((eq keyword :immediate)
|
||||
(put theme 'theme-immediate immediate))
|
||||
(put theme 'theme-immediate value))
|
||||
((eq keyword :variable-set-string)
|
||||
(put theme 'theme-variable-set-string variable-set-string))
|
||||
(put theme 'theme-variable-set-string value))
|
||||
((eq keyword :variable-reset-string)
|
||||
(put theme 'theme-variable-reset-string variable-reset-string))
|
||||
(put theme 'theme-variable-reset-string value))
|
||||
((eq keyword :face-set-string)
|
||||
(put theme 'theme-face-set-string face-set-string))
|
||||
(put theme 'theme-face-set-string value))
|
||||
((eq keyword :face-reset-string)
|
||||
(put theme 'theme-face-reset-string face-reset-string)))))))
|
||||
(put theme 'theme-face-reset-string value)))))))
|
||||
|
||||
(defmacro deftheme (theme &optional doc &rest args)
|
||||
"Declare custom theme THEME.
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ It may be followed by the following keyword argument pairs
|
|||
|
||||
:filter FUNCTION
|
||||
|
||||
FUNCTION is a function with one argument, the menu. It returns the actual
|
||||
menu displayed.
|
||||
FUNCTION is a function with one argument, the rest of menu items.
|
||||
It returns the remaining items of the displayed menu.
|
||||
|
||||
:visible INCLUDE
|
||||
|
||||
|
|
|
|||
|
|
@ -212,13 +212,10 @@ Defaults to the value of `case-fold-search'."
|
|||
:group 'file-cache
|
||||
)
|
||||
|
||||
(defcustom file-cache-assoc-function
|
||||
(if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
|
||||
'assoc-ignore-case
|
||||
'assoc)
|
||||
"Function to use to check completions in the file cache.
|
||||
Defaults to `assoc-ignore-case' on DOS and Windows, and `assoc' on
|
||||
other systems."
|
||||
(defcustom file-cache-ignore-case
|
||||
(memq system-type (list 'ms-dos 'windows-nt 'cygwin))
|
||||
"Non-nil means ignore case when checking completions in the file cache.
|
||||
Defaults to nil on DOS and Windows, and t on other systems."
|
||||
:type 'sexp
|
||||
:group 'file-cache
|
||||
)
|
||||
|
|
@ -301,8 +298,9 @@ in each directory, not to the directory list itself."
|
|||
(message "File %s does not exist" file)
|
||||
(let* ((file-name (file-name-nondirectory file))
|
||||
(dir-name (file-name-directory file))
|
||||
(the-entry (funcall file-cache-assoc-function
|
||||
file-name file-cache-alist))
|
||||
(the-entry (assoc-string
|
||||
file-name file-cache-alist
|
||||
file-cache-ignore-case))
|
||||
)
|
||||
;; Does the entry exist already?
|
||||
(if the-entry
|
||||
|
|
@ -402,7 +400,7 @@ or the optional REGEXP argument."
|
|||
(interactive
|
||||
(list (completing-read "Delete file from cache: " file-cache-alist)))
|
||||
(setq file-cache-alist
|
||||
(delq (funcall file-cache-assoc-function file file-cache-alist)
|
||||
(delq (assoc-string file file-cache-alist file-cache-ignore-case)
|
||||
file-cache-alist)))
|
||||
|
||||
(defun file-cache-delete-file-list (file-list)
|
||||
|
|
@ -458,8 +456,9 @@ or the optional REGEXP argument."
|
|||
|
||||
;; Returns the name of a directory for a file in the cache
|
||||
(defun file-cache-directory-name (file)
|
||||
(let* ((directory-list (cdr (funcall file-cache-assoc-function
|
||||
file file-cache-alist)))
|
||||
(let* ((directory-list (cdr (assoc-string
|
||||
file file-cache-alist
|
||||
file-cache-ignore-case)))
|
||||
(len (length directory-list))
|
||||
(directory)
|
||||
(num)
|
||||
|
|
@ -556,7 +555,8 @@ the name is considered already unique; only the second substitution
|
|||
;; If we've already inserted a unique string, see if the user
|
||||
;; wants to use that one
|
||||
(if (and (string= string completion-string)
|
||||
(funcall file-cache-assoc-function string file-cache-alist))
|
||||
(assoc-string string file-cache-alist
|
||||
file-cache-ignore-case))
|
||||
(if (and (eq last-command this-command)
|
||||
(string= file-cache-last-completion completion-string))
|
||||
(progn
|
||||
|
|
@ -725,7 +725,8 @@ match REGEXP."
|
|||
"Debugging function."
|
||||
(interactive
|
||||
(list (completing-read "File Cache: " file-cache-alist)))
|
||||
(message "%s" (funcall file-cache-assoc-function file file-cache-alist))
|
||||
(message "%s" (assoc-string file file-cache-alist
|
||||
file-cache-ignore-case))
|
||||
)
|
||||
|
||||
(defun file-cache-display ()
|
||||
|
|
|
|||
|
|
@ -2552,7 +2552,8 @@ BACKUPNAME is the backup file name, which is the old file renamed."
|
|||
(not (file-writable-p to-name)))
|
||||
(delete-file to-name))
|
||||
(copy-file from-name to-name t t)))
|
||||
(set-file-modes to-name (logand modes #o1777)))
|
||||
(and modes
|
||||
(set-file-modes to-name (logand modes #o1777))))
|
||||
|
||||
(defun file-name-sans-versions (name &optional keep-backup-version)
|
||||
"Return file NAME sans backup versions or strings.
|
||||
|
|
@ -3727,8 +3728,9 @@ This command is used in the special Dired buffer created by
|
|||
(kill-buffer buffer))))
|
||||
|
||||
(defun kill-some-buffers (&optional list)
|
||||
"For each buffer in LIST, ask whether to kill it.
|
||||
LIST defaults to all existing live buffers."
|
||||
"Kill some buffers. Asks the user whether to kill each one of them.
|
||||
Non-interactively, if optional argument LIST is non-`nil', it
|
||||
specifies the list of buffers to kill, asking for approval for each one."
|
||||
(interactive)
|
||||
(if (null list)
|
||||
(setq list (buffer-list)))
|
||||
|
|
|
|||
|
|
@ -123,6 +123,10 @@ as the final argument."
|
|||
(car find-ls-option)))
|
||||
;; The next statement will bomb in classic dired (no optional arg allowed)
|
||||
(dired-mode dir (cdr find-ls-option))
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map (current-local-map))
|
||||
(define-key map "\C-c\C-k" 'kill-find)
|
||||
(use-local-map map))
|
||||
(make-local-variable 'dired-sort-inhibit)
|
||||
(setq dired-sort-inhibit t)
|
||||
(set (make-local-variable 'revert-buffer-function)
|
||||
|
|
@ -144,6 +148,7 @@ as the final argument."
|
|||
;; Make second line a ``find'' line in analogy to the ``total'' or
|
||||
;; ``wildcard'' line.
|
||||
(insert " " args "\n")
|
||||
(setq buffer-read-only t)
|
||||
;; Start the find process.
|
||||
(let ((proc (start-process-shell-command find-dired-find-program (current-buffer) args)))
|
||||
(set-process-filter proc (function find-dired-filter))
|
||||
|
|
@ -152,6 +157,16 @@ as the final argument."
|
|||
(move-marker (process-mark proc) 1 (current-buffer)))
|
||||
(setq mode-line-process '(":%s"))))
|
||||
|
||||
(defun kill-find ()
|
||||
"Kill the `find' process running in the current buffer."
|
||||
(interactive)
|
||||
(let ((find (get-buffer-process (current-buffer))))
|
||||
(and find (eq (process-status find) 'run)
|
||||
(eq (process-filter find) (function find-dired-filter))
|
||||
(condition-case nil
|
||||
(delete-process find)
|
||||
(error nil)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun find-name-dired (dir pattern)
|
||||
"Search DIR recursively for files matching the globbing pattern PATTERN,
|
||||
|
|
@ -192,7 +207,8 @@ Thus ARG can also contain additional grep options."
|
|||
|
||||
(defun find-dired-filter (proc string)
|
||||
;; Filter for \\[find-dired] processes.
|
||||
(let ((buf (process-buffer proc)))
|
||||
(let ((buf (process-buffer proc))
|
||||
(inhibit-read-only t))
|
||||
(if (buffer-name buf) ; not killed?
|
||||
(save-excursion
|
||||
(set-buffer buf)
|
||||
|
|
@ -229,7 +245,8 @@ Thus ARG can also contain additional grep options."
|
|||
|
||||
(defun find-dired-sentinel (proc state)
|
||||
;; Sentinel for \\[find-dired] processes.
|
||||
(let ((buf (process-buffer proc)))
|
||||
(let ((buf (process-buffer proc))
|
||||
(inhibit-read-only t))
|
||||
(if (buffer-name buf)
|
||||
(save-excursion
|
||||
(set-buffer buf)
|
||||
|
|
|
|||
|
|
@ -1031,7 +1031,8 @@ what properties to clear before refontifying a region.")
|
|||
|
||||
;; Called when any modification is made to buffer text.
|
||||
(defun font-lock-after-change-function (beg end old-len)
|
||||
(let ((inhibit-point-motion-hooks t))
|
||||
(let ((inhibit-point-motion-hooks t)
|
||||
(inhibit-quit t))
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
;; Rescan between start of lines enclosing the region.
|
||||
|
|
|
|||
|
|
@ -85,8 +85,9 @@ for pop-up frames."
|
|||
:group 'frames)
|
||||
|
||||
(setq pop-up-frame-function
|
||||
(function (lambda ()
|
||||
(make-frame pop-up-frame-alist))))
|
||||
;; Using `function' here caused some sort of problem.
|
||||
'(lambda ()
|
||||
(make-frame pop-up-frame-alist)))
|
||||
|
||||
(defcustom special-display-frame-alist
|
||||
'((height . 14) (width . 80) (unsplittable . t))
|
||||
|
|
@ -335,10 +336,22 @@ React to settings of `default-frame-alist', `initial-frame-alist' there."
|
|||
frame-initial-geometry-arguments)))
|
||||
(top (frame-parameter frame-initial-frame 'top)))
|
||||
(when (and (consp initial-top) (eq '- (car initial-top)))
|
||||
(setq newparms
|
||||
(append newparms
|
||||
`((top . ,(+ top (* lines char-height))))
|
||||
nil)))
|
||||
(let ((adjusted-top
|
||||
(cond ((and (consp top)
|
||||
(eq '+ (car top)))
|
||||
(list '+
|
||||
(+ (cadr top)
|
||||
(* lines char-height))))
|
||||
((and (consp top)
|
||||
(eq '- (car top)))
|
||||
(list '-
|
||||
(- (cadr top)
|
||||
(* lines char-height))))
|
||||
(t (+ top (* lines char-height))))))
|
||||
(setq newparms
|
||||
(append newparms
|
||||
`((top . ,adjusted-top))
|
||||
nil))))
|
||||
(modify-frame-parameters frame-initial-frame newparms)
|
||||
(tool-bar-mode -1)))))
|
||||
|
||||
|
|
|
|||
|
|
@ -1868,7 +1868,38 @@ you must reload generic-x to enable the specified modes."
|
|||
;;List of comment characters
|
||||
(list ?#)
|
||||
;;List of keywords
|
||||
(list "alias" "pre-install" "post-install" "options" "probeall")
|
||||
(list
|
||||
"above"
|
||||
"alias"
|
||||
"below"
|
||||
"define"
|
||||
"depfile"
|
||||
"else"
|
||||
"elseif"
|
||||
"endif"
|
||||
"if"
|
||||
"include"
|
||||
"insmod_opt"
|
||||
"install"
|
||||
"keep"
|
||||
"options"
|
||||
"path"
|
||||
"generic_stringfile"
|
||||
"pcimapfile"
|
||||
"isapnpmapfile"
|
||||
"usbmapfile"
|
||||
"parportmapfile"
|
||||
"ieee1394mapfile"
|
||||
"pnpbiosmapfile"
|
||||
"probe"
|
||||
"probeall"
|
||||
"prune"
|
||||
"post-install"
|
||||
"post-remove"
|
||||
"pre-install"
|
||||
"pre-remove"
|
||||
"remove"
|
||||
"persistdir")
|
||||
;;List of additional font-lock-expressions
|
||||
nil
|
||||
;;List of additional automode-alist expressions
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
;;
|
||||
;; * Additional expressions to font-lock. This should be a list of
|
||||
;; expressions, each of which should be of the same form
|
||||
;; as those in `font-lock-defaults-alist'.
|
||||
;; as those in `font-lock-keywords'.
|
||||
;;
|
||||
;; * List of regular expressions to be placed in auto-mode-alist.
|
||||
;;
|
||||
|
|
@ -206,7 +206,7 @@ KEYWORD-LIST is a list of keywords to highlight with `font-lock-keyword-face'.
|
|||
Each keyword should be a string.
|
||||
|
||||
FONT-LOCK-LIST is a list of additional expressions to highlight. Each entry
|
||||
in the list should have the same form as an entry in `font-lock-defaults-alist'
|
||||
in the list should have the same form as an entry in `font-lock-keywords'.
|
||||
|
||||
AUTO-MODE-LIST is a list of regular expressions to add to `auto-mode-alist'.
|
||||
These regexps are added to `auto-mode-alist' as soon as `define-generic-mode'
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ If optional argument QUERY is non-nil, query for the help mode."
|
|||
(let* ((completions (info-lookup->completions topic mode))
|
||||
(ignore-case (info-lookup->ignore-case topic mode))
|
||||
(entry (or (assoc (if ignore-case (downcase item) item) completions)
|
||||
(assoc-ignore-case item completions)
|
||||
(assoc-string item completions t)
|
||||
(error "Not documented as a %s: %s" topic (or item ""))))
|
||||
(modes (info-lookup->all-modes topic mode))
|
||||
(window (selected-window))
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ a case-insensitive match is tried."
|
|||
(beginning-of-line)
|
||||
(setq end (point))
|
||||
(push (list nodename other beg end) this-buffer-nodes)))
|
||||
(if (assoc-ignore-case "top" this-buffer-nodes)
|
||||
(if (assoc-string "top" this-buffer-nodes t)
|
||||
(setq nodes (nconc this-buffer-nodes nodes))
|
||||
(setq problems t)
|
||||
(message "No `top' node in %s" Info-dir-file-name)))))
|
||||
|
|
|
|||
|
|
@ -1006,6 +1006,12 @@ Meaningful values for KEY include
|
|||
environment.
|
||||
features value is a list of features requested in this
|
||||
language environment.
|
||||
ctext-non-standard-encodings
|
||||
value is a list of non-standard encoding
|
||||
names used in extended segments of CTEXT.
|
||||
See the variable
|
||||
`ctext-non-standard-encodings' for more
|
||||
detail.
|
||||
|
||||
The following keys take effect only when multibyte characters are
|
||||
globally disabled, i.e. the value of `default-enable-multibyte-characters'
|
||||
|
|
@ -1685,7 +1691,12 @@ The default status is as follows:
|
|||
;; (set-keyboard-coding-system-internal nil)
|
||||
|
||||
(setq nonascii-translation-table nil
|
||||
nonascii-insert-offset 0))
|
||||
nonascii-insert-offset 0)
|
||||
|
||||
;; Don't invoke fontset-related functions if fontsets aren't
|
||||
;; supported in this build of Emacs.
|
||||
(and (fboundp 'fontset-list)
|
||||
(set-overriding-fontspec-internal nil)))
|
||||
|
||||
(reset-language-environment)
|
||||
|
||||
|
|
@ -1791,6 +1802,15 @@ specifies the character set for the major languages of Western Europe."
|
|||
(while required-features
|
||||
(require (car required-features))
|
||||
(setq required-features (cdr required-features))))
|
||||
|
||||
;; Don't invoke fontset-related functions if fontsets aren't
|
||||
;; supported in this build of Emacs.
|
||||
(when (fboundp 'fontset-list)
|
||||
(let ((overriding-fontspec (get-language-info language-name
|
||||
'overriding-fontspec)))
|
||||
(if overriding-fontspec
|
||||
(set-overriding-fontspec-internal overriding-fontspec))))
|
||||
|
||||
(let ((func (get-language-info language-name 'setup-function)))
|
||||
(if (functionp func)
|
||||
(funcall func)))
|
||||
|
|
|
|||
|
|
@ -204,6 +204,9 @@ This works whether or not the table is Unicode-based or
|
|||
;; The table is set up later to encode both Unicode and 8859-5.
|
||||
(define-ccl-program ccl-encode-koi8-font
|
||||
`(0
|
||||
(if (r2 >= 0)
|
||||
((r1 <<= 7)
|
||||
(r1 += r2)))
|
||||
(translate-character cyrillic-koi8-r-encode-table r0 r1))
|
||||
"CCL program to encode Cyrillic chars to KOI font.")
|
||||
|
||||
|
|
@ -472,10 +475,25 @@ Support for Russian using koi8-r and the russian-computer input method.")
|
|||
(setcdr slot (cdr elt))
|
||||
(push elt ctext-non-standard-encodings-alist)))
|
||||
|
||||
(define-ccl-program ccl-encode-windows-1251-font
|
||||
'(0
|
||||
((r1 <<= 7)
|
||||
(r1 += r2)
|
||||
(translate-character encode-windows-1251 r0 r1)
|
||||
)))
|
||||
|
||||
(add-to-list 'font-ccl-encoder-alist
|
||||
'("microsoft-cp1251" . ccl-encode-windows-1251-font))
|
||||
|
||||
(set-language-info-alist
|
||||
"Bulgarian" `((coding-system windows-1251)
|
||||
(coding-priority windows-1251)
|
||||
(ctext-non-standard-encodings "microsoft-cp1251")
|
||||
(overriding-fontspec
|
||||
(,(get 'encode-windows-1251 'translation-table)
|
||||
. (nil . "microsoft-cp1251"))
|
||||
(,(get 'cyrillic-koi8-r-encode-table 'translation-table)
|
||||
. (nil . "koi8-r")))
|
||||
(nonascii-translation
|
||||
. ,(get 'decode-windows-1251 'translation-table))
|
||||
(input-method . "bulgarian-bds")
|
||||
|
|
@ -488,6 +506,11 @@ Support for Russian using koi8-r and the russian-computer input method.")
|
|||
"Belarusian" `((coding-system windows-1251)
|
||||
(coding-priority windows-1251)
|
||||
(ctext-non-standard-encodings "microsoft-cp1251")
|
||||
(overriding-fontspec
|
||||
(,(get 'encode-windows-1251 'translation-table)
|
||||
. (nil . "microsoft-cp1251"))
|
||||
(,(get 'cyrillic-koi8-r-encode-table 'translation-table)
|
||||
. (nil . "koi8-r")))
|
||||
(nonascii-translation
|
||||
. ,(get 'decode-windows-1251 'translation-table))
|
||||
(input-method . "belarusian")
|
||||
|
|
|
|||
|
|
@ -30,11 +30,13 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
;; uses address-start free, throws to address
|
||||
(defvar rfc822-address-start)
|
||||
|
||||
;; uses rfc822-address-start free, throws to address
|
||||
(defun rfc822-bad-address (reason)
|
||||
(save-restriction
|
||||
(insert "_^_")
|
||||
(narrow-to-region address-start
|
||||
(narrow-to-region rfc822-address-start
|
||||
(if (re-search-forward "[,;]" nil t)
|
||||
(max (point-min) (1- (point)))
|
||||
(point-max)))
|
||||
|
|
@ -52,7 +54,7 @@
|
|||
": \"")
|
||||
(goto-char (point-max)) (insert "\")"))
|
||||
(rfc822-nuke-whitespace)
|
||||
(throw 'address (buffer-substring address-start (point))))
|
||||
(throw 'address (buffer-substring rfc822-address-start (point))))
|
||||
|
||||
(defun rfc822-nuke-whitespace (&optional leave-space)
|
||||
(let (ch)
|
||||
|
|
@ -179,7 +181,7 @@
|
|||
;; domain-literal is "[" *(dtext | quoted-pair) "]"
|
||||
;; dtext is "[^][\\n"
|
||||
;; domain-ref is atom
|
||||
(let ((address-start (point))
|
||||
(let ((rfc822-address-start (point))
|
||||
(n 0))
|
||||
(catch 'address
|
||||
;; optimize common cases:
|
||||
|
|
@ -198,14 +200,14 @@
|
|||
(or (bobp) (/= (preceding-char) ?\ ) (delete-char -1))
|
||||
;; relying on the fact that rfc822-looking-at <char>
|
||||
;; doesn't mung match-data
|
||||
(throw 'address (buffer-substring address-start (match-end 0)))))
|
||||
(goto-char address-start)
|
||||
(throw 'address (buffer-substring rfc822-address-start (match-end 0)))))
|
||||
(goto-char rfc822-address-start)
|
||||
(while t
|
||||
(cond ((and (= n 1) (rfc822-looking-at ?@))
|
||||
;; local-part@domain
|
||||
(rfc822-snarf-domain)
|
||||
(throw 'address
|
||||
(buffer-substring address-start (point))))
|
||||
(buffer-substring rfc822-address-start (point))))
|
||||
((rfc822-looking-at ?:)
|
||||
(cond ((not allow-groups)
|
||||
(rfc822-bad-address "A group name may not appear here"))
|
||||
|
|
@ -261,7 +263,7 @@
|
|||
(throw 'address nil))
|
||||
((= n 1) ; allow "foo" (losing unix seems to do this)
|
||||
(throw 'address
|
||||
(buffer-substring address-start (point))))
|
||||
(buffer-substring rfc822-address-start (point))))
|
||||
((> n 1)
|
||||
(rfc822-bad-address "Missing comma between addresses or badly-formatted address"))
|
||||
((or (eobp) (= (following-char) ?,))
|
||||
|
|
@ -289,12 +291,12 @@
|
|||
(replace-match "\\1 " t))
|
||||
|
||||
(goto-char (point-min))
|
||||
(rfc822-nuke-whitespace)
|
||||
(let ((list ())
|
||||
tem
|
||||
address-start); this is for rfc822-bad-address
|
||||
rfc822-address-start); this is for rfc822-bad-address
|
||||
(rfc822-nuke-whitespace)
|
||||
(while (not (eobp))
|
||||
(setq address-start (point))
|
||||
(setq rfc822-address-start (point))
|
||||
(setq tem
|
||||
(catch 'address ; this is for rfc822-bad-address
|
||||
(cond ((rfc822-looking-at ?\,)
|
||||
|
|
|
|||
|
|
@ -1687,19 +1687,22 @@ It returns t if it got any new messages."
|
|||
(delete-region (point) (search-backward ":"))
|
||||
(insert ": 8bit")))
|
||||
(if base64-header-field-end
|
||||
(condition-case nil
|
||||
(save-excursion
|
||||
(base64-decode-region (1+ header-end)
|
||||
(- (point) 2))
|
||||
;; Change "base64" to "8bit", to reflect the
|
||||
;; decoding we just did.
|
||||
(goto-char (1+ header-end))
|
||||
(while (search-forward "\r\n" (point-max) t)
|
||||
(replace-match "\n"))
|
||||
(goto-char base64-header-field-end)
|
||||
(delete-region (point) (search-backward ":"))
|
||||
(insert ": 8bit"))
|
||||
(error nil)))
|
||||
(save-excursion
|
||||
(when
|
||||
(condition-case nil
|
||||
(progn
|
||||
(base64-decode-region (1+ header-end)
|
||||
(- (point) 2))
|
||||
t)
|
||||
(error nil))
|
||||
;; Change "base64" to "8bit", to reflect the
|
||||
;; decoding we just did.
|
||||
(goto-char (1+ header-end))
|
||||
(while (search-forward "\r\n" (point-max) t)
|
||||
(replace-match "\n"))
|
||||
(goto-char base64-header-field-end)
|
||||
(delete-region (point) (search-backward ":"))
|
||||
(insert ": 8bit"))))
|
||||
(setq last-coding-system-used nil)
|
||||
(or rmail-enable-mime
|
||||
(not rmail-enable-multibyte)
|
||||
|
|
@ -1829,15 +1832,21 @@ It returns t if it got any new messages."
|
|||
(delete-region (point) (search-backward ":"))
|
||||
(insert ": 8bit")))
|
||||
(if base64-header-field-end
|
||||
(condition-case nil
|
||||
(save-excursion
|
||||
(base64-decode-region header-end (point))
|
||||
;; Change "base64" to "8bit", to reflect the
|
||||
;; decoding we just did.
|
||||
(goto-char base64-header-field-end)
|
||||
(delete-region (point) (search-backward ":"))
|
||||
(insert ": 8bit"))
|
||||
(error nil))))
|
||||
(save-excursion
|
||||
(when
|
||||
(condition-case nil
|
||||
(progn
|
||||
(base64-decode-region (1+ header-end) (point))
|
||||
t)
|
||||
(error nil))
|
||||
(goto-char header-end)
|
||||
(while (search-forward "\r\n" (point-max) t)
|
||||
(replace-match "\n"))
|
||||
;; Change "base64" to "8bit", to reflect the
|
||||
;; decoding we just did.
|
||||
(goto-char base64-header-field-end)
|
||||
(delete-region (point) (search-backward ":"))
|
||||
(insert ": 8bit")))))
|
||||
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@
|
|||
:prefix "ange-ftp-")
|
||||
|
||||
(defcustom ange-ftp-name-format
|
||||
'("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4))
|
||||
'("^/\\(\\([^/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4))
|
||||
"*Format of a fully expanded remote file name.
|
||||
|
||||
This is a list of the form \(REGEXP HOST USER NAME\),
|
||||
|
|
@ -694,7 +694,7 @@ where REGEXP is a regular expression matching
|
|||
the full remote name, and HOST, USER, and NAME are the numbers of
|
||||
parenthesized expressions in REGEXP for the components (in that order)."
|
||||
:group 'ange-ftp
|
||||
:type '(list regexp
|
||||
:type '(list (regexp :tag "Name regexp")
|
||||
(integer :tag "Host group")
|
||||
(integer :tag "User group")
|
||||
(integer :tag "Name group")))
|
||||
|
|
@ -1918,7 +1918,8 @@ on the gateway machine to do the ftp instead."
|
|||
;; but that doesn't work: ftp never responds.
|
||||
;; Can anyone find a fix for that?
|
||||
(let ((process-connection-type t)
|
||||
(process-environment process-environment)
|
||||
;; Copy this so we don't alter it permanently.
|
||||
(process-environment (copy-tree process-environment))
|
||||
(buffer (get-buffer-create name)))
|
||||
(save-excursion
|
||||
(set-buffer buffer)
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ Zone-mode does two things:
|
|||
|
||||
- fontification"
|
||||
|
||||
(add-hook 'write-file-hooks 'zone-mode-update-serial-hook nil t)
|
||||
(add-hook 'write-file-functions 'zone-mode-update-serial-hook nil t)
|
||||
|
||||
(if (null zone-mode-syntax-table)
|
||||
(zone-mode-load-time-setup)) ;; should have been run at load-time
|
||||
|
|
|
|||
|
|
@ -11,5 +11,7 @@
|
|||
(require 'supercite)
|
||||
(provide 'sc)
|
||||
|
||||
(message "The name `sc' works but is obsolete; please use `supercite' instead")
|
||||
|
||||
;;; arch-tag: 31e8ae19-689e-4b7d-9161-6d7dd60c6ece
|
||||
;;; sc.el ends here
|
||||
|
|
|
|||
|
|
@ -159,8 +159,7 @@ Variables: handwrite-linespace (default 12)
|
|||
(setq next-line-add-newlines t)
|
||||
(switch-to-buffer ps-buf-name)
|
||||
(handwrite-insert-header buf-name)
|
||||
(insert "\n(\\nCreated by GNU Emacs' handwrite version "
|
||||
emacs-version "\\n\\n)=print flush\n")
|
||||
(insert "%%Creator: GNU Emacs' handwrite version " emacs-version "\n")
|
||||
(handwrite-insert-preamble)
|
||||
(handwrite-insert-info)
|
||||
(handwrite-insert-font)
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
;; More compile-time-macros
|
||||
(eval-when-compile
|
||||
(defmacro save-buffer-state-x (&rest body) ; similar to EMACS/lazy-lock.el
|
||||
(let ((modified (gensym "save-buffer-state-x-modified-")))
|
||||
(let ((modified (with-no-warnings (gensym "save-buffer-state-x-modified-"))))
|
||||
`(let ((,modified (buffer-modified-p)))
|
||||
(unwind-protect
|
||||
(let ((buffer-undo-list t) (inhibit-read-only t)
|
||||
|
|
|
|||
|
|
@ -162,11 +162,14 @@ Used to grey out relevant toolbar icons.")
|
|||
(gud-run . "gud-run")
|
||||
(gud-until . "gud-until")
|
||||
(gud-cont . "gud-cont")
|
||||
(gud-step . "gud-step")
|
||||
(gud-next . "gud-next")
|
||||
;; gud-s, gud-si etc. instead of gud-step,
|
||||
;; gud-stepi, to avoid file-name clashes on DOS
|
||||
;; 8+3 filesystems.
|
||||
(gud-step . "gud-s")
|
||||
(gud-next . "gud-n")
|
||||
(gud-finish . "gud-finish")
|
||||
(gud-stepi . "gud-stepi")
|
||||
(gud-nexti . "gud-nexti")
|
||||
(gud-stepi . "gud-si")
|
||||
(gud-nexti . "gud-ni")
|
||||
(gud-up . "gud-up")
|
||||
(gud-down . "gud-down"))
|
||||
map)
|
||||
|
|
|
|||
|
|
@ -2052,7 +2052,8 @@ STRING This is ignored for the purposes of calculating
|
|||
(progn
|
||||
(setq result (append result val))
|
||||
(setq align-point (point))))
|
||||
(forward-char -1)
|
||||
(or (bobp)
|
||||
(forward-char -1))
|
||||
(skip-chars-forward "[a-z0-9]*?")
|
||||
)
|
||||
((string-match "[])}]" x)
|
||||
|
|
|
|||
|
|
@ -304,8 +304,10 @@ START and END are buffer positions indicating what to prepend."
|
|||
|
||||
(defun copy-rectangle-to-register (register start end &optional delete-flag)
|
||||
"Copy rectangular region into register REGISTER.
|
||||
With prefix arg, delete as well.
|
||||
Called from program, takes four args: REGISTER, START, END and DELETE-FLAG.
|
||||
With prefix arg, delete as well. To insert this register
|
||||
in the buffer, use \\[insert-register].
|
||||
|
||||
Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG.
|
||||
START and END are buffer positions giving two corners of rectangle."
|
||||
(interactive "cCopy rectangle to register: \nr\nP")
|
||||
(set-register register
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ This is a fine thing to set in your `.emacs' file.")
|
|||
(defvar shell-file-name-chars
|
||||
(if (memq system-type '(ms-dos windows-nt cygwin))
|
||||
"~/A-Za-z0-9_^$!#%&{}@`'.,:()-"
|
||||
"~/A-Za-z0-9+@:_.$#%,={}-")
|
||||
"[]~/A-Za-z0-9+@:_.$#%,={}-")
|
||||
"String of characters valid in a file name.
|
||||
This variable is used to initialize `comint-file-name-chars' in the
|
||||
shell buffer. The value may depend on the operating system or shell.
|
||||
|
|
@ -941,36 +941,37 @@ Returns t if successful."
|
|||
"Dynamically complete at point as a command.
|
||||
See `shell-dynamic-complete-filename'. Returns t if successful."
|
||||
(let* ((filename (or (comint-match-partial-filename) ""))
|
||||
(pathnondir (file-name-nondirectory filename))
|
||||
(paths (cdr (reverse exec-path)))
|
||||
(filenondir (file-name-nondirectory filename))
|
||||
(path-dirs (cdr (reverse exec-path)))
|
||||
(cwd (file-name-as-directory (expand-file-name default-directory)))
|
||||
(ignored-extensions
|
||||
(and comint-completion-fignore
|
||||
(mapconcat (function (lambda (x) (concat (regexp-quote x) "$")))
|
||||
comint-completion-fignore "\\|")))
|
||||
(path "") (comps-in-path ()) (file "") (filepath "") (completions ()))
|
||||
;; Go thru each path in the search path, finding completions.
|
||||
(while paths
|
||||
(setq path (file-name-as-directory (comint-directory (or (car paths) ".")))
|
||||
comps-in-path (and (file-accessible-directory-p path)
|
||||
(file-name-all-completions pathnondir path)))
|
||||
(dir "") (comps-in-dir ())
|
||||
(file "") (abs-file-name "") (completions ()))
|
||||
;; Go thru each dir in the search path, finding completions.
|
||||
(while path-dirs
|
||||
(setq dir (file-name-as-directory (comint-directory (or (car path-dirs) ".")))
|
||||
comps-in-dir (and (file-accessible-directory-p dir)
|
||||
(file-name-all-completions filenondir dir)))
|
||||
;; Go thru each completion found, to see whether it should be used.
|
||||
(while comps-in-path
|
||||
(setq file (car comps-in-path)
|
||||
filepath (concat path file))
|
||||
(while comps-in-dir
|
||||
(setq file (car comps-in-dir)
|
||||
abs-file-name (concat dir file))
|
||||
(if (and (not (member file completions))
|
||||
(not (and ignored-extensions
|
||||
(string-match ignored-extensions file)))
|
||||
(or (string-equal path cwd)
|
||||
(not (file-directory-p filepath)))
|
||||
(or (string-equal dir cwd)
|
||||
(not (file-directory-p abs-file-name)))
|
||||
(or (null shell-completion-execonly)
|
||||
(file-executable-p filepath)))
|
||||
(file-executable-p abs-file-name)))
|
||||
(setq completions (cons file completions)))
|
||||
(setq comps-in-path (cdr comps-in-path)))
|
||||
(setq paths (cdr paths)))
|
||||
(setq comps-in-dir (cdr comps-in-dir)))
|
||||
(setq path-dirs (cdr path-dirs)))
|
||||
;; OK, we've got a list of completions.
|
||||
(let ((success (let ((comint-completion-addsuffix nil))
|
||||
(comint-dynamic-simple-complete pathnondir completions))))
|
||||
(comint-dynamic-simple-complete filenondir completions))))
|
||||
(if (and (memq success '(sole shortest)) comint-completion-addsuffix
|
||||
(not (file-directory-p (comint-match-partial-filename))))
|
||||
(insert " "))
|
||||
|
|
|
|||
|
|
@ -3735,9 +3735,9 @@ See also `read-mail-command' concerning reading mail."
|
|||
(same-window-buffer-names nil)
|
||||
(same-window-regexps nil))
|
||||
(funcall switch-function "*mail*")))
|
||||
(let ((cc (cdr (assoc-ignore-case "cc" other-headers)))
|
||||
(in-reply-to (cdr (assoc-ignore-case "in-reply-to" other-headers)))
|
||||
(body (cdr (assoc-ignore-case "body" other-headers))))
|
||||
(let ((cc (cdr (assoc-string "cc" other-headers t)))
|
||||
(in-reply-to (cdr (assoc-string "in-reply-to" other-headers t)))
|
||||
(body (cdr (assoc-string "body" other-headers t))))
|
||||
(or (mail continue to subject in-reply-to cc yank-action send-actions)
|
||||
continue
|
||||
(error "Message aborted"))
|
||||
|
|
|
|||
28
lisp/subr.el
28
lisp/subr.el
|
|
@ -298,27 +298,19 @@ If TEST is omitted or nil, `equal' is used."
|
|||
(setq tail (cdr tail)))
|
||||
value))
|
||||
|
||||
(make-obsolete 'assoc-ignore-case 'assoc-string)
|
||||
(defun assoc-ignore-case (key alist)
|
||||
"Like `assoc', but ignores differences in case and text representation.
|
||||
KEY must be a string. Upper-case and lower-case letters are treated as equal.
|
||||
Unibyte strings are converted to multibyte for comparison."
|
||||
(let (element)
|
||||
(while (and alist (not element))
|
||||
(if (eq t (compare-strings key 0 nil (car (car alist)) 0 nil t))
|
||||
(setq element (car alist)))
|
||||
(setq alist (cdr alist)))
|
||||
element))
|
||||
(assoc-string key alist t))
|
||||
|
||||
(make-obsolete 'assoc-ignore-representation 'assoc-string)
|
||||
(defun assoc-ignore-representation (key alist)
|
||||
"Like `assoc', but ignores differences in text representation.
|
||||
KEY must be a string.
|
||||
Unibyte strings are converted to multibyte for comparison."
|
||||
(let (element)
|
||||
(while (and alist (not element))
|
||||
(if (eq t (compare-strings key 0 nil (car (car alist)) 0 nil))
|
||||
(setq element (car alist)))
|
||||
(setq alist (cdr alist)))
|
||||
element))
|
||||
(assoc-string key alist nil))
|
||||
|
||||
(defun member-ignore-case (elt list)
|
||||
"Like `member', but ignores differences in case and text representation.
|
||||
|
|
@ -1563,7 +1555,18 @@ Replaces `category' properties with their defined properties."
|
|||
(defvar yank-undo-function)
|
||||
|
||||
(defun insert-for-yank (string)
|
||||
"Calls `insert-for-yank-1' repetitively for each `yank-handler' segment.
|
||||
|
||||
See `insert-for-yank-1' for more details."
|
||||
(let (to)
|
||||
(while (setq to (next-single-property-change 0 'yank-handler string))
|
||||
(insert-for-yank-1 (substring string 0 to))
|
||||
(setq string (substring string to))))
|
||||
(insert-for-yank-1 string))
|
||||
|
||||
(defun insert-for-yank-1 (string)
|
||||
"Insert STRING at point, stripping some text properties.
|
||||
|
||||
Strip text properties from the inserted text according to
|
||||
`yank-excluded-properties'. Otherwise just like (insert STRING).
|
||||
|
||||
|
|
@ -1809,6 +1812,7 @@ in BODY."
|
|||
(defvar delayed-mode-hooks nil
|
||||
"List of delayed mode hooks waiting to be run.")
|
||||
(make-variable-buffer-local 'delayed-mode-hooks)
|
||||
(put 'delay-mode-hooks 'permanent-local t)
|
||||
|
||||
(defun run-mode-hooks (&rest hooks)
|
||||
"Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
|
||||
|
|
|
|||
44
lisp/term.el
44
lisp/term.el
|
|
@ -1290,6 +1290,7 @@ buffer. The hook term-exec-hook is run after each exec."
|
|||
(goto-char (point-max))
|
||||
(set-marker (process-mark proc) (point))
|
||||
(set-process-filter proc 'term-emulate-terminal)
|
||||
(set-process-sentinel proc 'term-sentinel)
|
||||
;; Feed it the startfile.
|
||||
(cond (startfile
|
||||
;;This is guaranteed to wait long enough
|
||||
|
|
@ -1306,6 +1307,49 @@ buffer. The hook term-exec-hook is run after each exec."
|
|||
(run-hooks 'term-exec-hook)
|
||||
buffer)))
|
||||
|
||||
(defun term-sentinel (proc msg)
|
||||
"Sentinel for term buffers.
|
||||
The main purpose is to get rid of the local keymap."
|
||||
(let ((buffer (process-buffer proc)))
|
||||
(if (memq (process-status proc) '(signal exit))
|
||||
(progn
|
||||
(if (null (buffer-name buffer))
|
||||
;; buffer killed
|
||||
(set-process-buffer proc nil)
|
||||
(let ((obuf (current-buffer)))
|
||||
;; save-excursion isn't the right thing if
|
||||
;; process-buffer is current-buffer
|
||||
(unwind-protect
|
||||
(progn
|
||||
;; Write something in the compilation buffer
|
||||
;; and hack its mode line.
|
||||
(set-buffer buffer)
|
||||
;; Get rid of local keymap.
|
||||
(use-local-map nil)
|
||||
(term-handle-exit (process-name proc)
|
||||
msg)
|
||||
;; Since the buffer and mode line will show that the
|
||||
;; process is dead, we can delete it now. Otherwise it
|
||||
;; will stay around until M-x list-processes.
|
||||
(delete-process proc))
|
||||
(set-buffer obuf))))
|
||||
))))
|
||||
|
||||
(defun term-handle-exit (process-name msg)
|
||||
"Write process exit (or other change) message MSG in the current buffer."
|
||||
(let ((buffer-read-only nil)
|
||||
(omax (point-max))
|
||||
(opoint (point)))
|
||||
;; Record where we put the message, so we can ignore it
|
||||
;; later on.
|
||||
(goto-char omax)
|
||||
(insert ?\n "Process " process-name " " msg)
|
||||
;; Force mode line redisplay soon.
|
||||
(force-mode-line-update)
|
||||
(if (and opoint (< opoint omax))
|
||||
(goto-char opoint))))
|
||||
|
||||
|
||||
;;; Name to use for TERM.
|
||||
;;; Using "emacs" loses, because bash disables editing if TERM == emacs.
|
||||
(defvar term-term-name "eterm")
|
||||
|
|
|
|||
|
|
@ -267,7 +267,9 @@ property of the major mode name.")
|
|||
(defun mail-mode-flyspell-verify ()
|
||||
"This function is used for `flyspell-generic-check-word-p' in Mail mode."
|
||||
(let ((in-headers (save-excursion
|
||||
(re-search-forward mail-header-separator nil t)))
|
||||
;; When mail-header-separator is "",
|
||||
;; it is likely to be found in both directions.
|
||||
(not (re-search-backward (concat "^" (regexp-quote mail-header-separator) "$") nil t))))
|
||||
(in-signature (save-excursion
|
||||
(re-search-backward message-signature-separator nil t))))
|
||||
(cond (in-headers
|
||||
|
|
@ -1628,7 +1630,7 @@ misspelled words backwards."
|
|||
(defun flyspell-abbrev-table ()
|
||||
(if flyspell-use-global-abbrev-table-p
|
||||
global-abbrev-table
|
||||
local-abbrev-table))
|
||||
(or local-abbrev-table global-abbrev-table)))
|
||||
|
||||
;*---------------------------------------------------------------------*/
|
||||
;* flyspell-define-abbrev ... */
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
;; Keywords: wp, convenience
|
||||
;; Author: Takaaki Ota <Takaaki.Ota@am.sony.com>
|
||||
;; Created: Sat Jul 08 2000 13:28:45 (PST)
|
||||
;; Revised: jue jun 05 2003 22:00:02 (Hora de verano romance)
|
||||
;; Revised: Tue Dec 09 2003 14:36:50 (PST)
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
@ -837,6 +837,9 @@ simply by any key input."
|
|||
:type 'hook
|
||||
:group 'table-hooks)
|
||||
|
||||
(defcustom table-yank-handler '(nil nil t nil)
|
||||
"*yank-handler for table.")
|
||||
|
||||
(setplist 'table-disable-incompatibility-warning nil)
|
||||
|
||||
(defvar table-disable-menu (null (and (locate-library "easymenu")
|
||||
|
|
@ -5228,7 +5231,8 @@ and the right cell border character."
|
|||
|
||||
(defun table--put-cell-indicator-property (beg end &optional object)
|
||||
"Put cell property which indicates that the location is within a table cell."
|
||||
(put-text-property beg end 'table-cell t object))
|
||||
(put-text-property beg end 'table-cell t object)
|
||||
(put-text-property beg end 'yank-handler table-yank-handler object))
|
||||
|
||||
(defun table--put-cell-face-property (beg end &optional object)
|
||||
"Put cell face property."
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
;; Author: Robert J. Chassell
|
||||
;; Date: [See date below for texinfo-version]
|
||||
;; Maintainer: bug-texinfo@gnu.org
|
||||
;; Maintainer: FSF
|
||||
;; Keywords: maint, tex, docs
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
@ -59,6 +59,12 @@
|
|||
:type 'string
|
||||
:group 'texinfo)
|
||||
|
||||
(defcustom texinfo-mode-hook nil
|
||||
"Normal hook run when entering Texinfo mode."
|
||||
:type 'hook
|
||||
:options '(turn-on-auto-fill flyspell-mode)
|
||||
:group 'texinfo)
|
||||
|
||||
|
||||
;;; Autoloads:
|
||||
|
||||
|
|
|
|||
30
lisp/xml.el
30
lisp/xml.el
|
|
@ -104,15 +104,22 @@ CHILD-NAME should be a lower case symbol."
|
|||
(push child match))))
|
||||
(nreverse match)))
|
||||
|
||||
(defun xml-get-attribute (node attribute)
|
||||
(defun xml-get-attribute-or-nil (node attribute)
|
||||
"Get from NODE the value of ATTRIBUTE.
|
||||
An empty string is returned if the attribute was not found."
|
||||
(if (xml-node-attributes node)
|
||||
(let ((value (assoc attribute (xml-node-attributes node))))
|
||||
(if value
|
||||
(cdr value)
|
||||
""))
|
||||
""))
|
||||
Return `nil' if the attribute was not found.
|
||||
|
||||
See also `xml-get-attribute'."
|
||||
(when (xml-node-attributes node)
|
||||
(let ((value (assoc attribute (xml-node-attributes node))))
|
||||
(when value
|
||||
(cdr value)))))
|
||||
|
||||
(defsubst xml-get-attribute (node attribute)
|
||||
"Get from NODE the value of ATTRIBUTE.
|
||||
An empty string is returned if the attribute was not found.
|
||||
|
||||
See also `xml-get-attribute-or-nil'."
|
||||
(or (xml-get-attribute-or-nil node attribute) ""))
|
||||
|
||||
;;*******************************************************************
|
||||
;;**
|
||||
|
|
@ -286,7 +293,6 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
|
|||
attr-list)
|
||||
attr-list)
|
||||
|
||||
|
||||
(defun xml-intern-attrlist (attr-list)
|
||||
"Convert attribute names to symbols for backward compatibility."
|
||||
(mapcar (lambda (attr)
|
||||
|
|
@ -349,12 +355,12 @@ Returns one of:
|
|||
(let* ((node-name (match-string 1))
|
||||
(attr-list (xml-parse-attlist))
|
||||
(children (if (consp xml-ns) ;; take care of namespace parsing
|
||||
(progn
|
||||
(progn
|
||||
(setq xml-ns (xml-ns-parse-ns-attrs
|
||||
attr-list xml-ns))
|
||||
(list (xml-ns-expand-attr
|
||||
(list (xml-ns-expand-attr
|
||||
attr-list xml-ns)
|
||||
(xml-ns-expand-el
|
||||
(xml-ns-expand-el
|
||||
node-name xml-ns)))
|
||||
(list (xml-intern-attrlist attr-list)
|
||||
(intern node-name))))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2003-07-16.18}
|
||||
\def\texinfoversion{2003-12-30.09}
|
||||
%
|
||||
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
|
||||
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
|
@ -6772,4 +6772,6 @@
|
|||
@c time-stamp-end: "}"
|
||||
@c End:
|
||||
|
||||
% arch-tag: 53261dd3-7df7-4ec3-9d90-af7a955d3c87
|
||||
@ignore
|
||||
arch-tag: 53261dd3-7df7-4ec3-9d90-af7a955d3c87
|
||||
@end ignore
|
||||
|
|
|
|||
|
|
@ -1,3 +1,53 @@
|
|||
2003-12-29 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* windows.texi (Choosing Window): Add same-window-p, special-display-p.
|
||||
(Window Configurations): Add window-configuration-frame.
|
||||
|
||||
* variables.texi (Creating Buffer-Local): Add local-variable-if-set-p.
|
||||
|
||||
* text.texi (Examining Properties): Add get-char-property-and-overlay.
|
||||
Change arg name in get-char-property.
|
||||
(Special Properties): Update handling of keymap property.
|
||||
|
||||
* strings.texi (Modifying Strings): Add clear-string.
|
||||
(Text Comparison): Add assoc-string and remove
|
||||
assoc-ignore-case, assoc-ignore-representation.
|
||||
|
||||
* os.texi (Time of Day): Add set-time-zone-rule.
|
||||
|
||||
* numbers.texi (Math Functions): asin, acos, log, log10
|
||||
report domain-error errors.
|
||||
|
||||
* nonascii.texi (Converting Representations):
|
||||
Add multibyte-char-to-unibyte and unibyte-char-to-multibyte.
|
||||
(Encoding and I/O): Add file-name-coding-system.
|
||||
|
||||
* modes.texi (Search-based Fontification): Explain that
|
||||
face specs are symbols with face names as values.
|
||||
|
||||
* minibuf.texi (Minibuffer Misc): Add set-minibuffer-window.
|
||||
|
||||
* lists.texi (Building Lists): remq moved elsewhere.
|
||||
(Sets And Lists): remq moved here.
|
||||
(Association Lists): Refer to assoc-string.
|
||||
|
||||
* internals.texi (Garbage Collection): Add memory-use-counts.
|
||||
|
||||
* frames.texi (Frames and Windows): Add set-frame-selected-window
|
||||
and frame-root-window.
|
||||
|
||||
* files.texi (Contents of Directories):
|
||||
Add directory-files-and-attributes.
|
||||
|
||||
* display.texi (Refresh Screen): Add force-window-update.
|
||||
(Invisible Text): Explain about moving point out of invis text.
|
||||
(Overlay Properties): Add overlay-properties.
|
||||
(Managing Overlays): Add overlayp.
|
||||
(GIF Images): Invalid image number displays a hollow box.
|
||||
|
||||
* buffers.texi (Buffer Modification): Add restore-buffer-modified-p.
|
||||
(Killing Buffers): Add buffer-live-p.
|
||||
|
||||
2003-12-25 Markus Rost <rost@mathematik.uni-bielefeld.de>
|
||||
|
||||
* display.texi (Fringes): Fix typo "set-buffer-window".
|
||||
|
|
|
|||
|
|
@ -517,6 +517,11 @@ function @code{force-mode-line-update} works by doing this:
|
|||
@end example
|
||||
@end defun
|
||||
|
||||
@defun restore-buffer-modified-p flag
|
||||
Like @code{set-buffer-modified-p}, but does not force redisplay
|
||||
of mode lines.
|
||||
@end defun
|
||||
|
||||
@deffn Command not-modified
|
||||
This command marks the current buffer as unmodified, and not needing to
|
||||
be saved. With prefix arg, it marks the buffer as modified, so that it
|
||||
|
|
@ -953,6 +958,11 @@ variable @code{buffer-offer-save} automatically becomes buffer-local
|
|||
when set for any reason. @xref{Buffer-Local Variables}.
|
||||
@end defvar
|
||||
|
||||
@defun buffer-live-p buffer
|
||||
This function returns @code{t} if @var{object} is a buffer which has
|
||||
not been killed, @code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
@node Indirect Buffers
|
||||
@section Indirect Buffers
|
||||
@cindex indirect buffers
|
||||
|
|
|
|||
|
|
@ -53,6 +53,17 @@ Even more powerful is @code{redraw-display}:
|
|||
This function clears and redisplays all visible frames.
|
||||
@end deffn
|
||||
|
||||
This function forces certain windows to be redisplayed
|
||||
but does not clear them.
|
||||
|
||||
@defun force-window-update object
|
||||
This function forces redisplay of some or all windows. If
|
||||
@var{object} is a window, it forces redisplay of that window. If
|
||||
@var{object} is a buffer or buffer name, it forces redisplay of all
|
||||
windows displaying that buffer. If @var{object} is @code{nil}, it
|
||||
forces redisplay of all windows.
|
||||
@end defun
|
||||
|
||||
Processing user input takes absolute priority over redisplay. If you
|
||||
call these functions when input is available, they do nothing
|
||||
immediately, but a full redisplay does happen eventually---after all the
|
||||
|
|
@ -517,6 +528,7 @@ warnings buffer. Each element of the list should be a list of
|
|||
symbols. If it matches the first few elements in a warning type, then
|
||||
that warning is not logged.
|
||||
@end defopt
|
||||
|
||||
@node Invisible Text
|
||||
@section Invisible Text
|
||||
|
||||
|
|
@ -613,12 +625,22 @@ major mode should use the mode's own name as an element of
|
|||
@end example
|
||||
|
||||
@vindex line-move-ignore-invisible
|
||||
Ordinarily, commands that operate on text or move point do not care
|
||||
Ordinarily, functions that operate on text or move point do not care
|
||||
whether the text is invisible. The user-level line motion commands
|
||||
explicitly ignore invisible newlines if
|
||||
@code{line-move-ignore-invisible} is non-@code{nil}, but only because
|
||||
they are explicitly programmed to do so.
|
||||
|
||||
However, if a command ends with point inside or immediately after
|
||||
invisible text, the main editing loop moves point further forward or
|
||||
further backward (in the same direction that the command already moved
|
||||
it) until that condition is no longer true. Thus, if the command
|
||||
moved point back into an invisible range, Emacs moves point back to
|
||||
the beginning of that range, following the previous visible character.
|
||||
If the command moved point forward into an invisible range, Emacs
|
||||
moves point forward past the first visible character that follows the
|
||||
invisible text.
|
||||
|
||||
Incremental search can make invisible overlays visible temporarily
|
||||
and/or permanently when a match includes invisible text. To enable
|
||||
this, the overlay should have a non-@code{nil}
|
||||
|
|
@ -978,6 +1000,10 @@ is @code{nil}.
|
|||
@defun overlay-put overlay prop value
|
||||
This function sets the value of property @var{prop} recorded in
|
||||
@var{overlay} to @var{value}. It returns @var{value}.
|
||||
@end defun
|
||||
|
||||
@defun overlay-properties overlay
|
||||
This returns a copy of the property list of @var{overlay}.
|
||||
@end defun
|
||||
|
||||
See also the function @code{get-char-property} which checks both
|
||||
|
|
@ -1155,6 +1181,10 @@ property) rather than replacing it.
|
|||
This section describes the functions to create, delete and move
|
||||
overlays, and to examine their contents.
|
||||
|
||||
@defun overlayp object
|
||||
This function returns @code{t} if @var{object} is an overlay.
|
||||
@end defun
|
||||
|
||||
@defun make-overlay start end &optional buffer front-advance rear-advance
|
||||
This function creates and returns an overlay that belongs to
|
||||
@var{buffer} and ranges from @var{start} to @var{end}. Both @var{start}
|
||||
|
|
@ -3114,8 +3144,8 @@ them, Emacs can display them.
|
|||
@item :index @var{index}
|
||||
You can use @code{:index} to specify one image from a GIF file that
|
||||
contains more than one image. This property specifies use of image
|
||||
number @var{index} from the file. An error is signaled if the GIF file
|
||||
doesn't contain an image with index @var{index}.
|
||||
number @var{index} from the file. If the GIF file doesn't contain an
|
||||
image with index @var{index}, the image displays as a hollow box.
|
||||
@end table
|
||||
|
||||
@ignore
|
||||
|
|
|
|||
|
|
@ -2165,6 +2165,14 @@ An error is signaled if @var{directory} is not the name of a directory
|
|||
that can be read.
|
||||
@end defun
|
||||
|
||||
@defun directory-files-and-attributes directory &optional full-name match-regexp nosort
|
||||
This is similar to @code{directory-files} in deciding which files
|
||||
to report on and how to report their names. However, instead
|
||||
of returning a list of file names, it returns for each file a
|
||||
list @code{(@var{filename} . @var{attributes})}, where @var{attributes}
|
||||
is what @code{file-attributes} would return for that file.
|
||||
@end defun
|
||||
|
||||
@defun file-name-all-versions file dirname
|
||||
This function returns a list of all versions of the file named
|
||||
@var{file} in directory @var{dirname}.
|
||||
|
|
|
|||
|
|
@ -921,11 +921,22 @@ selected window with @code{frame-selected-window}.
|
|||
@defun frame-selected-window frame
|
||||
This function returns the window on @var{frame} that is selected within
|
||||
@var{frame}.
|
||||
@end defun
|
||||
|
||||
@defun set-frame-selected-window frame window
|
||||
This sets the selected window of frame @var{frame} to @var{window}.
|
||||
If @var{frame} is @code{nil}, it operates on the selected frame. If
|
||||
@var{frame} is the selected frame, this makes @var{window} the
|
||||
selected window.
|
||||
@end defun
|
||||
|
||||
Conversely, selecting a window for Emacs with @code{select-window} also
|
||||
makes that window selected within its frame. @xref{Selecting Windows}.
|
||||
|
||||
@defun frame-root-window frame
|
||||
This function returns the window at the top left corner of @var{frame}.
|
||||
@end defun
|
||||
|
||||
Another function that (usually) returns one of the windows in a given
|
||||
frame is @code{minibuffer-window}. @xref{Minibuffer Misc}.
|
||||
|
||||
|
|
|
|||
|
|
@ -383,6 +383,12 @@ You can use this to get a general idea of how your actions affect the
|
|||
memory usage.
|
||||
@end defun
|
||||
|
||||
@defun memory-use-counts
|
||||
This returns a list of numbers that count the number of objects
|
||||
created in this Emacs session. Each of these counters increments for
|
||||
a certain kind of object. See the documentation string for details.
|
||||
@end defun
|
||||
|
||||
@defvar gcs-done
|
||||
This variable contains the total number of garbage collections
|
||||
done so far in this Emacs session.
|
||||
|
|
|
|||
|
|
@ -707,31 +707,6 @@ x
|
|||
@end example
|
||||
@end defun
|
||||
|
||||
@defun remq object list
|
||||
This function returns a copy of @var{list}, with all elements removed
|
||||
which are @code{eq} to @var{object}. The letter @samp{q} in @code{remq}
|
||||
says that it uses @code{eq} to compare @var{object} against the elements
|
||||
of @code{list}.
|
||||
|
||||
@example
|
||||
@group
|
||||
(setq sample-list '(a b c a b c))
|
||||
@result{} (a b c a b c)
|
||||
@end group
|
||||
@group
|
||||
(remq 'a sample-list)
|
||||
@result{} (b c b c)
|
||||
@end group
|
||||
@group
|
||||
sample-list
|
||||
@result{} (a b c a b c)
|
||||
@end group
|
||||
@end example
|
||||
@noindent
|
||||
The function @code{delq} offers a way to perform this operation
|
||||
destructively. See @ref{Sets And Lists}.
|
||||
@end defun
|
||||
|
||||
@defun copy-tree tree &optional vecp
|
||||
This function returns a copy the tree @code{tree}. If @var{tree} is a
|
||||
cons cell, this makes a new cons cell with the same @sc{car} and
|
||||
|
|
@ -1346,9 +1321,34 @@ and the @code{(4)} in the @code{sample-list} are not @code{eq}:
|
|||
@end group
|
||||
@end example
|
||||
|
||||
The following two functions are like @code{memq} and @code{delq} but use
|
||||
@code{equal} rather than @code{eq} to compare elements. @xref{Equality
|
||||
Predicates}.
|
||||
@defun remq object list
|
||||
This function returns a copy of @var{list}, with all elements removed
|
||||
which are @code{eq} to @var{object}. The letter @samp{q} in @code{remq}
|
||||
says that it uses @code{eq} to compare @var{object} against the elements
|
||||
of @code{list}.
|
||||
|
||||
@example
|
||||
@group
|
||||
(setq sample-list '(a b c a b c))
|
||||
@result{} (a b c a b c)
|
||||
@end group
|
||||
@group
|
||||
(remq 'a sample-list)
|
||||
@result{} (b c b c)
|
||||
@end group
|
||||
@group
|
||||
sample-list
|
||||
@result{} (a b c a b c)
|
||||
@end group
|
||||
@end example
|
||||
@noindent
|
||||
The function @code{delq} offers a way to perform this operation
|
||||
destructively. See @ref{Sets And Lists}.
|
||||
@end defun
|
||||
|
||||
The following three functions are like @code{memq}, @code{delq} and
|
||||
@code{remq}, but use @code{equal} rather than @code{eq} to compare
|
||||
elements. @xref{Equality Predicates}.
|
||||
|
||||
@defun member object list
|
||||
The function @code{member} tests to see whether @var{object} is a member
|
||||
|
|
@ -1541,9 +1541,9 @@ Here is another example, in which the keys and values are not symbols:
|
|||
@end smallexample
|
||||
@end defun
|
||||
|
||||
The functions @code{assoc-ignore-representation} and
|
||||
@code{assoc-ignore-case} are much like @code{assoc} except using
|
||||
@code{compare-strings} to do the comparison. @xref{Text Comparison}.
|
||||
The function @code{assoc-string} is much like @code{assoc} except
|
||||
that it ignores certain differences between strings. @xref{Text
|
||||
Comparison}.
|
||||
|
||||
@defun rassoc value alist
|
||||
This function returns the first association with value @var{value} in
|
||||
|
|
|
|||
|
|
@ -1645,6 +1645,14 @@ frame---a frame that has no minibuffer of its own necessarily uses some
|
|||
other frame's minibuffer window.
|
||||
@end defun
|
||||
|
||||
@defun set-minibuffer-window window
|
||||
This function specifies @var{window} as the minibuffer window to use.
|
||||
This affects where the minibuffer is displayed if you put text in it
|
||||
without invoking the usual minibuffer commands. It has no effect on
|
||||
the usual minibuffer input functions because they all start by
|
||||
choosing the minibuffer window according to the current frame.
|
||||
@end defun
|
||||
|
||||
@c Emacs 19 feature
|
||||
@defun window-minibuffer-p window
|
||||
This function returns non-@code{nil} if @var{window} is a minibuffer window.
|
||||
|
|
|
|||
|
|
@ -2024,9 +2024,10 @@ If you use @code{regexp-opt} to produce the regular expression
|
|||
@var{matcher}, then you can use @code{regexp-opt-depth} (@pxref{Syntax
|
||||
of Regexps}) to calculate the value for @var{match}.
|
||||
|
||||
@item (@var{matcher} . @var{facename})
|
||||
In this kind of element, @var{facename} is an expression whose value
|
||||
specifies the face name to use for highlighting.
|
||||
@item (@var{matcher} . @var{facespec})
|
||||
In this kind of element, @var{facespec} is an object which specifies
|
||||
the face variable to use for highlighting. In the simplest case, it
|
||||
is a Lisp variable (a symbol), whose value should be a face name.
|
||||
|
||||
@example
|
||||
;; @r{Highlight occurrences of @samp{fubar},}
|
||||
|
|
@ -2034,8 +2035,7 @@ specifies the face name to use for highlighting.
|
|||
("fubar" . fubar-face)
|
||||
@end example
|
||||
|
||||
The value of @var{facename} is usually a face name (a symbol), but it
|
||||
can also be a list of the form
|
||||
However, @var{facespec} can also be a list of the form
|
||||
|
||||
@example
|
||||
(face @var{face} @var{prop1} @var{val1} @var{prop2} @var{val2}@dots{})
|
||||
|
|
@ -2053,21 +2053,21 @@ which specifies how to highlight matches found by @var{matcher}.
|
|||
It has the form
|
||||
|
||||
@example
|
||||
(@var{subexp} @var{facename} @var{override} @var{laxmatch})
|
||||
(@var{subexp} @var{facespec} @var{override} @var{laxmatch})
|
||||
@end example
|
||||
|
||||
The @sc{car}, @var{subexp}, is an integer specifying which subexpression
|
||||
of the match to fontify (0 means the entire matching text). The second
|
||||
subelement, @var{facename}, specifies the face, as described above.
|
||||
subelement, @var{facespec}, specifies the face, as described above.
|
||||
|
||||
The last two values in @var{highlighter}, @var{override} and
|
||||
@var{laxmatch}, are flags. If @var{override} is @code{t}, this
|
||||
element can override existing fontification made by previous elements
|
||||
of @code{font-lock-keywords}. If it is @code{keep}, then each
|
||||
character is fontified if it has not been fontified already by some
|
||||
other element. If it is @code{prepend}, the face @var{facename} is
|
||||
added to the beginning of the @code{font-lock-face} property. If it
|
||||
is @code{append}, the face @var{facename} is added to the end of the
|
||||
other element. If it is @code{prepend}, the face specified by
|
||||
@var{facespec} is added to the beginning of the @code{font-lock-face}
|
||||
property. If it is @code{append}, the face is added to the end of the
|
||||
@code{font-lock-face} property.
|
||||
|
||||
If @var{laxmatch} is non-@code{nil}, it means there should be no error
|
||||
|
|
@ -2231,7 +2231,7 @@ textual modes.
|
|||
Additional properties (other than @code{font-lock-face}) that are
|
||||
being managed by Font Lock mode. Font Lock mode normally manages only
|
||||
the @code{font-lock-face} property; if you want it to manage others as
|
||||
well, you must specify them in a @var{facename} in
|
||||
well, you must specify them in a @var{facespec} in
|
||||
@code{font-lock-keywords} as well as adding them to this list.
|
||||
@end defvar
|
||||
|
||||
|
|
|
|||
|
|
@ -210,6 +210,18 @@ multibyte string. If @var{string} is a multibyte string, it is
|
|||
returned unchanged.
|
||||
@end defun
|
||||
|
||||
@defun multibyte-char-to-unibyte char
|
||||
This convert the multibyte character @var{char} to a unibyte
|
||||
character, based on @code{nonascii-translation-table} and
|
||||
@code{nonascii-insert-offset}.
|
||||
@end defun
|
||||
|
||||
@defun unibyte-char-to-multibyte char
|
||||
This convert the unibyte character @var{char} to a multibyte
|
||||
character, based on @code{nonascii-translation-table} and
|
||||
@code{nonascii-insert-offset}.
|
||||
@end defun
|
||||
|
||||
@node Selecting a Representation
|
||||
@section Selecting a Representation
|
||||
|
||||
|
|
@ -701,6 +713,26 @@ interested in.
|
|||
The variable @code{selection-coding-system} specifies how to encode
|
||||
selections for the window system. @xref{Window System Selections}.
|
||||
|
||||
@defvar file-name-coding-system
|
||||
The variable @code{file-name-coding-system} specifies the coding
|
||||
system to use for encoding file names. Emacs encodes file names using
|
||||
that coding system for all file operations. If
|
||||
@code{file-name-coding-system} is @code{nil}, Emacs uses a default
|
||||
coding system determined by the selected language environment. In the
|
||||
default language environment, any non-@acronym{ASCII} characters in
|
||||
file names are not encoded specially; they appear in the file system
|
||||
using the internal Emacs representation.
|
||||
@end defvar
|
||||
|
||||
@strong{Warning:} if you change @code{file-name-coding-system} (or
|
||||
the language environment) in the middle of an Emacs session, problems
|
||||
can result if you have already visited files whose names were encoded
|
||||
using the earlier coding system and are handled differently under the
|
||||
new coding system. If you try to save one of these buffers under the
|
||||
visited file name, saving may use the wrong file name, or it may get
|
||||
an error. If such a problem happens, use @kbd{C-x C-w} to specify a
|
||||
new file name for that buffer.
|
||||
|
||||
@node Lisp and Coding Systems
|
||||
@subsection Coding Systems in Lisp
|
||||
|
||||
|
|
|
|||
|
|
@ -1047,8 +1047,8 @@ pi/2
|
|||
@tex
|
||||
@math{\pi/2}
|
||||
@end tex
|
||||
(inclusive) whose sine is @var{arg}; if, however, @var{arg}
|
||||
is out of range (outside [-1, 1]), then the result is a NaN.
|
||||
(inclusive) whose sine is @var{arg}; if, however, @var{arg} is out of
|
||||
range (outside [-1, 1]), it signals a @code{domain-error} error.
|
||||
@end defun
|
||||
|
||||
@defun acos arg
|
||||
|
|
@ -1059,8 +1059,8 @@ pi
|
|||
@tex
|
||||
@math{\pi}
|
||||
@end tex
|
||||
(inclusive) whose cosine is @var{arg}; if, however, @var{arg}
|
||||
is out of range (outside [-1, 1]), then the result is a NaN.
|
||||
(inclusive) whose cosine is @var{arg}; if, however, @var{arg} is out
|
||||
of range (outside [-1, 1]), it signals a @code{domain-error} error.
|
||||
@end defun
|
||||
|
||||
@defun atan y &optional x
|
||||
|
|
@ -1112,8 +1112,8 @@ If you don't specify @var{base}, the base
|
|||
@ifnottex
|
||||
@i{e}
|
||||
@end ifnottex
|
||||
is used. If @var{arg}
|
||||
is negative, the result is a NaN.
|
||||
is used. If @var{arg} is negative, it signals a @code{domain-error}
|
||||
error.
|
||||
@end defun
|
||||
|
||||
@ignore
|
||||
|
|
@ -1132,8 +1132,9 @@ lose accuracy.
|
|||
|
||||
@defun log10 arg
|
||||
This function returns the logarithm of @var{arg}, with base 10. If
|
||||
@var{arg} is negative, the result is a NaN. @code{(log10 @var{x})}
|
||||
@equiv{} @code{(log @var{x} 10)}, at least approximately.
|
||||
@var{arg} is negative, it signals a @code{domain-error} error.
|
||||
@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}, at least
|
||||
approximately.
|
||||
@end defun
|
||||
|
||||
@defun expt x y
|
||||
|
|
|
|||
|
|
@ -1010,6 +1010,13 @@ integers. Thus, you can use times obtained from @code{current-time}
|
|||
(see above) and from @code{file-attributes} (@pxref{File Attributes}).
|
||||
@end defun
|
||||
|
||||
@defun set-time-zone-rule tz
|
||||
This function specifies the local time zone according to @var{tz}. If
|
||||
@var{tz} is @code{nil}, that means to use an implementation-defined
|
||||
default time zone. If @var{tz} is @code{t}, that means to use
|
||||
Universal Time.
|
||||
@end defun
|
||||
|
||||
@defun float-time &optional time-value
|
||||
This function returns the current time as a floating-point number of
|
||||
seconds since the epoch. The argument @var{time-value}, if given,
|
||||
|
|
|
|||
|
|
@ -377,6 +377,14 @@ Since it is impossible to change the length of an existing string, it is
|
|||
an error if @var{obj} doesn't fit within @var{string}'s actual length,
|
||||
or if any new character requires a different number of bytes from the
|
||||
character currently present at that point in @var{string}.
|
||||
@end defun
|
||||
|
||||
To clear out a string that contained a password, use
|
||||
@code{clear-string}:
|
||||
|
||||
@defun clear-string string
|
||||
This clears the contents of @var{string} to zeros
|
||||
and may change its length.
|
||||
@end defun
|
||||
|
||||
@need 2000
|
||||
|
|
@ -518,13 +526,10 @@ two strings. The sign is negative if @var{string1} (or its specified
|
|||
portion) is less.
|
||||
@end defun
|
||||
|
||||
@defun assoc-ignore-case key alist
|
||||
@defunx assoc-ignore-representation key alist
|
||||
These functions work like @code{assoc}, except that @var{key} must be
|
||||
a string, all elements of @var{alist} must be cons cells whose
|
||||
@sc{car} is a string, and comparison is done using
|
||||
@code{compare-strings}. @code{assoc-ignore-case} ignores case
|
||||
differences, whereas @code{assoc-ignore-representation} does not.
|
||||
@defun assoc-string key alist &optional case-fold
|
||||
This function works like @code{assoc}, except that @var{key} must be a
|
||||
string, and comparison is done using @code{compare-strings}. If
|
||||
@var{case-fold} is non-@code{nil}, it ignores case differences.
|
||||
@xref{Association Lists}.
|
||||
@end defun
|
||||
|
||||
|
|
|
|||
|
|
@ -1890,7 +1890,8 @@ begins. @xref{Usual Display}.
|
|||
|
||||
Column number computations ignore the width of the window and the
|
||||
amount of horizontal scrolling. Consequently, a column value can be
|
||||
arbitrarily high. The first (or leftmost) column is numbered 0.
|
||||
arbitrarily high. The first (or leftmost) column is numbered 0. They
|
||||
also ignore overlays and text properties, aside from invisibility.
|
||||
|
||||
@defun current-column
|
||||
This function returns the horizontal position of point, measured in
|
||||
|
|
@ -2409,7 +2410,7 @@ has a category that is a symbol, then @code{get-text-property} returns
|
|||
the @var{prop} property of that symbol.
|
||||
@end defun
|
||||
|
||||
@defun get-char-property pos prop &optional object
|
||||
@defun get-char-property position prop &optional object
|
||||
This function is like @code{get-text-property}, except that it checks
|
||||
overlays first and then text properties. @xref{Overlays}.
|
||||
|
||||
|
|
@ -2422,6 +2423,20 @@ string, only text properties are considered, since strings never have
|
|||
overlays.
|
||||
@end defun
|
||||
|
||||
@defun get-char-property-and-overlay position prop &optional object
|
||||
This is like @code{get-char-property}, but gives extra information
|
||||
about the overlay that the property value comes from.
|
||||
|
||||
Its value is a cons cell whose @sc{car} is the property value, the
|
||||
same value @code{get-char-property} would return with the same
|
||||
arguments. Its @sc{cdr} is the overlay in which the property was
|
||||
found, or @code{nil}, if it was found as a text property or not found
|
||||
at all.
|
||||
|
||||
If @var{position} is at the end of @var{object}, both the @sc{car} and
|
||||
the @sc{cdr} of the value are @code{nil}.
|
||||
@end defun
|
||||
|
||||
@defvar char-property-alias-alist
|
||||
This variable holds an alist which maps property names to a list of
|
||||
alternative property names. If a character does not specify a direct
|
||||
|
|
@ -2860,11 +2875,13 @@ The @code{keymap} property specifies an additional keymap for
|
|||
commands. The property's value for the character before point applies
|
||||
if it is non-@code{nil} and rear-sticky, and the property's value for
|
||||
the character after point applies if it is non-@code{nil} and
|
||||
front-sticky. When the value applies, it is used for key lookup
|
||||
before the buffer's local map. (For mouse clicks, the position of the
|
||||
click is used instead of the position of point.) If the property
|
||||
value is a symbol, the symbol's function definition is used as the
|
||||
keymap. @xref{Active Keymaps}.
|
||||
front-sticky. (For mouse clicks, the position of the click is used
|
||||
instead of the position of point.) If the property value is a symbol,
|
||||
the symbol's function definition is used as the keymap.
|
||||
|
||||
When this keymap applies, it is used for key lookup before the minor
|
||||
mode keymaps and before the buffer's local map. @xref{Active
|
||||
Keymaps}.
|
||||
|
||||
@item local-map
|
||||
@kindex local-map @r{(text property)}
|
||||
|
|
|
|||
|
|
@ -1335,6 +1335,12 @@ This returns @code{t} if @var{variable} is buffer-local in buffer
|
|||
@code{nil}.
|
||||
@end defun
|
||||
|
||||
@defun local-variable-if-set-p variable &optional buffer
|
||||
This returns @code{t} if @var{variable} will become buffer-local in
|
||||
buffer @var{buffer} (which defaults to the current buffer) if it is
|
||||
set there.
|
||||
@end defun
|
||||
|
||||
@defun buffer-local-value variable buffer
|
||||
This function returns the buffer-local binding of @var{variable} (a
|
||||
symbol) in buffer @var{buffer}. If @var{variable} does not have a
|
||||
|
|
|
|||
|
|
@ -1027,6 +1027,14 @@ list is the regular expression, and the rest of the list says how to
|
|||
create the frame. See above, under @code{special-display-buffer-names}.
|
||||
@end defopt
|
||||
|
||||
@defun special-display-p buffer-name
|
||||
This function returns non-@code{nil} if displaying a buffer
|
||||
named @var{buffer-name} with @code{display-buffer} would
|
||||
create a special frame. The value is @code{t} if it would
|
||||
use the default frame paramaters, or else the specified list
|
||||
of frame parameters.
|
||||
@end defun
|
||||
|
||||
@defvar special-display-function
|
||||
This variable holds the function to call to display a buffer specially.
|
||||
It receives the buffer as an argument, and should return the window in
|
||||
|
|
@ -1075,6 +1083,12 @@ the regular expressions in this list, @code{display-buffer} handles the
|
|||
buffer by switching to it in the selected window.
|
||||
@end defopt
|
||||
|
||||
@defun same-window-p buffer-name
|
||||
This function returns @code{t} if displaying a buffer
|
||||
named @var{buffer-name} with @code{display-buffer} would
|
||||
put it in the selected window.
|
||||
@end defun
|
||||
|
||||
@c Emacs 19 feature
|
||||
@defvar display-buffer-function
|
||||
This variable is the most flexible way to customize the behavior of
|
||||
|
|
@ -2163,10 +2177,15 @@ regards configurations as unequal if they differ in any respect, even a
|
|||
saved point or mark.
|
||||
@end defun
|
||||
|
||||
Primitives to look inside of window configurations would make sense,
|
||||
but none are implemented. It is not clear they are useful enough to
|
||||
be worth implementing. See the file @file{winner.el} for some more
|
||||
operations on windows configurations.
|
||||
@defun window-configuration-frame config
|
||||
This function returns the frame for which the window configuration
|
||||
@var{config} was made.
|
||||
@end defun
|
||||
|
||||
Other primitives to look inside of window configurations would make
|
||||
sense, but are not implemented because we did not need them. See the
|
||||
file @file{winner.el} for some more operations on windows
|
||||
configurations.
|
||||
|
||||
@node Window Hooks
|
||||
@section Hooks for Window Scrolling and Changes
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
2003-12-29 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* viper.texi (Vi Macros): Fix reference to the Emacs manual.
|
||||
|
||||
* programs.texi (C Modes): Fix the xref.
|
||||
|
||||
2003-12-23 Nick Roberts <nick@nick.uklinux.net>
|
||||
|
||||
* building.texi (Watch Expressions): Update.
|
||||
|
|
|
|||
|
|
@ -1398,8 +1398,8 @@ Mode}). The Foldout package provides folding-editor features
|
|||
|
||||
This section gives a brief description of the special features
|
||||
available in C, C++, Objective-C, Java, CORBA IDL, and Pike modes.
|
||||
(These are called ``C mode and related modes.'') @xref{Top, CC Mode,
|
||||
ccmode, , CC Mode}, for a more extensive description of these modes
|
||||
(These are called ``C mode and related modes.'') @xref{Top, , CC Mode,
|
||||
ccmode, CC Mode}, for a more extensive description of these modes
|
||||
and their special features.
|
||||
|
||||
@menu
|
||||
|
|
|
|||
|
|
@ -2779,7 +2779,7 @@ As if all that is not enough, Viper (through its interface to Emacs
|
|||
macros) lets the user define keyboard macros that ask for confirmation or
|
||||
even prompt the user for input and then continue. To do this, one should
|
||||
type @kbd{C-x q} (for confirmation) or @kbd{C-u C-x q} (for prompt).
|
||||
For details, @pxref{Kbd Macro Query,,Customization,emacs,The GNU Emacs
|
||||
For details, @pxref{Keyboard Macro Query,,Customization,emacs,The GNU Emacs
|
||||
Manual} @refill
|
||||
|
||||
When the user finishes defining a macro (which is done by typing @kbd{C-x)} ---
|
||||
|
|
|
|||
|
|
@ -1,3 +1,46 @@
|
|||
2003-12-29 James Clark <jjc@jclark.com> (tiny change)
|
||||
|
||||
* fns.c (internal_equal): Return t for two NaN arguments.
|
||||
|
||||
2003-12-29 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* data.c (store_symval_forwarding): Handle setting
|
||||
default-fill-column, etc., by changing the value in
|
||||
buffers that use the default.
|
||||
|
||||
* minibuf.c (Fset_minibuffer_window): Doc fix.
|
||||
|
||||
* fileio.c (choose_write_coding_system): Ignore auto_saving
|
||||
if using the visited file for auto saves.
|
||||
(Fwrite_region): Don't update SAVE_MODIFF
|
||||
if auto-saving in visited file.
|
||||
|
||||
2003-12-29 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* dispextern.h (face_font_available_p): Extern it.
|
||||
|
||||
* fontset.c (Voverriding_fontspec_alist): New variable.
|
||||
(lookup_overriding_fontspec): New function.
|
||||
(fontset_ref_via_base): Call lookup_overriding_fontspec if
|
||||
necessary.
|
||||
(fontset_font_pattern): Likewise.
|
||||
(regulalize_fontname): New function.
|
||||
(Fset_fontset_font): Call regulalize_fontname.
|
||||
(Fset_overriding_fontspec_internal): New function.
|
||||
(syms_of_fontset): Initialize and staticprop
|
||||
Voverriding_fontspec_alist. Defsubr
|
||||
Sset_overriding_fontspec_internal.
|
||||
|
||||
* xfaces.c (face_font_available_p): New function.
|
||||
|
||||
2003-12-28 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* buffer.c (Fother_buffer): Don't crash if BUF is nil
|
||||
or if its name is nil.
|
||||
|
||||
* buffer.c (Fkill_buffer): Don't delete auto-save file
|
||||
if it's the same as the visited file.
|
||||
|
||||
2003-12-28 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* coding.c (Fcheck_coding_system): Doc fix.
|
||||
|
|
|
|||
22
src/buffer.h
22
src/buffer.h
|
|
@ -906,8 +906,26 @@ extern int last_per_buffer_idx;
|
|||
(B)->local_flags[IDX] = (VAL); \
|
||||
} while (0)
|
||||
|
||||
/* Return the index of the per-buffer variable at offset OFFSET in the
|
||||
buffer structure. */
|
||||
/* Return the index value of the per-buffer variable at offset OFFSET
|
||||
in the buffer structure.
|
||||
|
||||
If the slot OFFSET has a corresponding default value in
|
||||
buffer_defaults, the index value is positive and has only one
|
||||
nonzero bit. When a buffer has its own local value for a slot, the
|
||||
bit for that slot (found in the same slot in this structure) is
|
||||
turned on in the buffer's local_flags array.
|
||||
|
||||
If the index value is -1, even though there may be a
|
||||
DEFVAR_PER_BUFFER for the slot, there is no default value for it;
|
||||
and the corresponding slot in buffer_defaults is not used.
|
||||
|
||||
If the index value is -2, then there is no DEFVAR_PER_BUFFER for
|
||||
the slot, but there is a default value which is copied into each
|
||||
new buffer.
|
||||
|
||||
If a slot in this structure corresponding to a DEFVAR_PER_BUFFER is
|
||||
zero, that is a bug */
|
||||
|
||||
|
||||
#define PER_BUFFER_IDX(OFFSET) \
|
||||
XINT (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags))
|
||||
|
|
|
|||
32
src/data.c
32
src/data.c
|
|
@ -873,6 +873,8 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
|
|||
register Lisp_Object valcontents, newval;
|
||||
struct buffer *buf;
|
||||
{
|
||||
int offset;
|
||||
|
||||
switch (SWITCH_ENUM_CAST (XTYPE (valcontents)))
|
||||
{
|
||||
case Lisp_Misc:
|
||||
|
|
@ -892,6 +894,36 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
|
|||
|
||||
case Lisp_Misc_Objfwd:
|
||||
*XOBJFWD (valcontents)->objvar = newval;
|
||||
|
||||
/* If this variable is a default for something stored
|
||||
in the buffer itself, such as default-fill-column,
|
||||
find the buffers that don't have local values for it
|
||||
and update them. */
|
||||
if (XOBJFWD (valcontents)->objvar > (Lisp_Object *) &buffer_defaults
|
||||
&& XOBJFWD (valcontents)->objvar < (Lisp_Object *) (&buffer_defaults + 1))
|
||||
{
|
||||
int offset = ((char *) XOBJFWD (valcontents)->objvar
|
||||
- (char *) &buffer_defaults);
|
||||
int idx = PER_BUFFER_IDX (offset);
|
||||
|
||||
Lisp_Object tail, buf;
|
||||
|
||||
if (idx <= 0)
|
||||
break;
|
||||
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object buf;
|
||||
struct buffer *b;
|
||||
|
||||
buf = Fcdr (XCAR (tail));
|
||||
if (!BUFFERP (buf)) continue;
|
||||
b = XBUFFER (buf);
|
||||
|
||||
if (! PER_BUFFER_VALUE_P (b, idx))
|
||||
PER_BUFFER_VALUE (b, offset) = newval;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Lisp_Misc_Buffer_Objfwd:
|
||||
|
|
|
|||
|
|
@ -2582,6 +2582,7 @@ void clear_face_cache P_ ((int));
|
|||
unsigned long load_color P_ ((struct frame *, struct face *, Lisp_Object,
|
||||
enum lface_attribute_index));
|
||||
void unload_color P_ ((struct frame *, unsigned long));
|
||||
int face_font_available_p P_ ((struct frame *, Lisp_Object));
|
||||
int ascii_face_of_lisp_face P_ ((struct frame *, int));
|
||||
void prepare_face_for_display P_ ((struct frame *, struct face *));
|
||||
int xstricmp P_ ((const unsigned char *, const unsigned char *));
|
||||
|
|
|
|||
|
|
@ -2641,6 +2641,8 @@ call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6)
|
|||
#endif /* not NO_ARG_ARRAY */
|
||||
}
|
||||
|
||||
/* The caller should GCPRO all the elements of ARGS. */
|
||||
|
||||
DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0,
|
||||
doc: /* Call first argument as a function, passing remaining arguments to it.
|
||||
Return the value that function returns.
|
||||
|
|
|
|||
26
src/fileio.c
26
src/fileio.c
|
|
@ -4685,7 +4685,9 @@ choose_write_coding_system (start, end, filename,
|
|||
{
|
||||
Lisp_Object val;
|
||||
|
||||
if (auto_saving)
|
||||
if (auto_saving
|
||||
&& NILP (Fstring_equal (current_buffer->filename,
|
||||
current_buffer->auto_save_file_name)))
|
||||
{
|
||||
/* We use emacs-mule for auto saving... */
|
||||
setup_coding_system (Qemacs_mule, coding);
|
||||
|
|
@ -5221,7 +5223,14 @@ This does code conversion according to the value of
|
|||
update_mode_lines++;
|
||||
}
|
||||
else if (quietly)
|
||||
return Qnil;
|
||||
{
|
||||
if (auto_saving
|
||||
&& ! NILP (Fstring_equal (current_buffer->filename,
|
||||
current_buffer->auto_save_file_name)))
|
||||
SAVE_MODIFF = MODIFF;
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
if (!auto_saving)
|
||||
message_with_string ((INTEGERP (append)
|
||||
|
|
@ -5776,11 +5785,14 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
|
|||
minibuffer_auto_raise = 0;
|
||||
auto_saving = 1;
|
||||
|
||||
/* First, save all files which don't have handlers. If Emacs is
|
||||
crashing, the handlers may tweak what is causing Emacs to crash
|
||||
in the first place, and it would be a shame if Emacs failed to
|
||||
autosave perfectly ordinary files because it couldn't handle some
|
||||
ange-ftp'd file. */
|
||||
/* On first pass, save all files that don't have handlers.
|
||||
On second pass, save all files that do have handlers.
|
||||
|
||||
If Emacs is crashing, the handlers may tweak what is causing
|
||||
Emacs to crash in the first place, and it would be a shame if
|
||||
Emacs failed to autosave perfectly ordinary files because it
|
||||
couldn't handle some ange-ftp'd file. */
|
||||
|
||||
for (do_handled_files = 0; do_handled_files < 2; do_handled_files++)
|
||||
for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
|
|
|
|||
10
src/fns.c
10
src/fns.c
|
|
@ -2169,7 +2169,15 @@ internal_equal (o1, o2, depth)
|
|||
switch (XTYPE (o1))
|
||||
{
|
||||
case Lisp_Float:
|
||||
return (extract_float (o1) == extract_float (o2));
|
||||
{
|
||||
double d1, d2;
|
||||
|
||||
d1 = extract_float (o1);
|
||||
d2 = extract_float (o2);
|
||||
/* If d is a NaN, then d != d. Two NaNs should be `equal' even
|
||||
though they are not =. */
|
||||
return d1 == d2 || (d1 != d1 && d2 != d2);
|
||||
}
|
||||
|
||||
case Lisp_Cons:
|
||||
if (!internal_equal (XCAR (o1), XCAR (o2), depth + 1))
|
||||
|
|
|
|||
170
src/fontset.c
170
src/fontset.c
|
|
@ -140,6 +140,10 @@ static int next_fontset_id;
|
|||
font for each characters. */
|
||||
static Lisp_Object Vdefault_fontset;
|
||||
|
||||
/* Alist of font specifications. It override the font specification
|
||||
in the default fontset. */
|
||||
static Lisp_Object Voverriding_fontspec_alist;
|
||||
|
||||
Lisp_Object Vfont_encoding_alist;
|
||||
Lisp_Object Vuse_default_ascent;
|
||||
Lisp_Object Vignore_relative_composition;
|
||||
|
|
@ -184,11 +188,13 @@ void (*check_window_system_func) P_ ((void));
|
|||
|
||||
/* Prototype declarations for static functions. */
|
||||
static Lisp_Object fontset_ref P_ ((Lisp_Object, int));
|
||||
static Lisp_Object lookup_overriding_fontspec P_ ((Lisp_Object, int));
|
||||
static void fontset_set P_ ((Lisp_Object, int, Lisp_Object));
|
||||
static Lisp_Object make_fontset P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
|
||||
static int fontset_id_valid_p P_ ((int));
|
||||
static Lisp_Object fontset_pattern_regexp P_ ((Lisp_Object));
|
||||
static Lisp_Object font_family_registry P_ ((Lisp_Object, int));
|
||||
static Lisp_Object regulalize_fontname P_ ((Lisp_Object));
|
||||
|
||||
|
||||
/********** MACROS AND FUNCTIONS TO HANDLE FONTSET **********/
|
||||
|
|
@ -241,6 +247,46 @@ fontset_ref (fontset, c)
|
|||
}
|
||||
|
||||
|
||||
static Lisp_Object
|
||||
lookup_overriding_fontspec (frame, c)
|
||||
Lisp_Object frame;
|
||||
int c;
|
||||
{
|
||||
Lisp_Object tail;
|
||||
|
||||
for (tail = Voverriding_fontspec_alist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object val, target, elt;
|
||||
|
||||
val = XCAR (tail);
|
||||
target = XCAR (val);
|
||||
val = XCDR (val);
|
||||
/* Now VAL is (NO-FRAME-LIST OK-FRAME-LIST CHAR FONTNAME). */
|
||||
if (NILP (Fmemq (frame, XCAR (val)))
|
||||
&& (CHAR_TABLE_P (target)
|
||||
? ! NILP (CHAR_TABLE_REF (target, c))
|
||||
: XINT (target) == CHAR_CHARSET (c)))
|
||||
{
|
||||
val = XCDR (val);
|
||||
elt = XCDR (val);
|
||||
if (NILP (Fmemq (frame, XCAR (val))))
|
||||
{
|
||||
if (! face_font_available_p (XFRAME (frame), XCDR (elt)))
|
||||
{
|
||||
val = XCDR (XCAR (tail));
|
||||
XSETCAR (val, Fcons (frame, XCAR (val)));
|
||||
continue;
|
||||
}
|
||||
XSETCAR (val, Fcons (frame, XCAR (val)));
|
||||
}
|
||||
if (NILP (XCAR (elt)))
|
||||
XSETCAR (elt, make_number (c));
|
||||
return elt;
|
||||
}
|
||||
}
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
#define FONTSET_REF_VIA_BASE(fontset, c) fontset_ref_via_base (fontset, &c)
|
||||
|
||||
static Lisp_Object
|
||||
|
|
@ -254,8 +300,12 @@ fontset_ref_via_base (fontset, c)
|
|||
if (SINGLE_BYTE_CHAR_P (*c))
|
||||
return FONTSET_ASCII (fontset);
|
||||
|
||||
elt = FONTSET_REF (FONTSET_BASE (fontset), *c);
|
||||
if (NILP (elt) && ! EQ (fontset, Vdefault_fontset))
|
||||
elt = Qnil;
|
||||
if (! EQ (FONTSET_BASE (fontset), Vdefault_fontset))
|
||||
elt = FONTSET_REF (FONTSET_BASE (fontset), *c);
|
||||
if (NILP (elt))
|
||||
elt = lookup_overriding_fontspec (FONTSET_FRAME (fontset), *c);
|
||||
if (NILP (elt) && ! EQ (FONTSET_BASE (fontset), Vdefault_fontset))
|
||||
elt = FONTSET_REF (Vdefault_fontset, *c);
|
||||
if (NILP (elt))
|
||||
return Qnil;
|
||||
|
|
@ -550,6 +600,13 @@ fontset_font_pattern (f, id, c)
|
|||
fontset = FONTSET_BASE (fontset);
|
||||
elt = FONTSET_REF (fontset, c);
|
||||
}
|
||||
if (NILP (elt))
|
||||
{
|
||||
Lisp_Object frame;
|
||||
|
||||
XSETFRAME (frame, f);
|
||||
elt = lookup_overriding_fontspec (frame, c);
|
||||
}
|
||||
if (NILP (elt))
|
||||
elt = FONTSET_REF (Vdefault_fontset, c);
|
||||
|
||||
|
|
@ -980,6 +1037,33 @@ check_fontset_name (name)
|
|||
return FONTSET_FROM_ID (id);
|
||||
}
|
||||
|
||||
/* Downcase FONTNAME or car and cdr of FONTNAME. If FONTNAME is a
|
||||
string, maybe change FONTNAME to (FAMILY . REGISTRY). */
|
||||
|
||||
static Lisp_Object
|
||||
regulalize_fontname (Lisp_Object fontname)
|
||||
{
|
||||
Lisp_Object family, registry;
|
||||
|
||||
if (STRINGP (fontname))
|
||||
return font_family_registry (Fdowncase (fontname), 0);
|
||||
|
||||
CHECK_CONS (fontname);
|
||||
family = XCAR (fontname);
|
||||
registry = XCDR (fontname);
|
||||
if (!NILP (family))
|
||||
{
|
||||
CHECK_STRING (family);
|
||||
family = Fdowncase (family);
|
||||
}
|
||||
if (!NILP (registry))
|
||||
{
|
||||
CHECK_STRING (registry);
|
||||
registry = Fdowncase (registry);
|
||||
}
|
||||
return Fcons (family, registry);
|
||||
}
|
||||
|
||||
DEFUN ("set-fontset-font", Fset_fontset_font, Sset_fontset_font, 3, 4, 0,
|
||||
doc: /* Modify fontset NAME to use FONTNAME for CHARACTER.
|
||||
|
||||
|
|
@ -1043,34 +1127,12 @@ name of a font, REGISTRY is a registry name of a font. */)
|
|||
error ("Can't change font for a single byte character");
|
||||
}
|
||||
|
||||
if (STRINGP (fontname))
|
||||
{
|
||||
fontname = Fdowncase (fontname);
|
||||
elt = Fcons (make_number (from), font_family_registry (fontname, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECK_CONS (fontname);
|
||||
family = XCAR (fontname);
|
||||
registry = XCDR (fontname);
|
||||
if (!NILP (family))
|
||||
{
|
||||
CHECK_STRING (family);
|
||||
family = Fdowncase (family);
|
||||
}
|
||||
if (!NILP (registry))
|
||||
{
|
||||
CHECK_STRING (registry);
|
||||
registry = Fdowncase (registry);
|
||||
}
|
||||
elt = Fcons (make_number (from), Fcons (family, registry));
|
||||
}
|
||||
|
||||
/* The arg FRAME is kept for backward compatibility. We only check
|
||||
the validity. */
|
||||
if (!NILP (frame))
|
||||
CHECK_LIVE_FRAME (frame);
|
||||
|
||||
elt = Fcons (make_number (from), regulalize_fontname (fontname));
|
||||
for (; from <= to; from++)
|
||||
FONTSET_SET (fontset, from, elt);
|
||||
Foptimize_char_table (fontset);
|
||||
|
|
@ -1445,6 +1507,60 @@ DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0,
|
|||
return list;
|
||||
}
|
||||
|
||||
DEFUN ("set-overriding-fontspec-internal", Fset_overriding_fontspec_internal,
|
||||
Sset_overriding_fontspec_internal, 1, 1, 0,
|
||||
doc: /* Internal use only.
|
||||
|
||||
FONTLIST is an alist of TARGET vs FONTNAME, where TARGET is a charset
|
||||
or a char-table, FONTNAME have the same meanings as in
|
||||
`set-fontset-font'.
|
||||
|
||||
It overrides the font specifications for each TARGET in the default
|
||||
fontset by the corresponding FONTNAME.
|
||||
|
||||
If TARGET is a charset, targets are all characters in the charset. If
|
||||
TARGET is a char-table, targets are characters whose value is non-nil
|
||||
in the table.
|
||||
|
||||
It is intended that this function is called only from
|
||||
`set-language-environment'. */)
|
||||
(fontlist)
|
||||
Lisp_Object fontlist;
|
||||
{
|
||||
Lisp_Object tail;
|
||||
|
||||
fontlist = Fcopy_sequence (fontlist);
|
||||
/* Now FONTLIST is ((TARGET . FONTNAME) ...). Reform it to ((TARGET
|
||||
nil nil nil FONTSPEC) ...), where TARGET is a charset-id or a
|
||||
char-table. */
|
||||
for (tail = fontlist; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
Lisp_Object elt, target;
|
||||
|
||||
elt = XCAR (tail);
|
||||
target = Fcar (elt);
|
||||
elt = Fcons (Qnil, regulalize_fontname (Fcdr (elt)));
|
||||
if (! CHAR_TABLE_P (target))
|
||||
{
|
||||
int charset, c;
|
||||
|
||||
CHECK_SYMBOL (target);
|
||||
charset = get_charset_id (target);
|
||||
if (charset < 0)
|
||||
error ("Invalid charset %s", SDATA (SYMBOL_NAME (target)));
|
||||
target = make_number (charset);
|
||||
c = MAKE_CHAR (charset, 0, 0);
|
||||
XSETCAR (elt, make_number (c));
|
||||
}
|
||||
elt = Fcons (target, Fcons (Qnil, Fcons (Qnil, elt)));
|
||||
XSETCAR (tail, elt);
|
||||
}
|
||||
Voverriding_fontspec_alist = fontlist;
|
||||
clear_face_cache (0);
|
||||
++windows_or_buffers_changed;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
syms_of_fontset ()
|
||||
{
|
||||
|
|
@ -1483,6 +1599,9 @@ syms_of_fontset ()
|
|||
AREF (Vfontset_table, 0) = Vdefault_fontset;
|
||||
next_fontset_id = 1;
|
||||
|
||||
Voverriding_fontspec_alist = Qnil;
|
||||
staticpro (&Voverriding_fontspec_alist);
|
||||
|
||||
DEFVAR_LISP ("font-encoding-alist", &Vfont_encoding_alist,
|
||||
doc: /* Alist of fontname patterns vs corresponding encoding info.
|
||||
Each element looks like (REGEXP . ENCODING-INFO),
|
||||
|
|
@ -1548,6 +1667,7 @@ at the vertical center of lines. */);
|
|||
defsubr (&Sfontset_info);
|
||||
defsubr (&Sfontset_font);
|
||||
defsubr (&Sfontset_list);
|
||||
defsubr (&Sset_overriding_fontspec_internal);
|
||||
}
|
||||
|
||||
/* arch-tag: ea861585-2f5f-4e5b-9849-d04a9c3a3537
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ choose_minibuf_frame_1 (ignore)
|
|||
DEFUN ("set-minibuffer-window", Fset_minibuffer_window,
|
||||
Sset_minibuffer_window, 1, 1, 0,
|
||||
doc: /* Specify which minibuffer window to use for the minibuffer.
|
||||
This effects where the minibuffer is displayed if you put text in it
|
||||
This affects where the minibuffer is displayed if you put text in it
|
||||
without invoking the usual minibuffer commands. */)
|
||||
(window)
|
||||
Lisp_Object window;
|
||||
|
|
|
|||
63
src/xfaces.c
63
src/xfaces.c
|
|
@ -2564,6 +2564,69 @@ x_face_list_fonts (f, pattern, pfonts, nfonts, try_alternatives_p)
|
|||
}
|
||||
|
||||
|
||||
/* Check if a font matching pattern_offset_t on frame F is available
|
||||
or not. PATTERN may be a cons (FAMILY . REGISTRY), in which case,
|
||||
a font name pattern is generated from FAMILY and REGISTRY. */
|
||||
|
||||
int
|
||||
face_font_available_p (f, pattern)
|
||||
struct frame *f;
|
||||
Lisp_Object pattern;
|
||||
{
|
||||
Lisp_Object fonts;
|
||||
|
||||
if (! STRINGP (pattern))
|
||||
{
|
||||
Lisp_Object family, registry;
|
||||
char *family_str, *registry_str, *pattern_str;
|
||||
|
||||
CHECK_CONS (pattern);
|
||||
family = XCAR (pattern);
|
||||
if (NILP (family))
|
||||
family_str = "*";
|
||||
else
|
||||
{
|
||||
CHECK_STRING (family);
|
||||
family_str = (char *) SDATA (family);
|
||||
}
|
||||
registry = XCDR (pattern);
|
||||
if (NILP (registry))
|
||||
registry_str = "*";
|
||||
else
|
||||
{
|
||||
CHECK_STRING (registry);
|
||||
registry_str = (char *) SDATA (registry);
|
||||
}
|
||||
|
||||
pattern_str = (char *) alloca (strlen (family_str)
|
||||
+ strlen (registry_str)
|
||||
+ 10);
|
||||
strcpy (pattern_str, index (family_str, '-') ? "-" : "-*-");
|
||||
strcat (pattern_str, family_str);
|
||||
strcat (pattern_str, "-*-");
|
||||
strcat (pattern_str, registry_str);
|
||||
if (!index (registry_str, '-'))
|
||||
{
|
||||
if (registry_str[strlen (registry_str) - 1] == '*')
|
||||
strcat (pattern_str, "-*");
|
||||
else
|
||||
strcat (pattern_str, "*-*");
|
||||
}
|
||||
pattern = build_string (pattern_str);
|
||||
}
|
||||
|
||||
/* Get the list of fonts matching PATTERN. */
|
||||
#ifdef WINDOWSNT
|
||||
BLOCK_INPUT;
|
||||
fonts = w32_list_fonts (f, pattern, 0, 1);
|
||||
UNBLOCK_INPUT;
|
||||
#else
|
||||
fonts = x_list_fonts (f, pattern, -1, 1);
|
||||
#endif
|
||||
return XINT (Flength (fonts));
|
||||
}
|
||||
|
||||
|
||||
/* Determine fonts matching PATTERN on frame F. Sort resulting fonts
|
||||
using comparison function CMPFN. Value is the number of fonts
|
||||
found. If value is non-zero, *FONTS is set to a vector of
|
||||
|
|
|
|||
Loading…
Reference in a new issue