;; 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."
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
(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)))
;;; 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 <wence@gmx.li>
;; Created: 2011-07-06
(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)
"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)
":")
","))
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)
(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 ()
0
i)))))
+(require 'ring)
+
(defvar hydra-pause-ring (make-ring 10)
"Ring for paused hydras.")
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."
"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"))
;;; 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 <monnier@iro.umontreal.ca>
;; Keywords:
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
"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)
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;
-;;; 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).
)))
(provide 'wisi-compile)
-
-;;;; end of file
+;;; wisi-compile.el ends here
(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
(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))
"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
(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)
;; 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 (