From: Stefan Monnier Date: Thu, 21 Jan 2016 22:49:19 +0000 (-0500) Subject: * packages/gnome-c-style/gnome-c-tests.el: Add copyright blurb X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/1f8bb1b5f88d22a60a7a36c55b829e42c4b5f633 * packages/gnome-c-style/gnome-c-tests.el: Add copyright blurb --- diff --git a/admin/archive-contents.el b/admin/archive-contents.el index b63f4cdaf..8f054ad87 100755 --- a/admin/archive-contents.el +++ b/admin/archive-contents.el @@ -622,12 +622,13 @@ If WITH-CORE is non-nil, it means we manage :core packages as well." ;; Not under version control. Check if it only contains ;; symlinks and generated files, in which case it is probably ;; a leftover :core package that can safely be deleted. - (let ((file (archive--find-non-trivial-file dir))) - (if file - (message "Keeping %s for non-trivial file \"%s\"" dir file) - (progn - (message "Deleted untracked package %s" dir) - (delete-directory dir 'recursive t))))))))) + ;; (let ((file (archive--find-non-trivial-file dir))) + ;; (if file + ;; (message "Keeping %s for non-trivial file \"%s\"" dir file) + ;; (progn + ;; (message "Deleted untracked package %s" dir) + ;; (delete-directory dir 'recursive t)))) + ))))) (defun archive--external-package-sync (name) "Sync external package named NAME." diff --git a/packages/ada-mode/ada-mode.el b/packages/ada-mode/ada-mode.el index 3fca118d9..8fb112a49 100644 --- a/packages/ada-mode/ada-mode.el +++ b/packages/ada-mode/ada-mode.el @@ -2598,8 +2598,8 @@ If POSTFIX and JUSTIFY are non-nil, `ada-fill-comment-postfix' is appended to each line filled and justified. The paragraph is indented on the first line." (interactive "P") - (if (and (not (ada-in-comment-p)) - (not (looking-at "[ \t]*--"))) + (if (not (or (ada-in-comment-p) + (looking-at "[ \t]*--"))) (error "Not inside comment")) ;; fill-region-as-paragraph leaves comment text exposed (without diff --git a/packages/dts-mode/dts-mode.el b/packages/dts-mode/dts-mode.el index 99aff2602..e1ce4fdf8 100644 --- a/packages/dts-mode/dts-mode.el +++ b/packages/dts-mode/dts-mode.el @@ -163,7 +163,9 @@ (dts--using-macro syntax-propertize-rules (set (make-local-variable 'syntax-propertize-function) (syntax-propertize-rules - ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|"))))) + ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|")) + ;; Treat things like /delete-property/ as a single identifier. + ("\\(/\\)[a-z]+\\(/\\)" (1 "_") (2 "_"))))) (if dts-use-smie (smie-setup dts-grammar #'dts-indent-rules) (set (make-local-variable 'indent-line-function) #'dts-indent-line))) diff --git a/packages/f90-interface-browser/f90-interface-browser.el b/packages/f90-interface-browser/f90-interface-browser.el index d499ba021..8113a8bc5 100644 --- a/packages/f90-interface-browser/f90-interface-browser.el +++ b/packages/f90-interface-browser/f90-interface-browser.el @@ -1,6 +1,6 @@ ;;; f90-interface-browser.el --- Parse and browse f90 interfaces -;; Copyright (C) 2011, 2012, 2013, 2014 Free Software Foundation, Inc +;; Copyright (C) 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc ;; Author: Lawrence Mitchell ;; Created: 2011-07-06 @@ -272,7 +272,8 @@ an alphanumeric character." (loop for file in (directory-files dir t (rx-to-string `(and "." (or ,@f90-file-extensions) - eos) t)) + eos) + t)) do (f90-parse-interfaces file f90-all-interfaces))) (defun f90-find-tag-interface (name &optional match-sublist) @@ -530,11 +531,11 @@ default is the type of the variable." "UNION-TYPE" ;; Ignore name (setq type (cdr type)) - (mapconcat 'identity (loop for a in type + (mapconcat #'identity (loop for a in type if (and (consp a) (string= (car a) "dimension")) collect (format "dimension(%s)" - (mapconcat 'identity + (mapconcat #'identity (make-list (cdr a) ":") ",")) @@ -555,9 +556,10 @@ default is the type of the variable." arglist "\n"))) (f90-mode) (if (fboundp 'font-lock-ensure) - (font-lock-ensure) (font-lock-fontify-buffer)) + (font-lock-ensure) + (with-no-warnings (font-lock-fontify-buffer))) (goto-char (point-min)) - (mapconcat 'identity + (mapconcat #'identity (loop while (not (eobp)) collect (buffer-substring (line-beginning-position) (- (line-end-position) @@ -817,16 +819,16 @@ needs a reference count interface, so insert one." (defun f90-parse-type-definition () "Parse a type definition at (or in front of) `point'." - (let (type slots slot fn) - (goto-char (point-min)) - (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t) - (error "Trying parse a type but no type found")) - (setq type (format "type(%s)" (f90-normalise-string (match-string 1)))) + (goto-char (point-min)) + (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t) + (error "Trying parse a type but no type found")) + (let ((type (format "type(%s)" (f90-normalise-string (match-string 1)))) + (slots ())) (while (not (eobp)) - (setq slot (f90-parse-single-type-declaration)) - (when slot - (setf slots (nconc slot slots))) - (forward-line 1)) + (let ((slot (f90-parse-single-type-declaration))) + (when slot + (setf slots (nconc slot slots))) + (forward-line 1))) (setf (gethash type f90-types) slots))) (defun f90-arglist-types () diff --git a/packages/hydra/hydra.el b/packages/hydra/hydra.el index a7a71acc7..1516c856b 100644 --- a/packages/hydra/hydra.el +++ b/packages/hydra/hydra.el @@ -1148,6 +1148,8 @@ DOC defaults to TOGGLE-NAME split and capitalized." 0 i))))) +(require 'ring) + (defvar hydra-pause-ring (make-ring 10) "Ring for paused hydras.") diff --git a/packages/js2-mode/js2-mode.el b/packages/js2-mode/js2-mode.el index 926003d5a..2d6f33685 100644 --- a/packages/js2-mode/js2-mode.el +++ b/packages/js2-mode/js2-mode.el @@ -11212,18 +11212,13 @@ highlighting features of `js2-mode'." map) "Keymap used for js2 diagnostics buffers.") -(defun js2-error-buffer-mode () +(define-derived-mode js2-error-buffer-mode special-mode "JS Lint Diagnostics" "Major mode for js2 diagnostics buffers. Selecting an error will jump it to the corresponding source-buffer error. \\{js2-error-buffer-mode-map}" - (interactive) - (setq major-mode 'js2-error-buffer-mode - mode-name "JS Lint Diagnostics") - (use-local-map js2-error-buffer-mode-map) (setq truncate-lines t) (set-buffer-modified-p nil) - (setq buffer-read-only t) - (run-hooks 'js2-error-buffer-mode-hook)) + (setq buffer-read-only t)) (defun js2-error-buffer-next () "Move to next error and view it." @@ -11252,7 +11247,7 @@ Selecting an error will jump it to the corresponding source-buffer error. "Scroll source buffer to show error at current line." (interactive) (cond - ((not (eq major-mode 'js2-error-buffer-mode)) + ((not (derived-mode-p 'js2-error-buffer-mode)) (message "Not in a js2 errors buffer")) ((not (buffer-live-p js2-source-buffer)) (message "Source buffer has been killed")) diff --git a/packages/lex/lex.el b/packages/lex/lex.el index bd84f5800..6ba8123ed 100644 --- a/packages/lex/lex.el +++ b/packages/lex/lex.el @@ -1,6 +1,6 @@ ;;; lex.el --- Lexical analyser construction -*- lexical-binding:t -*- -;; Copyright (C) 2008,2013,2014 Free Software Foundation, Inc. +;; Copyright (C) 2008,2013,2014,2015 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: @@ -918,7 +918,15 @@ Returns a new NFA." res)) +;;;###autoload (defun lex-compile (alist) + "Compile a set of regular expressions. +ALIST is a list of elements of the form (REGEXP . VALUE). +The compiled automaton will match all those regexps at the same time +and will return the VALUE fof the leftmost longest match. + +Each REGEXP object should be in the sexp form described in the +Commentary section." (lex--dfa-wrapper (lambda () (let* ((lex--char-equiv-table diff --git a/packages/on-screen/on-screen.el b/packages/on-screen/on-screen.el index bce3c5648..e5c397702 100644 --- a/packages/on-screen/on-screen.el +++ b/packages/on-screen/on-screen.el @@ -636,7 +636,7 @@ highlightings and clear all associated data." "Return non-nil if on-screen is enabled in BUFFER." (with-current-buffer (or buffer (current-buffer)) (and - (if on-screen-global-mode t on-screen-mode) + (or on-screen-global-mode on-screen-mode) (cond ((not on-screen-inhibit-highlighting) t) ((functionp on-screen-inhibit-highlighting) diff --git a/packages/wisi/wisi-compile.el b/packages/wisi/wisi-compile.el index 0251133c4..b70a1aea4 100644 --- a/packages/wisi/wisi-compile.el +++ b/packages/wisi/wisi-compile.el @@ -19,20 +19,24 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;; -;;; History: first experimental version Jan 2013 + +;;; Commentary: +;; + +;;;; History: first experimental version Jan 2013 ;; -;;; Context +;;;; Context ;; ;; Semantic (info "(semantic)Top") provides an LALR(1) parser -;; wisent-parse. The grammar used is defined by the functions +;; wisent-parse. The grammar used is defined by the functions ;; semantic-grammar-create-package, which reads a bison-like source ;; file and produces corresponding elisp source, and ;; wisent-compile-grammar, which generates a parser table. ;; ;; However, the algorithm used in wisent-compile-grammar cannot cope ;; with the grammar for the Ada language, because it is not -;; LALR(1). So we provide a generalized LALR parser, which spawns -;; parallel LALR parsers at each conflict. Instead of also rewriting +;; LALR(1). So we provide a generalized LALR parser, which spawns +;; parallel LALR parsers at each conflict. Instead of also rewriting ;; the entire semantic grammar compiler, we use the OpenToken LALR ;; parser generator, which is easier to modify (it is written in Ada, ;; not Lisp). @@ -231,5 +235,4 @@ names have the format nonterm:index." ))) (provide 'wisi-compile) - -;;;; end of file +;;; wisi-compile.el ends here diff --git a/packages/ztree/ztree-diff-model.el b/packages/ztree/ztree-diff-model.el index 7bec4619b..e8fa4d9a2 100644 --- a/packages/ztree/ztree-diff-model.el +++ b/packages/ztree/ztree-diff-model.el @@ -124,6 +124,7 @@ RIGHT if only on the right side." (defun ztree-diff-untrampify-filename (file) "Return FILE as the local file name." + ;; FIXME: We shouldn't use internal Tramp functions. (require 'tramp) (if (not (tramp-tramp-file-p file)) file @@ -136,6 +137,10 @@ RIGHT if only on the right side." (defun ztree-diff-model-files-equal (file1 file2) "Compare files FILE1 and FILE2 using external diff. Returns t if equal." + ;; FIXME: This "untrampification" only works if both file1 and file2 are on + ;; the same host. + ;; FIXME: We assume that default-directory is also on the same host as + ;; file(1|2). (let* ((file1-untrampified (ztree-diff-untrampify-filename (ztree-diff-modef-quotify-string file1))) (file2-untrampified (ztree-diff-untrampify-filename (ztree-diff-modef-quotify-string file2))) (diff-command (concat "diff -q" " " file1-untrampified " " file2-untrampified)) @@ -154,8 +159,7 @@ Filters out . and .." "Rescan the NODE." ;; assuming what parent is always exists ;; otherwise the UI shall force the full rescan - (let ((parent (ztree-diff-node-parent node)) - (isdir (ztree-diff-node-is-directory node)) + (let ((isdir (ztree-diff-node-is-directory node)) (left (ztree-diff-node-left-path node)) (right (ztree-diff-node-right-path node))) ;; if node is a directory - traverse diff --git a/packages/ztree/ztree-view.el b/packages/ztree/ztree-view.el index 519097b8e..e7f20fde0 100644 --- a/packages/ztree/ztree-view.el +++ b/packages/ztree/ztree-view.el @@ -543,7 +543,7 @@ Optional argument FACE face to write text with." (move-to-column offset t) (delete-region (point) (line-end-position)) (when (> depth 0) - (dotimes (i depth) + (dotimes (_ depth) (insert " ") (insert-char ?\s 3))) ; insert 3 spaces (when (> (length short-name) 0) @@ -584,13 +584,12 @@ Optional argument LINE scroll to the line given." ;; used in 2-side tree mode (when ztree-node-side-fun (setq ztree-line-tree-properties (make-hash-table))) - (toggle-read-only) - (erase-buffer) - (funcall ztree-tree-header-fun) - (setq ztree-start-line (line-number-at-pos (point))) - (ztree-insert-node-contents ztree-start-node) - (scroll-to-line (if line line ztree-start-line)) - (toggle-read-only))) + (let ((inhibit-read-only t)) + (erase-buffer) + (funcall ztree-tree-header-fun) + (setq ztree-start-line (line-number-at-pos (point))) + (ztree-insert-node-contents ztree-start-node)) + (scroll-to-line (if line line ztree-start-line)))) (defun ztree-view (