Comments (8)
ご意見ありがとうございます。
XEmacs のサポートは終了してもよいと思います。サポート終了するなら、きちんとアナウンスして周知してからでしょうね。
私の手元の GNU Emacs 23.1.1 で make してみましたが、Warning はひとつだけでした。私がメンテをサボっているコードであり、そのうち直します。
[USER@fedora ddskk-master]$ emacs --version
GNU Emacs 23.1.1
Copyright (C) 2009 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
[USER@fedora ddskk-master]$ make
emacs -batch -q -no-site-file -l SKK-MK -f SKK-MK-compile
Loading /home/USER/ddskk-master/SKK-CFG...
Generating autoloads for /home/USER/ddskk-master/skk-viper.el...
Generating autoloads for /home/USER/ddskk-master/skk-viper.el...done
略
Generating autoloads for /home/USER/ddskk-master/tar-util.el...
Generating autoloads for /home/USER/ddskk-master/tar-util.el...done
Loading /home/USER/ddskk-master/skk-autoloads.el (source)...
Wrote /home/USER/ddskk-master/skk-viper.elc
略
Wrote /home/USER/ddskk-master/skk.elc
In end of data:
tar-util.el:120:1:Warning: the function `tar--extract' is not known to be
defined.
Wrote /home/USER/ddskk-master/tar-util.elc
[USER@fedora ddskk-master]$
@conao3 さんのような Warning は生じません。何が違うのでしょうね?
from ddskk.
TOP := $(dir $(lastword $(MAKEFILE_LIST)))
DEPENDS := ddskk posframe
EMACS ?= emacs
BATCH := $(EMACS) -Q --batch -L $(TOP) $(DEPENDS:%=-L ./%/)
%.elc: %.el $(DEPENDS)
$(BATCH) -f batch-byte-compile $<
https://github.com/conao3/ddskk-posframe.el
私が昨日作ったddskk関連のパッケージのMakefileから抜粋します。elcの標準的なコンパイル方法に詳しくないのですが、普通は batch-byte-compile
によって行うと思います。
こちらのパッケージのMakeでは SKK-MK-compile
によって行っていますが、内部では byte-compile-file
を呼んでいますね。どちらも同じようにコンパイルできていると思います。
問題があるとすれば、私が設定した -L
オプションが足りないことですかね。。
どちらにせよ、Emacs-26でのワーニングである
Use ‘with-current-buffer’ rather than save-excursion+set-buffer
はそのとおりで、Emacs-23で定義されていないなら、Emacs-23用に定義して with-curernt-buffer
を使うべきだと思います。
手元ではEmacs-23.4で定義されていることを確認しました。それ以前のEmacsは環境がないのでわかりません。。
from ddskk.
xargsで生成されたコンパイルのコマンドは書いてありましたが、その前のコマンドが書かれてませんでいした。
それぞれ、ddskkのディレクトリにおいて、このコマンドで実行しました。
find . -name '*.elc' | xargs rm; find . -name '*.el' -depth 1 | xargs -n1 -t emacs-23.4 --batch -L ./ -L ./bayesian/ -L ./nicola/ -L ./tut-code/ -f batch-byte-compile 2>&1 | pbcopy
find . -name '*.elc' | xargs rm; find . -name '*.el' -depth 1 | xargs -n1 -t emacs-26.2 --batch -L ./ -L ./bayesian/ -L ./nicola/ -L ./tut-code/ -f batch-byte-compile 2>&1 | pbcopy
from ddskk.
現在、コンパイルすると大量のワーニングが出るほか
ワーニングが生じることを問題視しているのですよね。
こちらのパッケージのMakeでは
SKK-MK-compile
によって行っていますが、
内部ではbyte-compile-file
を呼んでいますね。
どちらも同じようにコンパイルできていると思います。
make では、SKK-MK にて必要なファイルを require しているので、ワーニング出ません。
@conao3 さんの方法では必要なファイルが require されないので、ワーニングが出て当然です。
from ddskk.
問題があるとすれば、私が設定した -L オプションが足りないことですかね。。
どちらにせよ、Emacs-26でのワーニングである
Use ‘with-current-buffer’ rather than save-excursion+set-buffer
はそのとおりで、Emacs-23で定義されていないなら、
Emacs-23用に定義して with-curernt-buffer を使うべきだと思います。
否。
マクロ with-current-buffer は相当昔から subr.el で実装されています。
$ git blame
83f57f499af (Martin Rudalics 2008-10-25 09:18:19 +0000 3335) (defmacro with-current-buffer (buffer-or-name &rest body)
$ git show 83f57f
commit 83f57f499af3922fd09956044f7fe8596e21b686
Author: Martin Rudalics <[email protected]>
Date: Sat Oct 25 09:18:19 2008 +0000
(with-current-buffer): Rename buffer argument to buffer-or-name.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 56d04af23e..b6651bd3ac 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2008-10-25 Martin Rudalics <[email protected]>
+ * subr.el (with-current-buffer): Rename buffer argument to
+ buffer-or-name.
* window.el (get-buffer-window-list): Rename buffer argument to
buffer-or-name and make it optional.
diff --git a/lisp/subr.el b/lisp/subr.el
index 5a1f4d42ee..0dda4b0e60 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2483,14 +2483,14 @@ Similar to `call-process-shell-command', but calls `process-file'."
^L
;;;; Lisp macros to do various things temporarily.
-(defmacro with-current-buffer (buffer &rest body)
- "Execute the forms in BODY with BUFFER temporarily current.
-BUFFER can be a buffer or a buffer name.
-The value returned is the value of the last form in BODY.
-See also `with-temp-buffer'."
+(defmacro with-current-buffer (buffer-or-name &rest body)
+ "Execute the forms in BODY with BUFFER-OR-NAME temporarily current.
+BUFFER-OR-NAME must be a buffer or the name of an existing buffer.
+The value returned is the value of the last form in BODY. See
+also `with-temp-buffer'."
(declare (indent 1) (debug t))
`(save-current-buffer
- (set-buffer ,buffer)
+ (set-buffer ,buffer-or-name)
,@body))
(defmacro with-selected-window (window &rest body)
$
Martin さんは buffer を buffer-or-name へ修正しただけで、with-current-buffer んp定義はそれ以前から存在します。
バッチモード(--batch)だから subr.el すら require されないのでは?
from ddskk.
ワーニングが生じることを問題視しているのですよね。
「ワーニングが出ること」は問題視していません。ワーニングはメンテナンスの指標であり、ワーニングが出なくともリファインするべき箇所がある場合や、ワーニングを無視する場合は当然あると思います。
ただ一般的にワーニングは積極的に直すべきTODOリストになると思います。
with-current-buffer
をあえて使わない理由も特にないと思われます。
@conao3 さんの方法では必要なファイルが require されないので、ワーニングが出て当然です。
とすると1ファイルが1つの「機能」として閉じていないということでしょうか。それはElispファイルの作りとして珍しい方法だと思います。
ユーザーがパッケージを使用する場合にも、requireする順番に依存してエラーが出たり出なかったりするのは不都合だと思いますが、ここのパッケージは別のルールのもとで開発されている(いた)のでしょうか。
from ddskk.
問題があるとすれば、私が設定した -L オプションが足りないことですかね。。
どちらにせよ、Emacs-26でのワーニングである
Use ‘with-current-buffer’ rather than save-excursion+set-buffer
はそのとおりで、Emacs-23で定義されていないなら、
Emacs-23用に定義して with-curernt-buffer を使うべきだと思います。否。
マクロ with-current-buffer は相当昔から subr.el で実装されています。
このコメントはちょっと分からないです。つまりEmacs-23でも使えるということでしょうか。
ではwith-current-bufferを使うべきではないでしょうか?
from ddskk.
Closeします。
from ddskk.
Related Issues (20)
- skk-get-current-candidate: Symbol’s function definition is void: skk-henkan-count HOT 7
- skk-jisyo の standard value について HOT 1
- trailing space HOT 4
- 「う゛」から「ゔ」使用に切り替えるパッチ HOT 1
- Multiple Cursorsと一緒使えない HOT 1
- マーカー(▼と▽)の変更 HOT 17
- MELPAでddskkではなくskkとして配布する HOT 7
- Markdown-modeの表中でddskkを使うと▼マーカーが削除されない HOT 4
- skk-undo-kakutei-return-previous-point non-nil の時の挙動 HOT 2
- skk-azikの「tU」->「っ」定義について HOT 2
- (void-function facemenu-color-equal) in Emacs-28 HOT 1
- Cursor colour no longer changes to match hiragana/katakana mode. HOT 18
- void-function facemenu-color-equal in Emacs-28.0 HOT 2
- sticky-key使用時、まだ消費されていない文字が消える
- make info で error HOT 2
- Emacs 29.0.50: Wrong type argument: listp, 1000000000 HOT 1
- '(setq skk-use-azik t)' in ~/.skk causes error 'Symbols' definition is void: del-alist` HOT 1
- emacs-29とddskk masterでisearchを使えば「Lisp error: (void-function nil)」が出ます HOT 6
- elpaca fails to install ddskk because ccc installed version (0) lower than min required 1.43
- ccc depends on facemenu, yet ccc doesn't stipulate facemenu as a dependency. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddskk.