Mercurial > emacs
comparison lisp/complete.el @ 96376:c3309dba6542
American English spelling fix.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 27 Jun 2008 07:34:53 +0000 |
parents | ee5932bf781d |
children | cf3a44c40410 |
comparison
equal
deleted
inserted
replaced
96375:4abf11e31c26 | 96376:c3309dba6542 |
---|---|
931 ;; point to the hyphen [1]. If one calls PC-l-c-s immediately after, | 931 ;; point to the hyphen [1]. If one calls PC-l-c-s immediately after, |
932 ;; then without the last-command check, one is offered all | 932 ;; then without the last-command check, one is offered all |
933 ;; completions of "(ne", which is presumably not what one wants. | 933 ;; completions of "(ne", which is presumably not what one wants. |
934 ;; | 934 ;; |
935 ;; This is arguably (at least, it seems to be the existing intended | 935 ;; This is arguably (at least, it seems to be the existing intended |
936 ;; behaviour) what one _does_ want if point has been explicitly | 936 ;; behavior) what one _does_ want if point has been explicitly |
937 ;; positioned on the hyphen. Note that if PC-do-completion (qv) binds | 937 ;; positioned on the hyphen. Note that if PC-do-completion (qv) binds |
938 ;; completion-base-size to nil, then completion does not replace the | 938 ;; completion-base-size to nil, then completion does not replace the |
939 ;; correct amount of text in such cases. | 939 ;; correct amount of text in such cases. |
940 ;; | 940 ;; |
941 ;; Neither of these problems occur when using PC for filenames in the | 941 ;; Neither of these problems occur when using PC for filenames in the |
943 ;; an explicit value for END, and so uses (point-max). This is fine for | 943 ;; an explicit value for END, and so uses (point-max). This is fine for |
944 ;; a filename, because the end of the filename must be at the end of | 944 ;; a filename, because the end of the filename must be at the end of |
945 ;; the minibuffer. The same is not true for lisp symbols. | 945 ;; the minibuffer. The same is not true for lisp symbols. |
946 ;; | 946 ;; |
947 ;; [1] An alternate fix would be to not move point to the hyphen | 947 ;; [1] An alternate fix would be to not move point to the hyphen |
948 ;; in such cases, but that would make the behaviour different from | 948 ;; in such cases, but that would make the behavior different from |
949 ;; that for filenames. It seems PC moves point to the site of the | 949 ;; that for filenames. It seems PC moves point to the site of the |
950 ;; first difference between the possible completions. | 950 ;; first difference between the possible completions. |
951 ;; | 951 ;; |
952 ;; Alternatively alternatively, maybe end should be computed in | 952 ;; Alternatively alternatively, maybe end should be computed in |
953 ;; the same way as beg. That would change the behaviour though. | 953 ;; the same way as beg. That would change the behavior though. |
954 (if (equal last-command 'PC-lisp-complete-symbol) | 954 (if (equal last-command 'PC-lisp-complete-symbol) |
955 (PC-do-completion nil beg PC-lisp-complete-end t) | 955 (PC-do-completion nil beg PC-lisp-complete-end t) |
956 (if PC-lisp-complete-end | 956 (if PC-lisp-complete-end |
957 (move-marker PC-lisp-complete-end end) | 957 (move-marker PC-lisp-complete-end end) |
958 (setq PC-lisp-complete-end (copy-marker end t))) | 958 (setq PC-lisp-complete-end (copy-marker end t))) |