Commit e047f448 authored by Stefan Monnier's avatar Stefan Monnier

Rewrite abbrev.c in Elisp.

* image.c (Qcount): Don't declare as extern.
(syms_of_image): Initialize and staticpro `Qcount'.
* puresize.h (BASE_PURESIZE): Increase for the new abbrev.el functions.
* emacs.c (main): Don't call syms_of_abbrev.
* Makefile.in (obj): Remove abbrev.o.
(abbrev.o): Remove.
* abbrev.c: Remove.

Rewrite abbrev.c in Elisp.
* abbrev.el (abbrev-mode): Move custom group from cus-edit.el.
(abbrev-table-get, abbrev-table-put, abbrev-get)
(abbrev-put, make-abbrev-table, abbrev-table-p, clear-abbrev-table)
(define-abbrev, abbrev--check-chars, define-global-abbrev)
(define-mode-abbrev, abbrev--active-tables, abbrev-symbol)
(abbrev-expansion, abbrev--before-point, expand-abbrev)
(unexpand-abbrev, abbrev--write, abbrev--describe)
(insert-abbrev-table-description, define-abbrev-table):
New funs, largely transcribed from abbrev.c.
(abbrev-with-wrapper-hook): New macro.
(abbrev-table-name-list, global-abbrev-table)
(abbrev-minor-mode-table-alist, fundamental-mode-abbrev-table)
(abbrevs-changed, abbrev-all-caps, abbrev-start-location)
(abbrev-start-location-buffer, last-abbrev, last-abbrev-text)
(last-abbrev-location, pre-abbrev-expand-hook, abbrev-expand-function):
New vars, largely transcribed from abbrev.c.
* cus-edit.el (abbrev-mode): Remove.  Move to abbrev.el.
* cus-start.el: Remove abbrev-all-caps and pre-abbrev-expand-hook.
* loadup.el: Load "abbrev.el" before "lisp-mode.el".
parent a034393c
This diff is collapsed.
......@@ -166,6 +166,20 @@ its usage.
* Changes in Specialized Modes and Packages in Emacs 23.1
** abbrev was rewritten in Elisp and extended with more flexibility.
*** New functions: abbrev-get, abbrev-put, abbrev-table-get, abbrev-table-put,
abbrev-table-p.
*** Special hook `abbrev-expand-functions' obsoletes `pre-abbrev-expand-hook'.
*** `make-abbrev-table', `define-abbrev', `define-abbrev-table' all take
extra arguments for arbitrary properties.
*** New variable `abbrev-minor-mode-table-alist'.
*** `local-abbrev-table' can hold a list of abbrev-tables.
*** Abbrevs have now the following special properties:
`count', `system-flag', `:enable-function', `:case-fixed'.
*** Abbrev-tables have now the following special properties:
`:parents', `:case-fixed', `:enable-function', `:regexp',
`abbrev-table-modiff'.
** isearch can now search through multiple ChangeLog files.
When running isearch in a ChangeLog file, if the search fails,
then another C-s tries searching the previous ChangeLog,
......
2007-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
Rewrite abbrev.c in Elisp.
* abbrev.el (abbrev-mode): Move custom group from cus-edit.el.
(abbrev-table-get, abbrev-table-put, abbrev-get)
(abbrev-put, make-abbrev-table, abbrev-table-p, clear-abbrev-table)
(define-abbrev, abbrev--check-chars, define-global-abbrev)
(define-mode-abbrev, abbrev--active-tables, abbrev-symbol)
(abbrev-expansion, abbrev--before-point, expand-abbrev)
(unexpand-abbrev, abbrev--write, abbrev--describe)
(insert-abbrev-table-description, define-abbrev-table):
New funs, largely transcribed from abbrev.c.
(abbrev-with-wrapper-hook): New macro.
(abbrev-table-name-list, global-abbrev-table)
(abbrev-minor-mode-table-alist, fundamental-mode-abbrev-table)
(abbrevs-changed, abbrev-all-caps, abbrev-start-location)
(abbrev-start-location-buffer, last-abbrev, last-abbrev-text)
(last-abbrev-location, pre-abbrev-expand-hook, abbrev-expand-function):
New vars, largely transcribed from abbrev.c.
* cus-edit.el (abbrev-mode): Remove. Move to abbrev.el.
* cus-start.el: Remove abbrev-all-caps and pre-abbrev-expand-hook.
* loadup.el: Load "abbrev.el" before "lisp-mode.el".
2007-10-27 Glenn Morris <rgm@gnu.org>
* shell.el (shell-dirtrack-verbose, shell-directory-tracker): Doc fix.
......
This diff is collapsed.
......@@ -374,11 +374,6 @@
:prefix "custom-"
:group 'customize)
(defgroup abbrev-mode nil
"Word abbreviations mode."
:link '(custom-manual "(emacs)Abbrevs")
:group 'abbrev)
(defgroup alloc nil
"Storage allocation and gc for GNU Emacs Lisp interpreter."
:tag "Storage Allocation"
......
......@@ -35,10 +35,7 @@
;;; Code:
(let ((all '(;; abbrev.c
(abbrev-all-caps abbrev-mode boolean)
(pre-abbrev-expand-hook abbrev-mode hook)
;; alloc.c
(let ((all '(;; alloc.c
(gc-cons-threshold alloc integer)
(garbage-collection-messages alloc boolean)
;; buffer.c
......
......@@ -160,6 +160,7 @@
(load "textmodes/page")
(load "register")
(load "textmodes/paragraphs")
(load "abbrev") ;lisp-mode.el uses define-abbrev-table.
(load "emacs-lisp/lisp-mode")
(load "textmodes/text-mode")
(load "textmodes/fill")
......@@ -169,7 +170,6 @@
(if (eq system-type 'vax-vms)
(progn
(load "vmsproc")))
(load "abbrev")
(load "buff-menu")
(if (fboundp 'x-create-frame)
......
2007-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
Rewrite abbrev.c in Elisp.
* image.c (Qcount): Don't declare as extern.
(syms_of_image): Initialize and staticpro `Qcount'.
* puresize.h (BASE_PURESIZE): Increase for the new abbrev.el functions.
* emacs.c (main): Don't call syms_of_abbrev.
* Makefile.in (obj): Remove abbrev.o.
(abbrev.o): Remove.
* abbrev.c: Remove.
2007-10-26 Martin Rudalics <rudalics@gmx.at>
* window.c (window_min_size_2): Don't count header-line.
......
......@@ -603,7 +603,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \
cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
alloc.o data.o doc.o editfns.o callint.o \
eval.o floatfns.o fns.o print.o lread.o \
abbrev.o syntax.o UNEXEC bytecode.o \
syntax.o UNEXEC bytecode.o \
process.o callproc.o \
region-cache.o sound.o atimer.o \
doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
......@@ -1094,8 +1094,6 @@ stamp-oldxmenu:
it is so often changed in ways that do not require any recompilation
and so rarely changed in ways that do require any. */
abbrev.o: abbrev.c buffer.h window.h dispextern.h commands.h charset.h \
syntax.h $(config_h)
buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
dispextern.h $(INTERVAL_SRC) blockinput.h atimer.h systime.h charset.h \
$(config_h)
......@@ -1279,7 +1277,7 @@ composite.o: composite.c buffer.h charset.h $(INTERVAL_SRC) $(config_h)
sunfns.o: sunfns.c buffer.h window.h dispextern.h termhooks.h $(config_h)
#ifdef HAVE_CARBON
abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
scroll.o sysdep.o term.o terminal.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \
xterm.o xselect.o sound.o: macgui.h
......
This diff is collapsed.
......@@ -1543,7 +1543,6 @@ main (argc, argv
syms_of_fns ();
syms_of_floatfns ();
syms_of_abbrev ();
syms_of_buffer ();
syms_of_bytecode ();
syms_of_callint ();
......
......@@ -733,9 +733,9 @@ Lisp_Object Qxbm;
/* Keywords. */
extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile;
extern Lisp_Object QCdata, QCtype, Qcount;
extern Lisp_Object QCdata, QCtype;
extern Lisp_Object Qcenter;
Lisp_Object QCascent, QCmargin, QCrelief;
Lisp_Object QCascent, QCmargin, QCrelief, Qcount;
Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask;
Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask;
......@@ -9089,6 +9089,9 @@ non-numeric, there is no explicit limit on the size of images. */);
define_image_type (&xbm_type, 1);
define_image_type (&pbm_type, 1);
Qcount = intern ("count");
staticpro (&Qcount);
QCascent = intern (":ascent");
staticpro (&QCascent);
QCmargin = intern (":margin");
......
......@@ -43,7 +43,7 @@ Boston, MA 02110-1301, USA. */
#endif
#ifndef BASE_PURESIZE
#define BASE_PURESIZE (1170000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
#define BASE_PURESIZE (1180000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
#endif
/* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment