Skip to content

Instantly share code, notes, and snippets.

From dc4f49f12a45fc642b779d928522e171e93043a3 Mon Sep 17 00:00:00 2001
From: imakado <imakado@imakado.local>
Date: Thu, 28 May 2009 21:31:16 +0900
Subject: [PATCH] fix encode bug.
---
lib/WebService/SimpleAPI/Wikipedia.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/WebService/SimpleAPI/Wikipedia.pm b/lib/WebService/SimpleAPI/Wikipedia.pm
(defun anything-c-buffer-list ()
"Return the list of names of buffers with boring buffers filtered out.
Boring buffers is specified by `anything-c-boring-buffer-regexp'.
The first buffer in the list will be the last recently used
buffer that is not the current buffer."
(let* ((buffers (mapcar 'buffer-name (buffer-list)))
(buffers (append (cdr buffers) (list (car buffers))))
(cur-buf-name (with-current-buffer anything-current-buffer
(and (current-buffer)
(buffer-name (current-buffer))))))
(require 'perl-completion)
;; M-x perl-rename-buffer
(defun perl-rename-buffer ()
(interactive)
(let ((package-name (plcmp-get-current-package-name)))
(when package-name
(rename-buffer package-name t))))
;; (add-hook 'cperl-mode-hook
use Test::Base;
{
package TestApp;
use Ark;
package TestApp::Controller::Root;
use Ark 'Controller';
__PACKAGE__->config->{namespace} = '';
;; for typester
(defun cperl-calculate-indent (&optional parse-data) ; was parse-start
"Return appropriate indentation for current line as Perl code.
In usual case returns an integer: the column to indent to.
Returns nil if line starts inside a string, t if in a comment.
Will not correct the indentation for labels, but will correct it for braces
and closing parentheses and brackets."
;; This code is still a broken architecture: in some cases we need to
;; compensate for some modifications which `cperl-indent-line' will add later
(defun plcmp-ac-candidates ()
(plcmp-ignore-errors
(when (and (eq major-mode 'cperl-mode)
(boundp 'perl-completion-mode)
perl-completion-mode)
;;(plcmp-initialize-variables)
(let ((words (plcmp-ac-make-cands)))
(plcmp-log "plcmp-ac-candidates words: %S" words)
(let ((cands (loop with count = 0
with ret
;; package を入力するやつ
(defun perl-insert-package ()
(interactive)
(require 'perl-completion)
(cond
((null buffer-file-truename) (error "no buffer-file-truename"))
(t
(let* ((s (replace-regexp-in-string
(rx-to-string `(and bol ,(plcmp--get-lib-path) (? "/")))
""
(defun perl-get-package-string ()
(interactive)
(require 'perl-completion)
(let ((lib-path (plcmp--get-lib-path)))
(when (and lib-path buffer-file-truename)
(let* ((s (replace-regexp-in-string
(rx-to-string `(and bol ,lib-path (? "/")))
""
(expand-file-name buffer-file-truename)))
(s (file-name-sans-extension (replace-regexp-in-string (rx "/") "::" (replace-regexp-in-string "^.+/lib/" "" s)))))
(defun ac-yasnippet-candidate ()
(require 'yasnippet)
(let ((table (first (yas/get-snippet-tables major-mode))))
(if table
(ac-yasnippet-candidate-1 table))))
--- auto-complete-yasnippet.el.orig 2009-09-08 11:44:45.000000000 +0900
+++ auto-complete-yasnippet.el 2009-09-08 12:05:18.000000000 +0900
@@ -3,21 +3,16 @@
(defun ac-yasnippet-candidate-1 (table)
(let ((hashtab (yas/snippet-table-hash table))
- (parent (yas/snippet-table-parent table))
candidates)
(maphash (lambda (key value)
(push key candidates))