diff options
author | Michael Heerdegen <michael_heerdegen@web.de> | 2018-10-27 01:48:35 +0200 |
---|---|---|
committer | Michael Heerdegen <michael_heerdegen@web.de> | 2018-10-30 16:17:45 +0100 |
commit | 049bd5d267bc0d66cc0ba3b70c8773fed95694da (patch) | |
tree | 80978595066509f385dab41664e7eb319e2330b0 /lisp/progmodes/octave.el | |
parent | 607cc2901bab0be64d08aff0394a4676a81da40b (diff) | |
download | emacs-049bd5d267bc0d66cc0ba3b70c8773fed95694da.tar.gz |
Don't quote self-quoting pcase patterns
* admin/bzrmerge.el:
* lisp/char-fold.el:
* lisp/dired.el:
* lisp/emacs-lisp/derived.el:
* lisp/emacs-lisp/easy-mmode.el:
* lisp/emacs-lisp/easymenu.el:
* lisp/emacs-lisp/eieio-core.el:
* lisp/emacs-lisp/package.el:
* lisp/emacs-lisp/smie.el:
* lisp/faces.el:
* lisp/filesets.el:
* lisp/progmodes/modula2.el:
* lisp/progmodes/octave.el:
* lisp/progmodes/opascal.el:
* lisp/progmodes/perl-mode.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ruby-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/server.el:
* lisp/subr.el:
* lisp/textmodes/css-mode.el:
* test/lisp/emacs-lisp/pcase-tests.el: Don't quote self-quoting
'pcase' patterns.
Diffstat (limited to 'lisp/progmodes/octave.el')
-rw-r--r-- | lisp/progmodes/octave.el | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 13510eef805..cce5e17e79e 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -1065,8 +1065,8 @@ directory and makes this the current buffer's default directory." (unless found (goto-char orig)) found)))) (pcase (and buffer-file-name (file-name-extension buffer-file-name)) - (`"cc" (funcall search - "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1)) + ("cc" (funcall search + "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1)) (_ (funcall search octave-function-header-regexp 3))))) (defun octave-function-file-p () @@ -1135,19 +1135,19 @@ q: Don't fix\n" func file)) (read-char-choice "Which name to use? (a/b/q) " '(?a ?b ?q)))))) (pcase c - (`?a (let ((newname (expand-file-name - (concat func (file-name-extension - buffer-file-name t))))) - (when (or (not (file-exists-p newname)) - (yes-or-no-p - (format "Target file %s exists; proceed? " newname))) - (when (file-exists-p buffer-file-name) - (rename-file buffer-file-name newname t)) - (set-visited-file-name newname)))) - (`?b (save-excursion - (goto-char name-start) - (delete-region name-start name-end) - (insert file))))))))) + (?a (let ((newname (expand-file-name + (concat func (file-name-extension + buffer-file-name t))))) + (when (or (not (file-exists-p newname)) + (yes-or-no-p + (format "Target file %s exists; proceed? " newname))) + (when (file-exists-p buffer-file-name) + (rename-file buffer-file-name newname t)) + (set-visited-file-name newname)))) + (?b (save-excursion + (goto-char name-start) + (delete-region name-start name-end) + (insert file))))))))) (defun octave-update-function-file-comment (beg end) "Query replace function names in function file comment." @@ -1801,19 +1801,19 @@ If the environment variable OCTAVE_SRCDIR is set, it is searched first." (defun octave-find-definition-default-filename (name) "Default value for `octave-find-definition-filename-function'." (pcase (file-name-extension name) - (`"oct" + ("oct" (octave-find-definition-default-filename (concat "libinterp/dldfcn/" (file-name-sans-extension (file-name-nondirectory name)) ".cc"))) - (`"cc" + ("cc" (let ((file (or (locate-file name (octave-source-directories)) (locate-file (file-name-nondirectory name) (octave-source-directories))))) (or (and file (file-exists-p file)) (error "File `%s' not found" name)) file)) - (`"mex" + ("mex" (if (yes-or-no-p (format-message "File `%s' may be binary; open? " (file-name-nondirectory name))) name |