Update packages

This commit is contained in:
Gergely Polonkai 2016-10-21 09:31:18 +02:00
parent a37ee74126
commit c22ec1ed30
7 changed files with 175 additions and 87 deletions

View File

@ -1,2 +0,0 @@
;;; -*- no-byte-compile: t -*-
(define-package "gobgen" "20160928.2013" "Generate GObject descendants using a detailed form" '((emacs "24.4")) :keywords '("gobject" "glib" "gtk" "helper" "utilities"))

View File

@ -3,11 +3,11 @@
;;; Code: ;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) (add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "gobgen" "gobgen.el" (22514 20100 637300 679000)) ;;;### (autoloads nil "gobgen" "gobgen.el" (22537 49881 33308 505000))
;;; Generated autoloads from gobgen.el ;;; Generated autoloads from gobgen.el
(autoload 'gobgen "gobgen" "\ (autoload 'gobgen "gobgen" "\
Create widgets window for GObject creation Create widgets window for GObject creation.
\(fn)" t nil) \(fn)" t nil)

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "gobgen" "20161020.823" "Generate GObject descendants using a detailed form" '((emacs "24.4")) :keywords '("gobject" "glib" "gtk" "helper" "utilities"))

View File

@ -4,7 +4,7 @@
;; Author: Gergely Polonkai <gergely@polonkai.eu> ;; Author: Gergely Polonkai <gergely@polonkai.eu>
;; Keywords: gobject, glib, gtk, helper, utilities ;; Keywords: gobject, glib, gtk, helper, utilities
;; Package-Version: 20160928.2013 ;; Package-Version: 20161020.823
;; Version: 0.0.1 ;; Version: 0.0.1
;; Package-Requires: ((emacs "24.4")) ;; Package-Requires: ((emacs "24.4"))
@ -39,42 +39,79 @@
(defvar-local gobgen-widget-parent-name nil (defvar-local gobgen-widget-parent-name nil
"Widget for the name of the parent class.") "Widget for the name of the parent class.")
(defvar-local gobgen-widget-parent-prefix nil (defvar-local gobgen-widget-parent-prefix nil
"Widget for the prefix of the parent class. It is auto-filled, but changeable.") "Widget for the prefix of the parent class. It is auto-filled, but
changeable.")
(defvar-local gobgen-widget-recent nil (defvar-local gobgen-widget-recent nil
"Checkbox field for the recent GLib option.") "Checkbox field for the recent GLib option.")
(defvar-local gobgen-widget-private nil (defvar-local gobgen-widget-private nil
"Checkbox field for the private structure option.") "Checkbox field for the private structure option.")
(defun gobject-get-prefix (class-name) (defun gobject-get-prefix (class-name)
"Guess the GObject prefix from CLASS-NAME."
(car (split-string class-name "_"))) (car (split-string class-name "_")))
(defun gobgen-gen-header (CLASS_FULL_NAME (defun gobgen-gen-header (class-full-name-upper
CLASS_PREFIX class-prefix-upper
CLASS_NAME class-name-upper
ClassFullName class-full-name-camel
func-prefix func-prefix
parent_prefix parent-prefix-snake
ParentPrefix parent-prefix-camel
ParentName parent-name-camel
parent-header parent-header
recent-glib recent-glib
need-private) need-private)
"Generate the contents of a GObject header file." "Generate the contents of a GObject header file.
CLASS-FULL-NAME-UPPER is the full GObject name of the new class in
UPPER_SNAKE_CASE notation.
CLASS-PREFIX-UPPER is the GObject prefix of the new class in
UPPER_SNAKE_CASE notation.
CLASS-NAME-UPPER is the name of the new class without the
prefix in UPPER_SNAKE_CASE notation.
CLASS-FULL-NAME-CAMEL is the full name of the new object in
CamelCase notation.
FUNC-PREFIX is the function prefix for object methods. Usually
it is the same as the full object name in lower_snake_case
notation.
PARENT-PREFIX-SNAKE is the prefix of the parent object in
snake_case notation.
PARENT-PREFIX-CAMEL is the prefix of the parent object in
CamelCase notation.
PARENT-NAME-CAMEL is the name of the parent class without the
prefix, in CamelCase notation.
PARENT-HEADER is the name of the header file to be included in
order to use the parent class.
If RECENT-GLIB is 't', some features available from GLib 2.38
will be used.
If NEED-PRIVATE is 't', a private struct will be added to the new
class."
(concat (concat
"#ifndef __" "#ifndef __"
CLASS_FULL_NAME class-full-name-upper
"_H__\n" "_H__\n"
"#define __" "#define __"
CLASS_FULL_NAME class-full-name-upper
"_H__\n" "_H__\n"
"\n" "\n"
(if (string-equal "g" parent_prefix) (if (string-equal "g" parent-prefix-snake)
"#include <glib-object.h>" "#include <glib-object.h>"
(if (string-equal "gtk" parent_prefix) (if (string-equal "gtk" parent-prefix-snake)
"#include <gtk/gtk.h>" "#include <gtk/gtk.h>"
(concat "// You might want to revise this\n" (concat "// You might want to revise this\n"
"#include <" "#include <"
@ -88,34 +125,34 @@
"\n" "\n"
"#define " CLASS_PREFIX "_TYPE_" CLASS_NAME " (" func-prefix "_get_type())\n" "#define " class-prefix-upper "_TYPE_" class-name-upper " (" func-prefix "_get_type())\n"
"#define " CLASS_FULL_NAME "(o) (G_TYPE_CHECK_INSTANCE_CAST((o), " CLASS_PREFIX "_TYPE_" CLASS_NAME ", " ClassFullName "))\n" "#define " class-full-name-upper "(o) (G_TYPE_CHECK_INSTANCE_CAST((o), " class-prefix-upper "_TYPE_" class-name-upper ", " class-full-name-camel "))\n"
"#define " CLASS_FULL_NAME "_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), " CLASS_PREFIX "_TYPE_" CLASS_NAME ", " ClassFullName "Class))\n" "#define " class-full-name-upper "_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), " class-prefix-upper "_TYPE_" class-name-upper ", " class-full-name-camel "Class))\n"
"#define " CLASS_PREFIX "_IS_" CLASS_NAME "(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), " CLASS_PREFIX "_TYPE_" CLASS_NAME "))\n" "#define " class-prefix-upper "_IS_" class-name-upper "(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), " class-prefix-upper "_TYPE_" class-name-upper "))\n"
"#define " CLASS_PREFIX "_IS_" CLASS_NAME "_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), " CLASS_PREFIX "_TYPE_" CLASS_NAME "))\n" "#define " class-prefix-upper "_IS_" class-name-upper "_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), " class-prefix-upper "_TYPE_" class-name-upper "))\n"
"#define " CLASS_FULL_NAME"_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), " CLASS_PREFIX "_TYPE_" CLASS_NAME ", " ClassFullName "Class))\n" "#define " class-full-name-upper"_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), " class-prefix-upper "_TYPE_" class-name-upper ", " class-full-name-camel "Class))\n"
"\n" "\n"
"typedef struct _" ClassFullName " " ClassFullName ";\n" "typedef struct _" class-full-name-camel " " class-full-name-camel ";\n"
"typedef struct _" ClassFullName "Class " ClassFullName "Class;\n" "typedef struct _" class-full-name-camel "Class " class-full-name-camel "Class;\n"
(if (and (not recent-glib) need-private) (if (and (not recent-glib) need-private)
(concat "typedef struct _" ClassFullName "Private " ClassFullName "Private;\n")) (concat "typedef struct _" class-full-name-camel "Private " class-full-name-camel "Private;\n"))
"\n" "\n"
"struct _" ClassFullName " {\n" "struct _" class-full-name-camel " {\n"
" /* Parent instance structure */\n" " /* Parent instance structure */\n"
" " ParentPrefix ParentName " parent_instance;\n" " " parent-prefix-camel parent-name-camel " parent_instance;\n"
"\n" "\n"
@ -124,15 +161,15 @@
(if (and (not recent-glib) need-private) (if (and (not recent-glib) need-private)
(concat "\n" (concat "\n"
" /*< private >*/\n" " /*< private >*/\n"
" " ClassFullName "Private *priv;\n")) " " class-full-name-camel "Private *priv;\n"))
"};\n" "};\n"
"\n" "\n"
"struct _" ClassFullName "Class {\n" "struct _" class-full-name-camel "Class {\n"
" " ParentPrefix ParentName "Class parent_class;\n" " " parent-prefix-camel parent-name-camel "Class parent_class;\n"
"};\n" "};\n"
@ -147,21 +184,55 @@
"\n" "\n"
"#endif /* __" "#endif /* __"
CLASS_FULL_NAME class-full-name-upper
"_H__ */\n")) "_H__ */\n"))
(defun gobgen-gen-code (CLASS_FULL_NAME (defun gobgen-gen-code (class-full-name-upper
CLASS_PREFIX class-prefix-upper
CLASS_NAME class-name-upper
class_name class-name-snake
ClassFullName class-full-name-camel
func-prefix func-prefix
file-name-header file-name-header
PARENT_PREFIX parent-prefix-upper
PARENT_NAME parent-name-upper
recent-glib recent-glib
need-private) need-private)
"Generate the contents of a GObject source file." "Generate the contents of a GObject source file.
CLASS-FULL-NAME-UPPER is the full GObject name of the new class in
UPPER_SNAKE_CASE notation.
CLASS-PREFIX-UPPER is the GObject prefix of the new class in
UPPER_SNAKE_CASE notation.
CLASS-NAME-UPPER is the name of the new class without the
prefix in UPPER_SNAKE_CASE notation.
CLASS-NAME-SNAKE is the name of the new class without the prefix
in snake_case notation.
CLASS-FULL-NAME-CAMEL is the full name of the new object in
CamelCase notation.
FUNC-PREFIX is the function prefix for object methods. Usually
it is the same as the full object name in lower_snake_case
notation.
FILE-NAME-HEADER is the name of the header file generated for the
new class.
PARENT-PREFIX-UPPER is the prefix of the parent object in
UPPER_SNAKE_CASE notation.
PARENT-NAME-UPPER is the name of the parent class without the
prefix in UPPER_SNAKE_CASE notation.
If RECENT-GLIB is 't', some features available from GLib 2.38
will be used.
If NEED-PRIVATE is 't', a private struct will be added to the new
class."
(concat (concat
"#include \"" file-name-header "\"\n" "#include \"" file-name-header "\"\n"
@ -172,21 +243,21 @@
(concat (concat
(if (not recent-glib) (if (not recent-glib)
(concat (concat
"#define " CLASS_FULL_NAME "_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE( \\\n" "#define " class-full-name-upper "_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE( \\\n"
" (o), \\\n" " (o), \\\n"
" " CLASS_PREFIX "_TYPE_" CLASS_NAME ", \\\n" " " class-prefix-upper "_TYPE_" class-name-upper ", \\\n"
" " ClassFullName "Private \\\n" " " class-full-name-camel "Private \\\n"
" ))\n" " ))\n"
"\n")) "\n"))
(if recent-glib "typedef ") (if recent-glib "typedef ")
"struct _" ClassFullName "Private {\n" "struct _" class-full-name-camel "Private {\n"
" /* TODO: You must add something here, or GLib will produce warnings! */\n" " /* TODO: You must add something here, or GLib will produce warnings! */\n"
"}" "}"
(if recent-glib (if recent-glib
(concat " " ClassFullName "Private")) (concat " " class-full-name-camel "Private"))
";\n" ";\n"
"\n")) "\n"))
@ -196,7 +267,7 @@
(if (and recent-glib need-private) (if (and recent-glib need-private)
"_WITH_PRIVATE") "_WITH_PRIVATE")
"(" ClassFullName ", " func-prefix ", " PARENT_PREFIX "_TYPE_" PARENT_NAME ");\n" "(" class-full-name-camel ", " func-prefix ", " parent-prefix-upper "_TYPE_" parent-name-upper ");\n"
"\n" "\n"
@ -210,14 +281,14 @@
"\n" "\n"
"static void\n" "static void\n"
func-prefix "_class_init(" ClassFullName "Class *klass)\n" func-prefix "_class_init(" class-full-name-camel "Class *klass)\n"
"{\n" "{\n"
" GObjectClass *gobject_class = G_OBJECT_CLASS(klass);\n" " GObjectClass *gobject_class = G_OBJECT_CLASS(klass);\n"
"\n" "\n"
(if (and (not recent-glib) need-private) (if (and (not recent-glib) need-private)
(concat (concat
" g_type_class_add_private(klass, sizeof(" ClassFullName "Private));\n" " g_type_class_add_private(klass, sizeof(" class-full-name-camel "Private));\n"
"\n")) "\n"))
" gobject_class->finalize = " func-prefix "_finalize;\n" " gobject_class->finalize = " func-prefix "_finalize;\n"
@ -227,12 +298,12 @@
"\n" "\n"
"static void\n" "static void\n"
func-prefix "_init(" ClassFullName " *" class_name ")\n" func-prefix "_init(" class-full-name-camel " *" class-name-snake ")\n"
"{\n" "{\n"
(if (and (not recent-glib) need-private) (if (and (not recent-glib) need-private)
(concat (concat
" " class_name "->priv = " CLASS_FULL_NAME "_GET_PRIVATE(" class_name ");\n")) " " class-name-snake "->priv = " class-full-name-upper "_GET_PRIVATE(" class-name-snake ");\n"))
"}\n")) "}\n"))
@ -242,7 +313,21 @@
parent-name parent-name
recent-glib recent-glib
need-private) need-private)
"Generate the header definition for a GObject derived clas." "Generate the boilerplate of a new GObject derived class.
CLASS-PREFIX is the prefix of the new class.
CLASS-NAME is the name of the new class, without the prefix.
PARENT-PREFIX is the prefix of the parent class.
PARENT-NAME is the name of the parent class, without the prefix.
If RECENT-GLIB is 't', some features available from GLib 2.38
will be used.
If NEED-PRIVATE is 't', a private struct will be added to the new
class."
(let* ((parent-prefix (downcase parent-prefix)) (let* ((parent-prefix (downcase parent-prefix))
(parent-name (downcase parent-name)) (parent-name (downcase parent-name))
@ -263,21 +348,21 @@
(parent-name-pcs (split-string parent-name "_")) (parent-name-pcs (split-string parent-name "_"))
(class-prefix-pcs (split-string class-prefix "_")) (class-prefix-pcs (split-string class-prefix "_"))
(class-name-pcs (split-string class-name "_")) (class-name-pcs (split-string class-name "_"))
(parent_prefix (string-join parent-prefix-pcs "_")) (parent-prefix-snake (string-join parent-prefix-pcs "_"))
(ParentPrefix (mapconcat 'capitalize parent-prefix-pcs "")) (parent-prefix-camel (mapconcat 'capitalize parent-prefix-pcs ""))
(PARENT_PREFIX (upcase parent_prefix)) (parent-prefix-upper (upcase parent-prefix-snake))
(parent_name (string-join parent-name-pcs "_")) (parent_name (string-join parent-name-pcs "_"))
(ParentName (mapconcat 'capitalize parent-name-pcs "")) (parent-name-camel (mapconcat 'capitalize parent-name-pcs ""))
(PARENT_NAME (upcase parent_name)) (parent-name-upper (upcase parent_name))
(class_prefix (string-join class-prefix-pcs "_")) (class_prefix (string-join class-prefix-pcs "_"))
(ClassPrefix (mapconcat 'capitalize class-prefix-pcs "")) (ClassPrefix (mapconcat 'capitalize class-prefix-pcs ""))
(CLASS_PREFIX (upcase class_prefix)) (class-prefix-upper (upcase class_prefix))
(class_name (string-join class-name-pcs "_")) (class-name-snake (string-join class-name-pcs "_"))
(ClassName (mapconcat 'capitalize class-name-pcs "")) (ClassName (mapconcat 'capitalize class-name-pcs ""))
(CLASS_NAME (upcase class_name)) (class-name-upper (upcase class-name-snake))
(func-prefix (concat class_prefix "_" class_name)) (func-prefix (concat class_prefix "_" class-name-snake))
(ClassFullName (concat ClassPrefix ClassName)) (class-full-name-camel (concat ClassPrefix ClassName))
(CLASS_FULL_NAME (concat CLASS_PREFIX "_" CLASS_NAME)) (class-full-name-upper (concat class-prefix-upper "_" class-name-upper))
(parent-header (concat (string-join (append parent-prefix-pcs parent-name-pcs) "-") ".h")) (parent-header (concat (string-join (append parent-prefix-pcs parent-name-pcs) "-") ".h"))
(file-name-base (string-join (append class-prefix-pcs class-name-pcs) "-")) (file-name-base (string-join (append class-prefix-pcs class-name-pcs) "-"))
(file-name-code (concat file-name-base ".c")) (file-name-code (concat file-name-base ".c"))
@ -287,14 +372,14 @@
(split-window-vertically) (split-window-vertically)
(other-window 1) (other-window 1)
(find-file file-name-header) (find-file file-name-header)
(insert (gobgen-gen-header CLASS_FULL_NAME (insert (gobgen-gen-header class-full-name-upper
CLASS_PREFIX class-prefix-upper
CLASS_NAME class-name-upper
ClassFullName class-full-name-camel
func-prefix func-prefix
parent_prefix parent-prefix-snake
ParentPrefix parent-prefix-camel
ParentName parent-name-camel
parent-header parent-header
recent-glib recent-glib
need-private)) need-private))
@ -302,21 +387,21 @@
(split-window-vertically) (split-window-vertically)
(other-window 1) (other-window 1)
(find-file file-name-code) (find-file file-name-code)
(insert (gobgen-gen-code CLASS_FULL_NAME (insert (gobgen-gen-code class-full-name-upper
CLASS_PREFIX class-prefix-upper
CLASS_NAME class-name-upper
class_name class-name-snake
ClassFullName class-full-name-camel
func-prefix func-prefix
file-name-header file-name-header
PARENT_PREFIX parent-prefix-upper
PARENT_NAME parent-name-upper
recent-glib recent-glib
need-private))))))) need-private)))))))
;;;###autoload ;;;###autoload
(defun gobgen () (defun gobgen ()
"Create widgets window for GObject creation" "Create widgets window for GObject creation."
(interactive) (interactive)

View File

@ -3,8 +3,8 @@
;;; Code: ;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) (add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "helm-ag" "helm-ag.el" (22527 12705 418692 ;;;### (autoloads nil "helm-ag" "helm-ag.el" (22537 49880 309308
;;;;;; 810000)) ;;;;;; 803000))
;;; Generated autoloads from helm-ag.el ;;; Generated autoloads from helm-ag.el
(autoload 'helm-ag-pop-stack "helm-ag" "\ (autoload 'helm-ag-pop-stack "helm-ag" "\

View File

@ -1,2 +1,2 @@
;;; -*- no-byte-compile: t -*- ;;; -*- no-byte-compile: t -*-
(define-package "helm-ag" "20161010.713" "the silver searcher with helm interface" '((emacs "24.4") (helm "2.0")) :url "https://github.com/syohex/emacs-helm-ag") (define-package "helm-ag" "20161020.952" "the silver searcher with helm interface" '((emacs "24.4") (helm "2.0")) :url "https://github.com/syohex/emacs-helm-ag")

View File

@ -4,7 +4,7 @@
;; Author: Syohei YOSHIDA <syohex@gmail.com> ;; Author: Syohei YOSHIDA <syohex@gmail.com>
;; URL: https://github.com/syohex/emacs-helm-ag ;; URL: https://github.com/syohex/emacs-helm-ag
;; Package-Version: 20161010.713 ;; Package-Version: 20161020.952
;; Version: 0.57 ;; Version: 0.57
;; Package-Requires: ((emacs "24.4") (helm "2.0")) ;; Package-Requires: ((emacs "24.4") (helm "2.0"))
@ -475,14 +475,17 @@ Default behaviour shows finish and result in mode-line."
(interactive) (interactive)
(setq helm-ag--context-stack nil)) (setq helm-ag--context-stack nil))
(defsubst helm-ag--marked-input () (defun helm-ag--marked-input (escape)
(when (use-region-p) (when (use-region-p)
(prog1 (buffer-substring-no-properties (region-beginning) (region-end)) (let ((input (buffer-substring-no-properties (region-beginning) (region-end))))
(deactivate-mark)))) (deactivate-mark)
(if (not escape)
input
(replace-regexp-in-string " " "\\\\ " input)))))
(defun helm-ag--query () (defun helm-ag--query ()
(let* ((searched-word (helm-ag--searched-word)) (let* ((searched-word (helm-ag--searched-word))
(marked-word (helm-ag--marked-input)) (marked-word (helm-ag--marked-input nil))
(query (read-string "Pattern: " (or marked-word searched-word) 'helm-ag--command-history))) (query (read-string "Pattern: " (or marked-word searched-word) 'helm-ag--command-history)))
(when (string-empty-p query) (when (string-empty-p query)
(error "Input is empty!!")) (error "Input is empty!!"))
@ -1084,7 +1087,7 @@ Continue searching the parent directory? "))
(helm-attrset 'name (helm-ag--helm-header search-dir) (helm-attrset 'name (helm-ag--helm-header search-dir)
helm-source-do-ag) helm-source-do-ag)
(helm :sources '(helm-source-do-ag) :buffer "*helm-ag*" :keymap helm-do-ag-map (helm :sources '(helm-source-do-ag) :buffer "*helm-ag*" :keymap helm-do-ag-map
:input (or (helm-ag--marked-input) :input (or (helm-ag--marked-input t)
(helm-ag--insert-thing-at-point helm-ag-insert-at-point))))) (helm-ag--insert-thing-at-point helm-ag-insert-at-point)))))
;;;###autoload ;;;###autoload