Mercurial > emacs
comparison lisp/files.el @ 11189:a2a85a29cdd6
(set-auto-mode): Fix previous change.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 03 Apr 1995 21:37:39 +0000 |
parents | 7a9dceb0fb96 |
children | 8781025a1418 |
comparison
equal
deleted
inserted
replaced
11188:d7f70df00bb0 | 11189:a2a85a29cdd6 |
---|---|
946 (and enable-local-variables | 946 (and enable-local-variables |
947 ;; Don't look for -*- if this file name matches any | 947 ;; Don't look for -*- if this file name matches any |
948 ;; of the regexps in inhibit-first-line-modes-regexps. | 948 ;; of the regexps in inhibit-first-line-modes-regexps. |
949 (let ((temp inhibit-first-line-modes-regexps) | 949 (let ((temp inhibit-first-line-modes-regexps) |
950 (name (file-name-sans-versions buffer-file-name))) | 950 (name (file-name-sans-versions buffer-file-name))) |
951 (if (string-match inhibit-first-line-modes-suffixes name) | 951 (while (let ((sufs inhibit-first-line-modes-suffixes)) |
952 (setq name (substring name 0 (match-beginning 0)))) | 952 (while (and sufs (not (string-match (car sufs) name))) |
953 (setq sufs (cdr sufs))) | |
954 sufs) | |
955 (setq name (substring name 0 (match-beginning 0)))) | |
953 (while (and temp | 956 (while (and temp |
954 (not (string-match (car temp) name))) | 957 (not (string-match (car temp) name))) |
955 (setq temp (cdr temp))) | 958 (setq temp (cdr temp))) |
956 (not temp)) | 959 (not temp)) |
957 (search-forward "-*-" (save-excursion | 960 (search-forward "-*-" (save-excursion |