Mercurial > emacs
comparison lisp/abbrev.el @ 85837:07865f189760
(abbrev-symbol): Correct let->let*.
(abbrev--before-point): Only use abbrev-start-location if before point.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 31 Oct 2007 15:47:02 +0000 |
parents | 13ae285f009a |
children | e5cfe61bd903 |
comparison
equal
deleted
inserted
replaced
85836:e22b1d805f02 | 85837:07865f189760 |
---|---|
647 Optional second arg TABLE is abbrev table to look it up in. | 647 Optional second arg TABLE is abbrev table to look it up in. |
648 The default is to try buffer's mode-specific abbrev table, then global table." | 648 The default is to try buffer's mode-specific abbrev table, then global table." |
649 (let ((tables (abbrev--active-tables table)) | 649 (let ((tables (abbrev--active-tables table)) |
650 sym) | 650 sym) |
651 (while (and tables (not (symbol-value sym))) | 651 (while (and tables (not (symbol-value sym))) |
652 (let ((table (pop tables)) | 652 (let* ((table (pop tables)) |
653 (case-fold (not (abbrev-table-get table :case-fixed)))) | 653 (case-fold (not (abbrev-table-get table :case-fixed)))) |
654 (setq tables (append (abbrev-table-get table :parents) tables)) | 654 (setq tables (append (abbrev-table-get table :parents) tables)) |
655 ;; In case the table doesn't set :case-fixed but some of the | 655 ;; In case the table doesn't set :case-fixed but some of the |
656 ;; abbrevs do, we have to be careful. | 656 ;; abbrevs do, we have to be careful. |
657 (setq sym | 657 (setq sym |
658 ;; First try without case-folding. | 658 ;; First try without case-folding. |
691 (if (and (< start (point-max)) | 691 (if (and (< start (point-max)) |
692 (eq (char-after start) ?-)) | 692 (eq (char-after start) ?-)) |
693 (delete-region start (1+ start))) | 693 (delete-region start (1+ start))) |
694 (skip-syntax-backward " ") | 694 (skip-syntax-backward " ") |
695 (setq end (point)) | 695 (setq end (point)) |
696 (setq name (buffer-substring start end)) | 696 (when (> end start) |
697 (goto-char pos) ; Restore point. | 697 (setq name (buffer-substring start end)) |
698 (list (abbrev-symbol name tables) name start end)) | 698 (goto-char pos) ; Restore point. |
699 (list (abbrev-symbol name tables) name start end))) | |
699 | 700 |
700 (while (and tables (not (car res))) | 701 (while (and tables (not (car res))) |
701 (let* ((table (pop tables)) | 702 (let* ((table (pop tables)) |
702 (enable-fun (abbrev-table-get table :enable-function))) | 703 (enable-fun (abbrev-table-get table :enable-function))) |
703 (setq tables (append (abbrev-table-get table :parents) tables)) | 704 (setq tables (append (abbrev-table-get table :parents) tables)) |