aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader2004-12-25 02:00:25 +0000
committerMiles Bader2004-12-25 02:00:25 +0000
commit6a89b7e95a771e5141bb1718e8278dcf892359ea (patch)
tree189a864da85f49e73c6f9220b7231f0c54250e6e /lisp/progmodes
parent054b6b53c3554c83ae02d24a772a74b63ebb08cd (diff)
parent70d16390a08dc9d94c961eb380be8e1b5b496963 (diff)
downloademacs-6a89b7e95a771e5141bb1718e8278dcf892359ea.tar.gz
emacs-6a89b7e95a771e5141bb1718e8278dcf892359ea.zip
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-79
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-735 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-747 Update from CVS
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el3
-rw-r--r--lisp/progmodes/executable.el14
-rw-r--r--lisp/progmodes/grep.el5
-rw-r--r--lisp/progmodes/hideshow.el164
-rw-r--r--lisp/progmodes/idlwave.el4
5 files changed, 82 insertions, 108 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f2750ec8ff4..9c7e8fe1560 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1044,6 +1044,7 @@ exited abnormally with code %d\n"
1044(defvar compilation-minor-mode-map 1044(defvar compilation-minor-mode-map
1045 (let ((map (make-sparse-keymap))) 1045 (let ((map (make-sparse-keymap)))
1046 (define-key map [mouse-2] 'compile-goto-error) 1046 (define-key map [mouse-2] 'compile-goto-error)
1047 (define-key map [follow-link] 'mouse-face)
1047 (define-key map "\C-c\C-c" 'compile-goto-error) 1048 (define-key map "\C-c\C-c" 'compile-goto-error)
1048 (define-key map "\C-m" 'compile-goto-error) 1049 (define-key map "\C-m" 'compile-goto-error)
1049 (define-key map "\C-c\C-k" 'kill-compilation) 1050 (define-key map "\C-c\C-k" 'kill-compilation)
@@ -1073,6 +1074,7 @@ exited abnormally with code %d\n"
1073(defvar compilation-button-map 1074(defvar compilation-button-map
1074 (let ((map (make-sparse-keymap))) 1075 (let ((map (make-sparse-keymap)))
1075 (define-key map [mouse-2] 'compile-goto-error) 1076 (define-key map [mouse-2] 'compile-goto-error)
1077 (define-key map [follow-link] 'mouse-face)
1076 (define-key map "\C-m" 'compile-goto-error) 1078 (define-key map "\C-m" 'compile-goto-error)
1077 map) 1079 map)
1078 "Keymap for compilation-message buttons.") 1080 "Keymap for compilation-message buttons.")
@@ -1084,6 +1086,7 @@ exited abnormally with code %d\n"
1084 ;; because that introduces a menu bar item we don't want. 1086 ;; because that introduces a menu bar item we don't want.
1085 ;; That confuses C-down-mouse-3. 1087 ;; That confuses C-down-mouse-3.
1086 (define-key map [mouse-2] 'compile-goto-error) 1088 (define-key map [mouse-2] 'compile-goto-error)
1089 (define-key map [follow-link] 'mouse-face)
1087 (define-key map "\C-c\C-c" 'compile-goto-error) 1090 (define-key map "\C-c\C-c" 'compile-goto-error)
1088 (define-key map "\C-m" 'compile-goto-error) 1091 (define-key map "\C-m" 'compile-goto-error)
1089 (define-key map "\C-c\C-k" 'kill-compilation) 1092 (define-key map "\C-c\C-k" 'kill-compilation)
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index a5d401a5f5e..0eb53771019 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -199,20 +199,20 @@ non-executable files."
199 (file-modes buffer-file-name))))))) 199 (file-modes buffer-file-name)))))))
200 200
201 201
202;;;###autoload
202(defun executable-interpret (command) 203(defun executable-interpret (command)
203 "Run script with user-specified args, and collect output in a buffer. 204 "Run script with user-specified args, and collect output in a buffer.
204While script runs asynchronously, you can use the \\[next-error] command 205While script runs asynchronously, you can use the \\[next-error]
205to find the next error." 206command to find the next error. The buffer is also in `comint-mode' and
207`compilation-shell-minor-mode', so that you can answer any prompts."
206 (interactive (list (read-string "Run script: " 208 (interactive (list (read-string "Run script: "
207 (or executable-command 209 (or executable-command
208 buffer-file-name)))) 210 buffer-file-name))))
209 (require 'compile) 211 (require 'compile)
210 (save-some-buffers (not compilation-ask-about-save)) 212 (save-some-buffers (not compilation-ask-about-save))
211 (make-local-variable 'executable-command) 213 (set (make-local-variable 'executable-command) command)
212 (compile-internal (setq executable-command command) 214 (let ((compilation-error-regexp-alist executable-error-regexp-alist))
213 "No more errors." "Interpretation" 215 (compilation-start command t (lambda (x) "*interpretation*"))))
214 ;; Give it a simpler regexp to match.
215 nil executable-error-regexp-alist))
216 216
217 217
218 218
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index fd4b716ae4b..04fcae78ea6 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -275,6 +275,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
275(defvar grep-error-face compilation-error-face 275(defvar grep-error-face compilation-error-face
276 "Face name to use for grep error messages.") 276 "Face name to use for grep error messages.")
277 277
278(defvar grep-match-face 'match
279 "Face name to use for grep matches.")
280
278(defvar grep-mode-font-lock-keywords 281(defvar grep-mode-font-lock-keywords
279 '(;; Command output lines. 282 '(;; Command output lines.
280 ("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face) 283 ("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face)
@@ -291,7 +294,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
291 (2 compilation-line-face)) 294 (2 compilation-line-face))
292 ;; Highlight grep matches and delete markers 295 ;; Highlight grep matches and delete markers
293 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" 296 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
294 (2 compilation-column-face) 297 (2 grep-match-face)
295 ((lambda (p)) 298 ((lambda (p))
296 (progn 299 (progn
297 ;; Delete markers with `replace-match' because it updates 300 ;; Delete markers with `replace-match' because it updates
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 7013c3856e3..3bd5dd2a1f6 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -5,7 +5,7 @@
5;; Author: Thien-Thi Nguyen <ttn@gnu.org> 5;; Author: Thien-Thi Nguyen <ttn@gnu.org>
6;; Dan Nicolaescu <dann@ics.uci.edu> 6;; Dan Nicolaescu <dann@ics.uci.edu>
7;; Keywords: C C++ java lisp tools editing comments blocks hiding outlines 7;; Keywords: C C++ java lisp tools editing comments blocks hiding outlines
8;; Maintainer-Version: 5.31 8;; Maintainer-Version: 5.39.2.8
9;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning 9;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
@@ -58,7 +58,7 @@
58;; 58;;
59;; (load-library "hideshow") 59;; (load-library "hideshow")
60;; (add-hook 'X-mode-hook ; other modes similarly 60;; (add-hook 'X-mode-hook ; other modes similarly
61;; '(lambda () (hs-minor-mode 1))) 61;; (lambda () (hs-minor-mode 1)))
62;; 62;;
63;; where X = {emacs-lisp,c,c++,perl,...}. You can also manually toggle 63;; where X = {emacs-lisp,c,c++,perl,...}. You can also manually toggle
64;; hideshow minor mode by typing `M-x hs-minor-mode'. After hideshow is 64;; hideshow minor mode by typing `M-x hs-minor-mode'. After hideshow is
@@ -133,10 +133,7 @@
133;; variable `hs-special-modes-alist'. Packages that use hideshow should 133;; variable `hs-special-modes-alist'. Packages that use hideshow should
134;; do something like: 134;; do something like:
135;; 135;;
136;; (let ((my-mode-hs-info '(my-mode "{{" "}}" ...))) 136;; (add-to-list 'hs-special-modes-alist '(my-mode "{{" "}}" ...))
137;; (if (not (member my-mode-hs-info hs-special-modes-alist))
138;; (setq hs-special-modes-alist
139;; (cons my-mode-hs-info hs-special-modes-alist))))
140;; 137;;
141;; If you have an entry that works particularly well, consider 138;; If you have an entry that works particularly well, consider
142;; submitting it for inclusion in hideshow.el. See docstring for 139;; submitting it for inclusion in hideshow.el. See docstring for
@@ -180,9 +177,9 @@
180;; In the case of `vc-diff', here is a less invasive workaround: 177;; In the case of `vc-diff', here is a less invasive workaround:
181;; 178;;
182;; (add-hook 'vc-before-checkin-hook 179;; (add-hook 'vc-before-checkin-hook
183;; '(lambda () 180;; (lambda ()
184;; (goto-char (point-min)) 181;; (goto-char (point-min))
185;; (hs-show-block))) 182;; (hs-show-block)))
186;; 183;;
187;; Unfortunately, these workarounds do not restore hideshow state. 184;; Unfortunately, these workarounds do not restore hideshow state.
188;; If someone figures out a better way, please let me know. 185;; If someone figures out a better way, please let me know.
@@ -223,6 +220,7 @@
223;;; Code: 220;;; Code:
224 221
225(require 'easymenu) 222(require 'easymenu)
223(eval-when-compile (require 'cl))
226 224
227;;--------------------------------------------------------------------------- 225;;---------------------------------------------------------------------------
228;; user-configurable variables 226;; user-configurable variables
@@ -265,8 +263,7 @@ This has effect iff `search-invisible' is set to `open'."
265 '((c-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) 263 '((c-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning)
266 (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) 264 (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning)
267 (bibtex-mode ("^@\\S(*\\(\\s(\\)" 1)) 265 (bibtex-mode ("^@\\S(*\\(\\s(\\)" 1))
268 (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) 266 (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning))
269 )
270 "*Alist for initializing the hideshow variables for different modes. 267 "*Alist for initializing the hideshow variables for different modes.
271Each element has the form 268Each element has the form
272 (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC). 269 (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC).
@@ -378,28 +375,6 @@ Note that `mode-line-format' is buffer-local.")
378;;--------------------------------------------------------------------------- 375;;---------------------------------------------------------------------------
379;; system dependency 376;; system dependency
380 377
381; ;; xemacs compatibility
382; (when (string-match "xemacs\\|lucid" emacs-version)
383; ;; use pre-packaged compatiblity layer
384; (require 'overlay))
385;
386; ;; xemacs and emacs-19 compatibility
387; (when (or (not (fboundp 'add-to-invisibility-spec))
388; (not (fboundp 'remove-from-invisibility-spec)))
389; ;; `buffer-invisibility-spec' mutators snarfed from Emacs 20.3 lisp/subr.el
390; (defun add-to-invisibility-spec (arg)
391; (cond
392; ((or (null buffer-invisibility-spec) (eq buffer-invisibility-spec t))
393; (setq buffer-invisibility-spec (list arg)))
394; (t
395; (setq buffer-invisibility-spec
396; (cons arg buffer-invisibility-spec)))))
397; (defun remove-from-invisibility-spec (arg)
398; (when buffer-invisibility-spec
399; (setq buffer-invisibility-spec
400; (delete arg buffer-invisibility-spec)))))
401
402;; hs-match-data
403(defalias 'hs-match-data 'match-data) 378(defalias 'hs-match-data 'match-data)
404 379
405;;--------------------------------------------------------------------------- 380;;---------------------------------------------------------------------------
@@ -409,12 +384,9 @@ Note that `mode-line-format' is buffer-local.")
409 "Delete hideshow overlays in region defined by FROM and TO." 384 "Delete hideshow overlays in region defined by FROM and TO."
410 (when (< to from) 385 (when (< to from)
411 (setq from (prog1 to (setq to from)))) 386 (setq from (prog1 to (setq to from))))
412 (let ((ovs (overlays-in from to))) 387 (dolist (ov (overlays-in from to))
413 (while ovs 388 (when (overlay-get ov 'hs)
414 (let ((ov (car ovs))) 389 (delete-overlay ov))))
415 (when (overlay-get ov 'hs)
416 (delete-overlay ov)))
417 (setq ovs (cdr ovs)))))
418 390
419(defun hs-isearch-show (ov) 391(defun hs-isearch-show (ov)
420 "Delete overlay OV, and set `hs-headline' to nil. 392 "Delete overlay OV, and set `hs-headline' to nil.
@@ -433,16 +405,16 @@ OV is shown.
433This function is meant to be used as the `isearch-open-invisible-temporary' 405This function is meant to be used as the `isearch-open-invisible-temporary'
434property of an overlay." 406property of an overlay."
435 (setq hs-headline 407 (setq hs-headline
436 (if hide-p 408 (if hide-p
437 nil 409 nil
438 (or hs-headline 410 (or hs-headline
439 (let ((start (overlay-start ov))) 411 (let ((start (overlay-start ov)))
440 (buffer-substring 412 (buffer-substring
441 (save-excursion (goto-char start) 413 (save-excursion (goto-char start)
442 (beginning-of-line) 414 (beginning-of-line)
443 (skip-chars-forward " \t") 415 (skip-chars-forward " \t")
444 (point)) 416 (point))
445 start))))) 417 start)))))
446 (force-mode-line-update) 418 (force-mode-line-update)
447 (overlay-put ov 'invisible (and hide-p 'hs))) 419 (overlay-put ov 'invisible (and hide-p 'hs)))
448 420
@@ -464,10 +436,10 @@ on what kind of block is to be hidden."
464 ;; deprecated backward compatibility -- `block'<=>`code' 436 ;; deprecated backward compatibility -- `block'<=>`code'
465 (and (eq 'block hs-isearch-open) 437 (and (eq 'block hs-isearch-open)
466 (eq 'code flag))) 438 (eq 'code flag)))
467 (overlay-put overlay 'isearch-open-invisible 'hs-isearch-show) 439 (overlay-put overlay 'isearch-open-invisible 'hs-isearch-show)
468 (overlay-put overlay 440 (overlay-put overlay
469 'isearch-open-invisible-temporary 441 'isearch-open-invisible-temporary
470 'hs-isearch-show-temporary)) 442 'hs-isearch-show-temporary))
471 overlay)))) 443 overlay))))
472 444
473(defun hs-forward-sexp (match-data arg) 445(defun hs-forward-sexp (match-data arg)
@@ -523,10 +495,10 @@ and then further adjusted to be at the end of the line."
523 495
524(defun hs-safety-is-job-n () 496(defun hs-safety-is-job-n ()
525 "Warn if `buffer-invisibility-spec' does not contain symbol `hs'." 497 "Warn if `buffer-invisibility-spec' does not contain symbol `hs'."
526 (unless (and (listp buffer-invisibility-spec) 498 (unless (and (listp buffer-invisibility-spec)
527 (assq 'hs buffer-invisibility-spec)) 499 (assq 'hs buffer-invisibility-spec))
528 (message "Warning: `buffer-invisibility-spec' does not contain hs!!") 500 (message "Warning: `buffer-invisibility-spec' does not contain hs!!")
529 (sit-for 2))) 501 (sit-for 2)))
530 502
531(defun hs-inside-comment-p () 503(defun hs-inside-comment-p ()
532 "Return non-nil if point is inside a comment, otherwise nil. 504 "Return non-nil if point is inside a comment, otherwise nil.
@@ -543,10 +515,15 @@ as cdr."
543 (let ((q (point))) 515 (let ((q (point)))
544 (when (or (looking-at hs-c-start-regexp) 516 (when (or (looking-at hs-c-start-regexp)
545 (re-search-backward hs-c-start-regexp (point-min) t)) 517 (re-search-backward hs-c-start-regexp (point-min) t))
518 ;; first get to the beginning of this comment...
519 (while (and (not (bobp))
520 (= (point) (progn (forward-comment -1) (point))))
521 (forward-char -1))
522 ;; ...then extend backwards
546 (forward-comment (- (buffer-size))) 523 (forward-comment (- (buffer-size)))
547 (skip-chars-forward " \t\n\f") 524 (skip-chars-forward " \t\n\f")
548 (let ((p (point)) 525 (let ((p (point))
549 (not-hidable nil)) 526 (hidable t))
550 (beginning-of-line) 527 (beginning-of-line)
551 (unless (looking-at (concat "[ \t]*" hs-c-start-regexp)) 528 (unless (looking-at (concat "[ \t]*" hs-c-start-regexp))
552 ;; we are in this situation: (example) 529 ;; we are in this situation: (example)
@@ -565,19 +542,19 @@ as cdr."
565 (while (and (< (point) q) 542 (while (and (< (point) q)
566 (> (point) p) 543 (> (point) p)
567 (not (looking-at hs-c-start-regexp))) 544 (not (looking-at hs-c-start-regexp)))
568 (setq p (point));; use this to avoid an infinite cycle 545 (setq p (point)) ;; use this to avoid an infinite cycle
569 (forward-comment 1) 546 (forward-comment 1)
570 (skip-chars-forward " \t\n\f")) 547 (skip-chars-forward " \t\n\f"))
571 (when (or (not (looking-at hs-c-start-regexp)) 548 (when (or (not (looking-at hs-c-start-regexp))
572 (> (point) q)) 549 (> (point) q))
573 ;; we cannot hide this comment block 550 ;; we cannot hide this comment block
574 (setq not-hidable t))) 551 (setq hidable nil)))
575 ;; goto the end of the comment 552 ;; goto the end of the comment
576 (forward-comment (buffer-size)) 553 (forward-comment (buffer-size))
577 (skip-chars-backward " \t\n\f") 554 (skip-chars-backward " \t\n\f")
578 (end-of-line) 555 (end-of-line)
579 (when (>= (point) q) 556 (when (>= (point) q)
580 (list (if not-hidable nil p) (point)))))))) 557 (list (and hidable p) (point))))))))
581 558
582(defun hs-grok-mode-type () 559(defun hs-grok-mode-type ()
583 "Set up hideshow variables for new buffers. 560 "Set up hideshow variables for new buffers.
@@ -645,7 +622,7 @@ Return point, or nil if original point was not in a block."
645 (hs-hide-level-recursive (1- arg) minp maxp) 622 (hs-hide-level-recursive (1- arg) minp maxp)
646 (goto-char (match-beginning hs-block-start-mdata-select)) 623 (goto-char (match-beginning hs-block-start-mdata-select))
647 (hs-hide-block-at-point t))) 624 (hs-hide-block-at-point t)))
648 (hs-safety-is-job-n) 625 (hs-safety-is-job-n)
649 (goto-char maxp)) 626 (goto-char maxp))
650 627
651(defmacro hs-life-goes-on (&rest body) 628(defmacro hs-life-goes-on (&rest body)
@@ -675,8 +652,8 @@ and `case-fold-search' are both t."
675 (let ((overlays (overlays-at (point))) 652 (let ((overlays (overlays-at (point)))
676 (found nil)) 653 (found nil))
677 (while (and (not found) (overlayp (car overlays))) 654 (while (and (not found) (overlayp (car overlays)))
678 (setq found (overlay-get (car overlays) 'hs) 655 (setq found (overlay-get (car overlays) 'hs)
679 overlays (cdr overlays))) 656 overlays (cdr overlays)))
680 found))) 657 found)))
681 658
682(defun hs-c-like-adjust-block-beginning (initial) 659(defun hs-c-like-adjust-block-beginning (initial)
@@ -724,7 +701,7 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
724 (funcall hs-hide-all-non-comment-function) 701 (funcall hs-hide-all-non-comment-function)
725 (hs-hide-block-at-point t))) 702 (hs-hide-block-at-point t)))
726 ;; found a comment, probably 703 ;; found a comment, probably
727 (let ((c-reg (hs-inside-comment-p))) ; blech! 704 (let ((c-reg (hs-inside-comment-p))) ; blech!
728 (when (and c-reg (car c-reg)) 705 (when (and c-reg (car c-reg))
729 (if (> (count-lines (car c-reg) (nth 1 c-reg)) 1) 706 (if (> (count-lines (car c-reg) (nth 1 c-reg)) 1)
730 (hs-hide-block-at-point t c-reg) 707 (hs-hide-block-at-point t c-reg)
@@ -772,18 +749,15 @@ See documentation for functions `hs-hide-block' and `run-hooks'."
772 (or 749 (or
773 ;; first see if we have something at the end of the line 750 ;; first see if we have something at the end of the line
774 (catch 'eol-begins-hidden-region-p 751 (catch 'eol-begins-hidden-region-p
775 (let ((here (point)) 752 (let ((here (point)))
776 (ovs (save-excursion (end-of-line) (overlays-at (point))))) 753 (dolist (ov (save-excursion (end-of-line) (overlays-at (point))))
777 (while ovs 754 (when (overlay-get ov 'hs)
778 (let ((ov (car ovs))) 755 (goto-char
779 (when (overlay-get ov 'hs) 756 (cond (end (overlay-end ov))
780 (goto-char 757 ((eq 'comment (overlay-get ov 'hs)) here)
781 (cond (end (overlay-end ov)) 758 (t (+ (overlay-start ov) (overlay-get ov 'hs-ofs)))))
782 ((eq 'comment (overlay-get ov 'hs)) here) 759 (delete-overlay ov)
783 (t (+ (overlay-start ov) (overlay-get ov 'hs-ofs))))) 760 (throw 'eol-begins-hidden-region-p t)))
784 (delete-overlay ov)
785 (throw 'eol-begins-hidden-region-p t)))
786 (setq ovs (cdr ovs)))
787 nil)) 761 nil))
788 ;; not immediately obvious, look for a suitable block 762 ;; not immediately obvious, look for a suitable block
789 (let ((c-reg (hs-inside-comment-p)) 763 (let ((c-reg (hs-inside-comment-p))
@@ -870,9 +844,9 @@ Key bindings:
870 844
871 (interactive "P") 845 (interactive "P")
872 (setq hs-headline nil 846 (setq hs-headline nil
873 hs-minor-mode (if (null arg) 847 hs-minor-mode (if (null arg)
874 (not hs-minor-mode) 848 (not hs-minor-mode)
875 (> (prefix-numeric-value arg) 0))) 849 (> (prefix-numeric-value arg) 0)))
876 (if hs-minor-mode 850 (if hs-minor-mode
877 (progn 851 (progn
878 (hs-grok-mode-type) 852 (hs-grok-mode-type)
@@ -912,27 +886,19 @@ Key bindings:
912 ))))) 886 )))))
913 887
914;; some housekeeping 888;; some housekeeping
915(or (assq 'hs-minor-mode minor-mode-map-alist) 889(add-to-list 'minor-mode-map-alist (cons 'hs-minor-mode hs-minor-mode-map))
916 (setq minor-mode-map-alist 890(add-to-list 'minor-mode-alist '(hs-minor-mode " hs") t)
917 (cons (cons 'hs-minor-mode hs-minor-mode-map)
918 minor-mode-map-alist)))
919(or (assq 'hs-minor-mode minor-mode-alist)
920 (setq minor-mode-alist (append minor-mode-alist
921 (list '(hs-minor-mode " hs")))))
922 891
923;; make some variables permanently buffer-local 892;; make some variables permanently buffer-local
924(let ((vars '(hs-minor-mode 893(dolist (var '(hs-minor-mode
925 hs-c-start-regexp 894 hs-c-start-regexp
926 hs-block-start-regexp 895 hs-block-start-regexp
927 hs-block-start-mdata-select 896 hs-block-start-mdata-select
928 hs-block-end-regexp 897 hs-block-end-regexp
929 hs-forward-sexp-func 898 hs-forward-sexp-func
930 hs-adjust-block-beginning))) 899 hs-adjust-block-beginning))
931 (while vars 900 (make-variable-buffer-local var)
932 (let ((var (car vars))) 901 (put var 'permanent-local t))
933 (make-variable-buffer-local var)
934 (put var 'permanent-local t))
935 (setq vars (cdr vars))))
936 902
937;;--------------------------------------------------------------------------- 903;;---------------------------------------------------------------------------
938;; that's it 904;; that's it
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 45694b57b99..a17ba3e844f 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -2571,7 +2571,9 @@ If not in a statement just moves to end of line. Returns position."
2571 (let ((save-point (point))) 2571 (let ((save-point (point)))
2572 (when (re-search-forward ".*&" lim t) 2572 (when (re-search-forward ".*&" lim t)
2573 (goto-char (match-end 0)) 2573 (goto-char (match-end 0))
2574 (if (idlwave-quoted) (goto-char save-point))) 2574 (if (idlwave-quoted)
2575 (goto-char save-point)
2576 (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point))))
2575 (point))) 2577 (point)))
2576 2578
2577(defun idlwave-skip-label-or-case () 2579(defun idlwave-skip-label-or-case ()