comparison lisp/subr.el @ 4369:ef9eb714f0e4

Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible. 2007-12-30 Aidan Kehoe <kehoea@parhasard.net> * subr.el (with-case-table): New. Idea and implementation taken from GNU's code of April 2007, before GPL V3 was implied. Thank you GNU. * iso8859-1.el (ascii-case-table): New. Idea taken from GNU. * iso8859-1.el : Change Jamie's implicit compile-time call to a macro literal into something comprehensible to and maintainable by mortals, using to cl.el's #'loop. * iso8859-1.el (ctl-arrow): Initialise it to something more comprehensible.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 30 Dec 2007 16:18:33 +0100
parents d9eb5ea14f65
children 42fad34efb3f
comparison
equal deleted inserted replaced
4356:cc293ef846d2 4369:ef9eb714f0e4
577 ; `(unwind-protect 577 ; `(unwind-protect
578 ; (let ((combine-after-change-calls t)) 578 ; (let ((combine-after-change-calls t))
579 ; . ,body) 579 ; . ,body)
580 ; (combine-after-change-execute))) 580 ; (combine-after-change-execute)))
581 581
582 (defmacro with-case-table (table &rest body)
583 "Execute the forms in BODY with TABLE as the current case table.
584 The value returned is the value of the last form in BODY."
585 (declare (indent 1) (debug t))
586 (let ((old-case-table (make-symbol "table"))
587 (old-buffer (make-symbol "buffer")))
588 `(let ((,old-case-table (current-case-table))
589 (,old-buffer (current-buffer)))
590 (unwind-protect
591 (progn (set-case-table ,table)
592 ,@body)
593 (with-current-buffer ,old-buffer
594 (set-case-table ,old-case-table))))))
582 595
583 (defvar delay-mode-hooks nil 596 (defvar delay-mode-hooks nil
584 "If non-nil, `run-mode-hooks' should delay running the hooks.") 597 "If non-nil, `run-mode-hooks' should delay running the hooks.")
585 (defvar delayed-mode-hooks nil 598 (defvar delayed-mode-hooks nil
586 "List of delayed mode hooks waiting to be run.") 599 "List of delayed mode hooks waiting to be run.")